/* MedicFolio - Estilos de Auth (login, registro, recuperar, perfil) */

/* Contenedor centrado (paginas publicas) */
.auth-contenedor {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 12% 18%, rgba(20, 184, 166, .18), transparent 28%),
        linear-gradient(135deg, #EAF2F8 0%, #F8FAFC 48%, #EEFDF8 100%);
}
.auth-contenedor-amplio .auth-caja { max-width: 540px; }

.auth-login {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 440px);
    gap: 3rem;
    width: 100%;
    padding: 2rem clamp(1rem, 4vw, 5rem);
}

.auth-caja {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .12);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-login-caja {
    align-self: center;
    max-width: 440px;
}

.auth-hero {
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 4vw, 4.5rem) 0;
    color: #0F172A;
}

.auth-hero-marca {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    font-size: 1.125rem;
    font-weight: 800;
}

.auth-marca-icono,
.auth-logo-icono {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F766E, #2563EB);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25);
    flex-shrink: 0;
}

.auth-hero-contenido {
    max-width: 680px;
}

.auth-hero-kicker {
    color: #0F766E;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.auth-hero h1 {
    max-width: 720px;
    font-size: clamp(2.75rem, 5vw, 5.25rem);
    line-height: .96;
    letter-spacing: 0;
    margin-bottom: 1.25rem;
}

.auth-hero-contenido > p:last-child {
    max-width: 580px;
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.7;
}

.auth-hero-resumen {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 1rem;
}

.auth-hero-resumen div {
    border-left: 3px solid #14B8A6;
    padding-left: 1rem;
}

.auth-hero-resumen span {
    display: block;
    color: #64748B;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .2rem;
}

