/*
    auth.css — Estilos globales compartidos para las páginas de autenticación.
    ===========================================================================
    Estas clases son usadas por Login.razor, Recuperar.razor y Registro.razor.
    He centralizado el diseño aquí para evitar triplicar el código en los archivos
    .razor.css de cada página.

    Paleta (tomada de theme.ts del proyecto de referencia React):
      primary:      #2E7D32   primaryDark:  #1B5E20
      info:         #1565C0   infoLight:    #E3F2FD
      accent:       #ECE6D8   (borde de inputs en reposo)
      muted:        #78909C
      background:   #F9F7F2
      success:      #2E7D32   successLight: #E8F5E9
    ===========================================================================
*/

/* ══════════════════════════════════════════════════════════════
   LAYOUT SPLIT-SCREEN
   ══════════════════════════════════════════════════════════════ */

.auth-root {
    display: flex;
    min-height: 100vh;
    background: #F9F7F2;
}

/* ── Columna izquierda (imagen — solo desktop) ── */
.auth-image-col {
    display: none;
    position: relative;
    overflow: hidden;
}

@media (min-width: 992px) {
    .auth-image-col {
        display: flex;
        width: 50%;
        flex-direction: column;
    }
}

.auth-image-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay degradado: verde oscuro → verde → gris pizarra */
.auth-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(27, 94, 32, 0.82)  0%,
        rgba(46, 125, 50, 0.62) 55%,
        rgba(55, 71, 79, 0.72)  100%
    );
}

/* Texto flotante en la parte inferior de la imagen */
.auth-image-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 3rem;
}

.auth-image-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #A5D6A7;
    margin-bottom: 1rem;
}

.auth-image-title {
    font-family: var(--font-serif), 'Bitter', Georgia, serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 0.875rem;
    line-height: 1.2;
}

.auth-image-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.62);
    max-width: 26rem;
    margin: 0;
}

/* ── Columna derecha (formulario) ── */
.auth-form-col {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: #F9F7F2;
}

.auth-form-wrap {
    width: 100%;
    max-width: 26rem;
    animation: authFadeUp 0.5s ease-out both;
}

@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Branding móvil (oculto en desktop) ── */
.auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #2E7D32;
    margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
    .auth-mobile-brand { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   TIPOGRAFÍA
   ══════════════════════════════════════════════════════════════ */

.auth-title {
    font-family: var(--font-serif), 'Bitter', Georgia, serif;
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 0.375rem;
    line-height: 1.2;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: #78909C;
    margin: 0 0 2rem;
    line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   FORMULARIO E INPUTS
   ══════════════════════════════════════════════════════════════ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.auth-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #2a2a2a;
    margin: 0;
}

/* Wrapper del input con el ícono prefijo */
.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 0.875rem;
    color: #A0A0A0;
    font-size: 0.8125rem;
    pointer-events: none;
    z-index: 1;
}

/* Reset de Bootstrap + estilos propios */
.auth-input {
    width: 100%;
    padding: 0.6875rem 1rem 0.6875rem 2.5rem;
    font-size: 0.9rem;
    color: #1a1a1a;
    background: #F5F5F5;
    border: 1.5px solid #ECE6D8;
    border-radius: 0.75rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
    box-shadow: none !important;
}

.auth-input--password {
    padding-right: 2.75rem;
}

/* Focus verde (login / registro) */
.auth-input:focus {
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12) !important;
    background: #FFFFFF;
}

/* Focus azul (recuperar) */
.auth-input--blue-focus:focus {
    border-color: #1565C0 !important;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12) !important;
}

.auth-input::placeholder {
    color: #BCBAB5;
}

/* Botón toggle de visibilidad de contraseña */
.auth-eye-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0.25rem;
    color: #A0A0A0;
    cursor: pointer;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.auth-eye-btn:hover {
    color: #555;
    background: rgba(0, 0, 0, 0.05);
}

/* ── Mensaje de validación ── */
.auth-validation {
    font-size: 0.75rem !important;
    color: #C62828 !important;
    margin: 0;
    line-height: 1.4;
    display: block;
}

/* ══════════════════════════════════════════════════════════════
   BOTÓN DE ENVÍO
   ══════════════════════════════════════════════════════════════ */

.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.8125rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #FFFFFF;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
    font-family: inherit;
}

.auth-submit-btn:active {
    transform: scale(0.98);
}

/* Variante verde (login, registro) */
.auth-submit-btn--green {
    background: #2E7D32;
}

.auth-submit-btn--green:hover {
    background: #1B5E20;
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.28);
}

/* Variante azul (recuperar) */
.auth-submit-btn--blue {
    background: #1565C0;
}

.auth-submit-btn--blue:hover {
    background: #0D47A1;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.28);
}

/* ══════════════════════════════════════════════════════════════
   ENLALCES AL PIE DEL FORMULARIO
   ══════════════════════════════════════════════════════════════ */

.auth-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.auth-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}

.auth-link--blue  { color: #1565C0; }
.auth-link--green { color: #2E7D32; font-weight: 600; }
.auth-link--muted { color: #78909C; }
.auth-link--muted:hover { color: #555; }

/* Fila para "¿No tenés cuenta? [Crear cuenta]" */
.auth-link-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
}

.auth-link-muted-text {
    color: #78909C;
}

/* ══════════════════════════════════════════════════════════════
   CAJA INFORMATIVA (recuperar contraseña)
   ══════════════════════════════════════════════════════════════ */

.auth-info-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: #E3F2FD;
    border: 1px solid rgba(21, 101, 192, 0.15);
    margin-bottom: 1.5rem;
}

.auth-success-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: #E8F5E9;
    border: 1px solid rgba(46, 125, 50, 0.2);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #1a1a1a;
    line-height: 1.5;
}

.auth-success-box i {
    color: #2E7D32;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.auth-info-box-icon {
    color: #1565C0;
    font-size: 1.125rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.auth-info-box-text {
    font-size: 0.85rem;
    color: #1a1a1a;
    line-height: 1.5;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   ESTADO DE ÉXITO (confirmación tras envío)
   ══════════════════════════════════════════════════════════════ */

.auth-success {
    text-align: center;
    padding: 2rem 1rem;
}

.auth-success-icon-wrap {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: #E8F5E9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: #2E7D32;
}

.auth-success-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0 0 0.5rem;
}

.auth-success-text {
    font-size: 0.875rem;
    color: #78909C;
    line-height: 1.6;
    max-width: 22rem;
    margin: 0 auto 1.5rem;
}

.auth-success-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #FFFFFF;
    background: #2E7D32;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.18s, box-shadow 0.18s;
}

.auth-success-btn:hover {
    background: #1B5E20;
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.25);
    color: #FFFFFF;
}

.auth-success-btn--blue {
    background: #1565C0;
}

.auth-success-btn--blue:hover {
    background: #0D47A1;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.25);
}

/* ══════════════════════════════════════════════════════════════
   INDICADOR DE COINCIDENCIA DE CONTRASEÑAS (registro)
   ══════════════════════════════════════════════════════════════ */

.auth-match-ok {
    font-size: 0.75rem;
    font-weight: 500;
    color: #2E7D32;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.auth-match-fail {
    font-size: 0.75rem;
    font-weight: 500;
    color: #C53030;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
}
