/* ==========================================================================
   PALMED — Pantallas de acceso (login / olvidé contraseña / restablecer)
   Rediseño 2026-09-28 (sistema pc-): panel de marca a la izquierda + tarjeta
   de formulario a la derecha; en celular se apilan. Solo presentación: mismos
   campos, nombres y rutas. Respaldo del diseño anterior: bak-2026-09-28/auth/.
   ========================================================================== */

.pa-shell {
    min-height: 100vh; min-height: 100dvh;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: #f3f7fd; font-family: 'Inter', system-ui, sans-serif;
}

/* ---------- Panel de marca ---------- */
.pa-brand {
    position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(145deg, #0b2f6b 0%, #0A5FD8 62%, #2f86ff 100%);
    padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.pa-brand::before, .pa-brand::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(255,255,255,.16), rgba(255,255,255,0) 70%);
}
.pa-brand::before { width: 520px; height: 520px; right: -180px; top: -160px; }
.pa-brand::after { width: 380px; height: 380px; left: -140px; bottom: -150px; }
.pa-brand > * { position: relative; z-index: 1; }

.pa-logo-row { display: flex; align-items: center; gap: 14px; }
.pa-logo-row img { width: 62px; height: 62px; object-fit: contain; background: #fff; border-radius: 16px; padding: 3px; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.pa-logo-row b { display: block; font-size: 1.15rem; letter-spacing: .02em; }
.pa-logo-row small { display: block; opacity: .8; font-size: .8rem; }

.pa-pitch h1 { font-size: 2.2rem; line-height: 1.15; font-weight: 700; margin: 0 0 14px; color: #fff; }
.pa-pitch p { font-size: 1rem; opacity: .88; max-width: 440px; margin: 0 0 26px; line-height: 1.55; }
.pa-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.pa-points li { display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.pa-points .ic {
    width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); font-size: 1rem;
}
.pa-legal { font-size: .78rem; opacity: .72; }

/* ---------- Formulario ---------- */
.pa-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.pa-card {
    width: 100%; max-width: 420px; background: #fff; border-radius: 22px;
    box-shadow: 0 24px 60px rgba(10, 95, 216, .12); border: 1px solid #e6edf6; padding: 38px 36px 30px;
}
.pa-card .pa-mobile-logo { display: none; }
.pa-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #0A5FD8; margin-bottom: 6px; }
.pa-card h2 { font-size: 1.6rem; font-weight: 700; color: #1a2b49; margin: 0 0 6px; }
.pa-card .pa-lead { color: #6b7c93; font-size: .92rem; margin: 0 0 24px; }

.pa-field { margin-bottom: 16px; }
.pa-field label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7c93; margin-bottom: 6px; }
.pa-input { position: relative; }
.pa-input .pa-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: .95rem; opacity: .55; pointer-events: none; }
.pa-input .form-control {
    height: 48px; border-radius: 12px; border: 1.5px solid #dbe4f0; padding-left: 42px; font-size: .98rem; background: #fbfdff;
    transition: border-color .15s, box-shadow .15s;
}
.pa-input .form-control:focus { border-color: #0A5FD8; box-shadow: 0 0 0 4px rgba(10, 95, 216, .12); background: #fff; }
.pa-eye {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; padding: 6px 8px; border-radius: 8px; font-size: .95rem; cursor: pointer; opacity: .6;
}
.pa-eye:hover { opacity: 1; background: #eef4fd; }
.pa-input.has-eye .form-control { padding-right: 46px; }

.pa-submit {
    width: 100%; height: 50px; border: 0; border-radius: 12px; margin-top: 6px;
    background: linear-gradient(135deg, #0A5FD8, #2f86ff); color: #fff; font-weight: 700; font-size: 1rem;
    box-shadow: 0 10px 24px rgba(10, 95, 216, .28); transition: transform .12s, box-shadow .12s;
}
.pa-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(10, 95, 216, .34); }
.pa-secondary {
    display: block; width: 100%; text-align: center; margin-top: 10px; padding: 12px; border-radius: 12px;
    border: 1.5px solid #dbe4f0; color: #1a2b49; font-weight: 600; text-decoration: none;
}
.pa-secondary:hover { background: #f5f9ff; color: #0A5FD8; }
.pa-link-row { text-align: center; margin-top: 18px; font-size: .9rem; }
.pa-link-row a { color: #0A5FD8; text-decoration: none; font-weight: 600; }
.pa-link-row a:hover { text-decoration: underline; }
.pa-foot { text-align: center; color: #93a1b5; font-size: .75rem; margin-top: 22px; line-height: 1.5; }

.pa-alert { border-radius: 12px; padding: 11px 14px; font-size: .9rem; margin-bottom: 16px; display: flex; gap: 8px; }
.pa-alert.is-error { background: #fdecea; color: #b42318; border: 1px solid #f7c9c4; }
.pa-alert.is-ok { background: #e6f7ef; color: #08794f; border: 1px solid #bfe8d3; }

/* ---------- Celular / tablet ---------- */
@media (max-width: 900px) {
    .pa-shell { grid-template-columns: 1fr; }
    .pa-brand { display: none; }
    .pa-main { padding: 28px 16px; align-items: flex-start; background: linear-gradient(180deg, #0b2f6b 0, #0A5FD8 180px, #f3f7fd 180px); }
    .pa-card { padding: 28px 22px 24px; margin-top: 36px; }
    .pa-card .pa-mobile-logo { display: block; width: 76px; height: 76px; object-fit: contain; margin: -66px auto 14px; background: #fff; border-radius: 20px; padding: 4px; box-shadow: 0 10px 26px rgba(10,95,216,.22); }
    .pa-card h2, .pa-kicker, .pa-card .pa-lead { text-align: center; }
}

/* ==========================================================================
   Páginas del PACIENTE que usan este mismo layout (consentimiento, encuesta,
   verificación de certificado, videollamada inválida, gracias/invalid).
   Pulido 2026-09-28 SOLO con CSS, con alcance .auth-wrapper: no se toca el
   HTML ni el JavaScript (firma, estrellas, idiomas). Selectores con más
   especificidad porque cada vista trae su propio <style> en el body.
   ========================================================================== */
.auth-wrapper {
    background:
        radial-gradient(900px 500px at 12% -10%, rgba(255,255,255,.18), transparent 60%),
        radial-gradient(700px 480px at 110% 110%, rgba(255,255,255,.12), transparent 60%),
        linear-gradient(135deg, #0b2f6b 0%, #0A5FD8 55%, #00A86B 100%);
    padding: 32px 16px;
    font-family: 'Inter', system-ui, sans-serif;
}
.auth-wrapper .auth-card {
    position: relative; overflow: hidden;
    max-width: 480px; border-radius: 22px; padding: 34px 34px 28px;
    border: 1px solid rgba(255,255,255,.6);
    box-shadow: 0 30px 70px rgba(6, 30, 70, .28);
}
.auth-wrapper .auth-card::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
    background: linear-gradient(90deg, #0A5FD8, #2f86ff 55%, #00A86B);
}
.auth-wrapper .auth-card h1,
.auth-wrapper .auth-card h2,
.auth-wrapper .auth-card h3,
.auth-wrapper .auth-card h4 { color: #1a2b49; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.auth-wrapper .auth-card h3 { font-size: 1.45rem; }
.auth-wrapper .auth-card p, .auth-wrapper .auth-card li { color: #44546a; }
.auth-wrapper .auth-card .text-muted { color: #6b7c93 !important; }

/* Selector de idioma */
.auth-wrapper .auth-card .lang-switch { gap: 6px; }
.auth-wrapper .auth-card .lang-switch .lang-btn {
    border-radius: 999px; border: 1px solid #dbe4f0; background: #f5f9ff; color: #1a2b49;
    font-weight: 600; padding: 4px 11px; transition: background .12s, border-color .12s;
}
.auth-wrapper .auth-card .lang-switch .lang-btn:hover { border-color: #b9cdea; background: #eaf2ff; }
.auth-wrapper .auth-card .lang-switch .lang-btn.active { background: #0A5FD8; border-color: #0A5FD8; color: #fff; }

/* Formularios */
.auth-wrapper .auth-card .form-label { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7c93; margin-bottom: 6px; }
.auth-wrapper .auth-card .form-control,
.auth-wrapper .auth-card .form-select {
    border-radius: 12px; border: 1.5px solid #dbe4f0; background-color: #fbfdff; min-height: 46px; font-size: .96rem;
    transition: border-color .15s, box-shadow .15s;
}
.auth-wrapper .auth-card textarea.form-control { min-height: 96px; }
.auth-wrapper .auth-card .form-control:focus,
.auth-wrapper .auth-card .form-select:focus { border-color: #0A5FD8; box-shadow: 0 0 0 4px rgba(10,95,216,.12); background-color: #fff; }
.auth-wrapper .auth-card .form-check-input:checked { background-color: #0A5FD8; border-color: #0A5FD8; }

/* Botones */
.auth-wrapper .auth-card .btn-palmed {
    border-radius: 12px; min-height: 48px; font-weight: 700;
    background: linear-gradient(135deg, #0A5FD8, #2f86ff); border: 0;
    box-shadow: 0 10px 24px rgba(10,95,216,.26); transition: transform .12s, box-shadow .12s;
}
.auth-wrapper .auth-card .btn-palmed:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(10,95,216,.32); }
.auth-wrapper .auth-card .btn-palmed:disabled { opacity: .6; transform: none; box-shadow: none; }

/* Tablas de datos (verificación de certificado) */
.auth-wrapper .auth-card .table { margin-bottom: 14px; }
.auth-wrapper .auth-card .table th, .auth-wrapper .auth-card .table td { padding: 10px 8px; border-color: #eef2f7; font-size: .92rem; }
.auth-wrapper .auth-card .table td:first-child, .auth-wrapper .auth-card .table th:first-child { color: #6b7c93; font-weight: 600; }
.auth-wrapper .auth-card .alert { border-radius: 12px; }

@media (max-width: 520px) {
    .auth-wrapper { padding: 16px 10px; align-items: flex-start; }
    .auth-wrapper .auth-card { padding: 26px 18px 22px; border-radius: 18px; }
}
