/* ═══════════════════════════════════════════════
   login.css  —  Página de Login
   MiMedico · Fase 3
═══════════════════════════════════════════════ */

.login-section {
    min-height: calc(100vh - 70px);
    background: linear-gradient(135deg, #e8f4fb 0%, #f4f8fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 960px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,.12);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ─── BRANDING (izquierda) ──────────────────── */
.login-branding {
    background: linear-gradient(135deg, #0078d7 0%, #003f6b 100%);
    padding: 50px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 48px,
            rgba(255,255,255,.04) 48px, rgba(255,255,255,.04) 50px),
        repeating-linear-gradient(90deg, transparent, transparent 48px,
            rgba(255,255,255,.04) 48px, rgba(255,255,255,.04) 50px);
}

.login-branding__inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.login-branding__icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: #fff;
}

.login-branding__logo {
    width: 100%;
    max-width: 260px;
    margin: 0 auto 20px;
    display: block;
    filter: brightness(0) invert(1);
}

.login-branding__title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.login-branding__sub {
    color: rgba(255,255,255,.8);
    font-size: .9rem;
    line-height: 1.6;
    margin: 0 0 28px;
}

.login-branding__features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.login-branding__features li {
    color: #fff;
    font-size: .9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-branding__features li i {
    color: #6ee7b7;
    font-size: .85rem;
}

/* ─── FORMULARIO (derecha) ──────────────────── */
.login-form-side {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-mobile-header {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.login-mobile-header__logo {
    max-width: 160px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}


.login-mobile-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a2e44;
    margin: 0 0 4px;
}

.login-mobile-header p {
    color: #888;
    font-size: .85rem;
    margin: 0;
}

.login-form-side__title {
    color: #1a2e44;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.login-form-side__sub {
    color: #888;
    font-size: .9rem;
    margin: 0 0 24px;
}

/* ─── ALERTAS ───────────────────────────────── */
.login-alert {
    display: flex;
    gap: 12px;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.login-alert--error {
    background: #fff5f5;
    border: 1px solid #fecaca;
}

.login-alert--warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.login-alert__icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .9rem;
}

.login-alert--error   .login-alert__icon { background: #fee2e2; color: #ef4444; }
.login-alert--warning .login-alert__icon { background: #fef3c7; color: #f59e0b; }

.login-alert__body strong {
    display: block;
    font-size: .9rem;
    margin-bottom: 4px;
}

.login-alert--error   .login-alert__body strong { color: #991b1b; }
.login-alert--warning .login-alert__body strong { color: #92400e; }

.login-alert__body p {
    font-size: .83rem;
    margin: 0 0 8px;
    color: #555;
}

.login-alert__contacto {
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #fde68a;
    margin-top: 8px;
}

.login-alert__contacto p {
    font-size: .8rem;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 6px !important;
}

.login-alert__contacto a {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: #555;
    text-decoration: none;
    margin-bottom: 4px;
    transition: color .2s;
}

.login-alert__contacto a:hover { color: #0078d7; }

/* ─── TIP ───────────────────────────────────── */
.login-tip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: .83rem;
    color: #1e40af;
}

.login-tip i { color: #3b82f6; flex-shrink: 0; }
.login-tip p { margin: 0; }

/* ─── CAMPOS ────────────────────────────────── */
.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.login-field label i { color: #0078d7; margin-right: 4px; }

.login-field__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-field__icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: .85rem;
    pointer-events: none;
}

.login-field__input-wrap input {
    width: 100%;
    padding: 11px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: .93rem;
    color: #1a2e44;
    background: #f9fafb;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
}

.login-field__input-wrap input:focus {
    outline: none;
    border-color: #0078d7;
    box-shadow: 0 0 0 3px rgba(0,120,215,.1);
    background: #fff;
}

.login-field__toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    font-size: .85rem;
    transition: color .2s;
}

.login-field__toggle:hover { color: #374151; }

/* ─── EXTRAS ────────────────────────────────── */
.login-form__extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: #555;
    cursor: pointer;
}

.login-check input { accent-color: #0078d7; }

/* ─── BOTONES ───────────────────────────────── */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0078d7, #005fa3);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
    text-decoration: none;
    margin-top: 4px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #005fa3, #004d87);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,120,215,.35);
}

.login-btn i { transition: transform .2s; }
.login-btn:hover i { transform: translateX(4px); }

.login-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: #e5e7eb;
}

.login-divider span {
    position: relative;
    background: #fff;
    padding: 0 12px;
    color: #6b7280;
    font-size: 1rem;
    font-weight: 600;
}

.login-btn-register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    border-radius: 10px;
    font-size: .97rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
}

.login-btn-register:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5,150,105,.35);
}


.login-btn-register--grande {
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

.login-tip--nuevo {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
    margin-top: -8px;
}
.login-tip--nuevo i { color: #059669; }


/* ─── RESPONSIVE ────────────────────────────── */
@media (max-width: 700px) {
    .login-wrapper { grid-template-columns: 1fr; }
    .login-branding { display: none; }
    .login-mobile-header { display: block; }
    .login-form-side { padding: 32px 24px; }
}

/* ─── BOTÓN VOLVER (layout auth) ─────────────── */
.btn-volver {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #374151;
    padding: 10px 18px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    text-decoration: none;
    font-weight: 500;
    font-size: .9rem;
    transition: all .25s ease;
}

.btn-volver:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    transform: translateY(-1px);
}

.btn-volver i {
    color: #0078d7;
    transition: transform .2s;
}

.btn-volver:hover i {
    transform: translateX(-3px);
}

@media (max-width: 600px) {
    .btn-volver span { display: none; }
    .btn-volver {
        padding: 10px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
}
