* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--background);
    color: var(--text-main);
    font-family: var(--fuente);
    display: flex;
    flex-direction: column;
    min-h-screen: 100vh;
}

.main-navbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
}

.main-content-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

.main-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background-color: var(--bg-light); margin: 0; padding: 20px; }
.auth-card { background: var(--bg-card); max-width: 400px; w-full; padding: 30px; border-radius: 12px; border: 1px solid var(--border-color); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.theme-link { color: var(--primary-color); text-decoration: none; font-size: 0.85rem; }
.theme-link-secondary { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.theme-link:hover, .theme-link-secondary:hover { text-decoration: underline; }
.form-footer { text-align: center; margin-top: 15px; }
.alert-success { background-color: #e6f4ea; color: #137333; border: 1px solid #ceead6; }
.alert-danger { background-color: #fce8e6; color: #c5221f; border: 1px solid #fad2cf; }

/* ==========================================================================
   🔑 ESTILOS PARA LAS PÁGINAS DE AUTENTICACIÓN (Login, Forgot, etc.)
   ========================================================================== */

/* Contenedor principal que centra la tarjeta en toda la pantalla */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f9fafb; /* Un gris muy suave y limpio */
    margin: 0;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

/* La tarjeta blanca flotante */
.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.site-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px 0;
}

.site-subtitle {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
}

/* Formularios y elementos de entrada */
.form-group-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb; /* Azul corporativo */
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Utilidades de distribución y enlaces */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.theme-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.815rem;
    font-weight: 500;
}

.theme-link-secondary {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
}

.theme-link:hover, .theme-link-secondary:hover {
    text-decoration: underline;
}

/* Botones estructurados */
.form-actions {
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-primary:disabled {
    background-color: #93c5fd;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
}

/* Cajas de Alerta dinámicas */
.alert-box {
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    line-height: 1.4;
}

.alert-danger {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}

.hidden {
    display: none !important;
}