/* src/main/resources/static/css/global.css */

/* Estilos de fuente y fondo para todo el cuerpo de la página */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex; /* Nuevo: Usa flexbox para centrar el contenido */
    justify-content: center; /* Nuevo: Centra horizontalmente */
    align-items: center; /* Nuevo: Centra verticalmente */
    min-height: 100vh; /* Nuevo: Ocupa toda la altura de la ventana */
}

/* Contenedor central para las páginas principales */
.container {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    box-sizing: border-box;
}

/* Estilos para encabezados */
h1 {
    color: #1a1a2e;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 2rem;
    text-align: center;
}

/* Estilos para enlaces (a) */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Estilos para los formularios */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Estilos para grupos de label e input */
form > div {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
    text-align: left;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

button {
    background-color: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s;
    width: 100%;
}

button:hover {
    background-color: #0056b3;
}

.logout {
    position: absolute;
    top: 20px;
    right: 20px;
}

.input-error {
    border: 2px solid red;
}

@media (max-width: 600px) {
    body {
        padding: 0 5px;
        min-height: 100vh;
    }
    .container {
        padding: 1rem;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
    h1 {
        font-size: 1.3rem;
    }
    .logout {
        top: 10px;
        right: 10px;
        font-size: 0.95rem;
    }
    button {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
}