/* ─────────────────────────────────────────────────────────────────────
 * /paciente/ · Slides de boas-vindas + Onboarding (CRM + LGPD)
 * Identidade institucional: navy + gold + ivory + Cormorant + Inter.
 * Espelhamento funcional de PatientWelcomeSlides e PatientOnboardingView.
 * ───────────────────────────────────────────────────────────────────── */

body {
    background: var(--ivory);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Topbar ──────────────────────────────────────────────────────── */
.topbar {
    background: rgba(250, 247, 241, 0.92);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-4) var(--sp-7);
    position: sticky;
    top: 0;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    z-index: var(--z-nav);
}

.topbar-inner {
    max-width: var(--max-content);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.topbar .brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    color: var(--navy-900);
    text-decoration: none;
}

.topbar .brand img {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    object-fit: cover;
}

.topbar .voltar {
    margin-left: auto;
    color: var(--ink-soft);
    font-size: var(--fs-sm);
    text-decoration: none;
}

.topbar .voltar:hover { color: var(--navy-700); }

/* ── Main ────────────────────────────────────────────────────────── */
.paciente-main {
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: var(--sp-7) var(--sp-5);
    display: flex;
    flex-direction: column;
}

/* ═════════════════════════════════════════════════════════════════
 *  TELA 1 — Slides
 * ═════════════════════════════════════════════════════════════════ */

.tela-slides {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 200px);
    animation: fadeIn 0.4s var(--ease-out);
}

.slide-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-7) var(--sp-3);
}

.slide {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--sp-5);
    animation: slideFade 0.45s var(--ease-out);
}

.slide.ativo {
    display: flex;
}

.slide-icone-wrap {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(140deg,
        rgba(201, 169, 97, 0.18) 0%,
        rgba(201, 169, 97, 0.05) 100%);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--navy-800);
}

.slide-icone-wrap svg {
    width: 64px;
    height: 64px;
}

.slide-icone-wrap[data-icone="coracao"] { color: #b5594b; }
.slide-icone-wrap[data-icone="escudo"]  { color: var(--navy-700); }
.slide-icone-wrap[data-icone="pessoa"]  { color: var(--gold-dark); }

.slide-titulo {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(26px, 5.5vw, 32px);
    color: var(--navy-900);
    line-height: 1.15;
    max-width: 480px;
}

.slide-mensagem {
    color: var(--ink-soft);
    font-size: var(--fs-body-md);
    line-height: var(--lh-relaxed);
    max-width: 460px;
    padding: 0 var(--sp-3);
}

.slide-indicadores {
    display: flex;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-5) 0;
}

.slide-indicadores .indicador {
    width: 8px;
    height: 8px;
    border-radius: var(--r-pill);
    background: rgba(20, 35, 58, 0.18);
    transition: all 0.35s var(--ease-out);
}

.slide-indicadores .indicador.ativo {
    width: 28px;
    background: var(--gold);
}

.slide-acao {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: 0 var(--sp-3) var(--sp-7);
}

/* ═════════════════════════════════════════════════════════════════
 *  Botões compartilhados
 * ═════════════════════════════════════════════════════════════════ */

.btn-prim {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3);
    width: 100%;
    padding: var(--sp-4) var(--sp-5);
    background: var(--navy-900);
    color: white;
    font-family: var(--font-body);
    font-size: var(--fs-title-sm);
    font-weight: 600;
    border-radius: var(--r-lg);
    box-shadow: 0 6px 18px rgba(10, 31, 61, 0.30);
    transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background 0.18s var(--ease-out);
}

.btn-prim:hover:not(:disabled) {
    background: var(--navy-800);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(10, 31, 61, 0.40);
}

.btn-prim:active:not(:disabled) {
    transform: translateY(0);
}

.btn-prim:disabled {
    background: rgba(20, 35, 58, 0.28);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-prim .btn-icone {
    font-size: 18px;
    line-height: 1;
}

.btn-pular {
    color: var(--ink-soft);
    font-size: var(--fs-sm);
    padding: var(--sp-3);
    text-align: center;
    background: transparent;
    transition: color 0.18s var(--ease-out);
}

.btn-pular:hover { color: var(--navy-700); }

.btn-sec {
    color: var(--ink-soft);
    font-size: var(--fs-sm);
    padding: var(--sp-4);
    text-align: center;
    margin-top: var(--sp-2);
    transition: color 0.18s var(--ease-out);
}

.btn-sec:hover { color: var(--navy-700); }

/* ═════════════════════════════════════════════════════════════════
 *  TELA 2 — Onboarding
 * ═════════════════════════════════════════════════════════════════ */

.tela-onboarding {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
    animation: fadeIn 0.4s var(--ease-out);
}

/* Hero do onboarding */
.onb-hero {
    text-align: center;
    padding: var(--sp-7) var(--sp-5);
}

.onb-icone-wrap {
    width: 76px;
    height: 76px;
    margin: 0 auto var(--sp-4);
    color: var(--navy-700);
}

.onb-icone-wrap svg {
    width: 100%;
    height: 100%;
}

.onb-hero h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(24px, 5vw, 30px);
    color: var(--navy-900);
    margin-bottom: var(--sp-3);
}