.auth-hero-resumen strong {
    color: #1E293B;
    font-size: 1rem;
}

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .75rem;
    margin-bottom: 1.75rem;
}
.auth-logo-nombre { font-size: 1.25rem; font-weight: 800; color: #0F172A; }
.auth-titulo {
    font-size: 1.85rem;
    line-height: 1.15;
    font-weight: 800;
    text-align: left;
    margin: 0 0 .5rem;
}
.auth-subtitulo {
    text-align: left;
    color: #64748B;
    font-size: .95rem;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

/* Separador */
.auth-separador {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.35rem 0;
    color: #94A3B8;
    font-size: .8125rem;
}
.auth-separador::before,
.auth-separador::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

/* Volver */
.auth-volver {
    display: block;
    text-align: center;
    color: #64748B;
    font-size: .875rem;
    text-decoration: none;
}
.auth-volver:hover { color: #2563EB; }

/* Recuerdate / link recuperar */
.auth-recuerdame {
    display: flex;
    justify-content: flex-end;
    margin: -.25rem 0 1.25rem;
}
.link-recuperar {
    font-size: .86rem;
    color: #2563EB;
    text-decoration: none;
    font-weight: 650;
}
.link-recuperar:hover { text-decoration: underline; }

/* Campo password con toggle */
.campo-password-wrap {
    position: relative;
}
.campo-password-wrap input { padding-right: 4rem; }
.toggle-password {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: .78rem;
    padding: .25rem;
    color: #2563EB;
    font-weight: 700;
    opacity: .85;
    transition: opacity .1s, color .1s;
}
.toggle-password:hover { opacity: 1; color: #1D4ED8; }

/* Fortaleza de contraseña */
.password-fortaleza {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .375rem;
}
.fortaleza-barra {
    flex: 1;
    height: 4px;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.fortaleza-barra::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: var(--w, 0%);
    background: var(--c, #DC2626);
    border-radius: 999px;
    transition: width .3s, background .3s;
}
#fortaleza-fill {
    height: 100%;
    border-radius: 999px;
    transition: width .3s, background .3s;
}
#fortaleza-texto { font-size: .75rem; white-space: nowrap; }

/* Términos */
.campo-terminos {
    margin: .75rem 0 1rem;
    font-size: .875rem;
}
.campo-terminos a { color: #2563EB; }

/* Beneficios del registro */
.registro-beneficios {
    display: flex;
    justify-content: space-around;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #E2E8F0;
    flex-wrap: wrap;
    gap: .5rem;
}
.beneficio { font-size: .75rem; color: #16A34A; font-weight: 500; }

/* Hint inline */
.campo-hint-inline { font-size: .75rem; font-weight: 400; color: #94A3B8; }
.campo-disabled { background: #F8FAFC; color: #94A3B8; cursor: not-allowed; }

/* Perfil autenticado */
.perfil-auth-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 680px;
}

/* Info extra del perfil */
.perfil-info-extra {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: .875rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: .75rem 0;
}
.perfil-info-item { display: flex; flex-direction: column; gap: .125rem; }
.perfil-info-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94A3B8;
    font-weight: 600;
}
.perfil-info-valor { font-size: .9375rem; font-weight: 500; }

/* Reutilizados */
.seccion-card {
    background: #fff; border: 1px solid #E2E8F0;
    border-radius: 8px; padding: 1.5rem;
}
.seccion-titulo { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }
.campo { margin-bottom: 1.1rem; }
.campo label {
    display: block; font-size: .84rem;
    font-weight: 750; margin-bottom: .45rem;
    color: #334155;
}
.campo input, .campo select {
    width: 100%; padding: .8rem .9rem;
    border: 1px solid #CBD5E1; border-radius: 8px;
    background: #F8FAFC;
    color: #0F172A;
    font-size: 1rem; transition: border-color .15s, background .15s, box-shadow .15s;
    font-family: inherit;
}
.campo input:focus, .campo select:focus {
    outline: none; border-color: #2563EB;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,.13);
}
.campo-requerido label::after { content: ' *'; color: #DC2626; }
.campo-hint { display: block; font-size: .75rem; color: #94A3B8; margin-top: .2rem; }
.campo-check { display: flex; align-items: flex-start; gap: .5rem; cursor: pointer; }
.campo-check input[type=checkbox] { width: auto; margin-top: .2rem; flex-shrink: 0; }
.form-grilla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-acciones { display: flex; gap: .75rem; justify-content: flex-end; padding-top: .25rem; }
.btn {
    display: inline-flex; align-items: center; gap: .375rem;
    padding: .78rem 1.125rem; border-radius: 8px;
    font-size: .98rem; font-weight: 750; cursor: pointer;
    border: none; text-decoration: none; transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.btn-primario {
    background: linear-gradient(135deg, #2563EB, #0F766E);
    color: #fff;
    box-shadow: 0 12px 22px rgba(37,99,235,.24);
}
.btn-primario:hover {
    background: linear-gradient(135deg, #1D4ED8, #0F766E);
    transform: translateY(-1px);
}
.btn-outline  { background: #fff; border: 1px solid #CBD5E1; color: #1E293B; }
.btn-outline:hover { border-color: #2563EB; color: #2563EB; background: #F8FAFC; }
.btn-completo { width: 100%; justify-content: center; }
.flash {
    display: flex; align-items: center; gap: .625rem;
    padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem;
    font-size: .9rem;
}
.flash-exito { background: #DCFCE7; border: 1px solid #86EFAC; color: #166534; }
.flash-error { background: #FEE2E2; border: 1px solid #FCA5A5; color: #991B1B; }
.flash-info  { background: #DBEAFE; border: 1px solid #93C5FD; color: #1E40AF; }
.flash-icono { font-weight: 700; }

@media (max-width: 480px) {
    .auth-caja { padding: 1.75rem 1.25rem; }
    .form-grilla-2 { grid-template-columns: 1fr; }
    .registro-beneficios { flex-direction: column; align-items: center; }
}

@media (max-width: 900px) {
    .auth-login {
        display: flex;
        justify-content: center;
        padding: 1.25rem;
    }
    .auth-hero { display: none; }
    .auth-login-caja { max-width: 440px; }
}

@media (max-width: 480px) {
    .auth-contenedor { align-items: stretch; }
    .auth-login { padding: 1rem; }
    .auth-caja {
        box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
        align-self: center;
    }
    .auth-logo { margin-bottom: 1.25rem; }
    .auth-titulo { font-size: 1.55rem; }
}