.onb-lead {
    color: var(--ink-soft);
    font-size: var(--fs-body-md);
    line-height: var(--lh-relaxed);
    max-width: 440px;
    margin: 0 auto;
}

/* Card CRM */
.card-onb {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--sp-6) var(--sp-5);
    box-shadow: var(--shadow-sm);
}

.onb-label {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--navy-900);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-3);
}

.onb-label-icon {
    color: var(--gold-dark);
    font-size: 16px;
}

.crm-row {
    display: grid;
    grid-template-columns: 1fr 96px;
    gap: var(--sp-3);
}

.crm-row input,
.crm-row select {
    font-family: var(--font-body);
    font-size: var(--fs-title-sm);
    font-weight: 500;
    color: var(--ink);
    padding: var(--sp-4) var(--sp-4);
    background: var(--ivory);
    border: 1.5px solid rgba(20, 35, 58, 0.15);
    border-radius: var(--r-md);
    transition: border-color 0.18s var(--ease-out), background 0.18s var(--ease-out);
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

.crm-row input:focus,
.crm-row select:focus {
    outline: none;
    border-color: var(--navy-700);
    background: var(--paper);
}

.crm-row input.valido {
    border-color: var(--c-success);
    background: rgba(51, 179, 115, 0.06);
}

.crm-row select {
    background-image: linear-gradient(45deg, transparent 50%, var(--navy-700) 50%),
                      linear-gradient(135deg, var(--navy-700) 50%, transparent 50%);
    background-position: calc(100% - 18px) center, calc(100% - 13px) center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 30px;
    text-align: center;
}

.crm-feedback {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
    color: var(--c-success);
    font-size: var(--fs-sm);
    font-weight: 500;
}

.crm-feedback[hidden] {
    display: none !important;
}

/* Card LGPD */
.card-lgpd {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: var(--sp-6) var(--sp-5);
    box-shadow: var(--shadow-sm);
}

.lgpd-header {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}

.lgpd-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lgpd-icon-wrap svg {
    width: 24px;
    height: 24px;
}

.lgpd-header h2 {
    font-family: var(--font-display);
    font-size: var(--fs-title-md);
    color: var(--navy-900);
    margin-bottom: 2px;
}

.lgpd-subtitulo {
    font-size: var(--fs-sm);
    color: var(--navy-700);
    font-weight: 500;
}

.lgpd-intro {
    color: var(--ink-soft);
    font-size: var(--fs-body);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--sp-4);
}

.lgpd-itens {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--sp-4);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.lgpd-itens li {
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
    font-size: var(--fs-body);
    color: var(--ink-soft);
    line-height: var(--lh-base);
}

.lgpd-item-icone {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-top: 2px;
}

.lgpd-item-icone[data-tipo="lock"]    { background: var(--c-success); }
.lgpd-item-icone[data-tipo="check"]   { background: var(--c-primary); }
.lgpd-item-icone[data-tipo="exclude"] { background: var(--c-alert); }

.link-politica {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
    background: rgba(33, 103, 161, 0.08);
    color: var(--c-primary);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-bottom: var(--sp-4);
    text-decoration: none;
    transition: background 0.18s var(--ease-out);
}

.link-politica:hover {
    background: rgba(33, 103, 161, 0.14);
    color: var(--c-primary);
}

.link-politica span:nth-child(2) {
    flex: 1;
}

/* Checkbox LGPD */
.checkbox-lgpd {
    display: flex;
    gap: var(--sp-3);
    align-items: flex-start;
    padding: var(--sp-4);
    background: var(--ivory);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    cursor: pointer;
    margin-bottom: var(--sp-3);
    transition: background 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}

.checkbox-lgpd:hover {
    background: rgba(201, 169, 97, 0.06);
}

.checkbox-lgpd input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-visual {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: 1.5px solid rgba(20, 35, 58, 0.25);
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s var(--ease-out);
    margin-top: 2px;
}

.checkbox-visual::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.18s var(--ease-out);
}

.checkbox-lgpd input[type="checkbox"]:checked ~ .checkbox-visual {
    background: var(--c-success);
    border-color: var(--c-success);
}

.checkbox-lgpd input[type="checkbox"]:checked ~ .checkbox-visual::after {
    opacity: 1;
}

.checkbox-lgpd input[type="checkbox"]:checked ~ .checkbox-texto {
    color: var(--navy-900);
}

.checkbox-texto {
    flex: 1;
    font-size: var(--fs-sm);
    color: var(--ink);
    line-height: var(--lh-relaxed);
    font-weight: 500;
}

.lgpd-rodape {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--ink-soft);
    font-size: var(--fs-xs);
    line-height: var(--lh-relaxed);
}

/* ── Rodapé ──────────────────────────────────────────────────────── */
.rodape-mini {
    text-align: center;
    padding: var(--sp-5);
    color: var(--ink-soft);
    font-size: var(--fs-xs);
}

/* ── Animações ───────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideFade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsivo ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .paciente-main {
        padding: var(--sp-5) var(--sp-4);
    }

    .slide-icone-wrap {
        width: 100px;
        height: 100px;
    }

    .slide-icone-wrap svg {
        width: 54px;
        height: 54px;
    }

    .card-onb,
    .card-lgpd {
        padding: var(--sp-5) var(--sp-4);
    }
}
