:root {
    --primary: #0EA5E9; /* Light blue / Teal vibe for health */
    --primary-dark: #0284C7;
    --primary-light: #E0F2FE;
    --secondary: #10B981; /* Green for positive health metrics */
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --glass-bg: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
/* ===== Áreas seguras do iPhone (notch/Dynamic Island e barra home) =====
   O viewport-fit=cover estende o app até as bordas da tela; estas variáveis
   devolvem o recuo que o sistema exige (0 em qualquer outro aparelho).
   Fonte única: TODO elemento colado numa borda soma a variável correspondente.
   Sem isso, o header fica embaixo do relógio/sinal e o iOS engole o toque
   no hambúrguer (a faixa da barra de status pertence ao sistema). */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

.sidebar {
    width: 280px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px;
    /* Desce o conteúdo (logo) pra baixo da barra de status quando o menu
       abre em tela cheia no iPhone; no desktop as variáveis valem 0 */
    padding-top: calc(24px + var(--safe-top));
    padding-left: calc(24px + var(--safe-left));
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 48px;
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-links li {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links li[data-view]:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.nav-links li.active {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Rótulos de seção do menu */
.nav-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 16px 16px 4px;
    list-style: none;
    cursor: default;
}

/* Botão de ação principal da sidebar */
.sidebar-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 16px;
    margin-bottom: 8px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: filter 0.2s ease;
}

.sidebar-add-btn:hover {
    filter: brightness(1.08);
}

/* Cards de alerta do painel */
.alert-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    cursor: pointer;
    border: 1px solid transparent;
}

.alert-card i {
    font-size: 1.1rem;
    margin-top: 2px;
}

.alert-card strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.alert-card p {
    font-size: 0.9rem;
    margin: 0;
}

.alert-card.overdue {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #92400E;
}

.alert-card.attention {
    background: #FFF7ED;
    border-color: #FED7AA;
    color: #9A3412;
}

/* Estado vazio com chamada para ação */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state > i {
    font-size: 2.6rem;
    color: var(--primary);
    background: var(--primary-light);
    width: 88px;
    height: 88px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 24px;
}

/* Chip informativo com contraste AA (ex.: idade do perfil) */
.chip-info {
    font-size: 0.9rem;
    font-weight: 600;
    color: #075985;
    background: var(--primary-light);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-plan {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    background-color: var(--background);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 32px 48px 16px;
    /* Nunca por baixo da barra de status do iPhone (relógio/sinal/bateria) */
    padding-top: calc(32px + var(--safe-top));
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 5;
    border-bottom: 1px solid transparent; /* Can add border on scroll via JS if needed */
}

.top-bar-header {
    display: flex;
    align-items: center;
}

.btn-icon.mobile-menu-btn {
    display: none;
    margin-right: 16px;
}

.greeting h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.greeting p {
    color: var(--text-muted);
    font-size: 1rem;
}

.actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* View Container */
.view-container {
    padding: 24px 48px 48px;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Buttons */
.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Utility classes for views */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Responsive basics */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open { left: 0; }
    
    .nav-links li span, .user-info, .logo span { display: block; }
    .logo { justify-content: flex-start; margin-bottom: 32px; }
    .nav-links li { justify-content: flex-start; padding: 12px 16px; }
    
    /* Top Bar — mobile layout: Row 1 (Menu + Actions), Row 2 (Greeting) */
    .top-bar {
        padding: 12px 16px;
        /* Abaixo do relógio/sinal e fora da faixa onde o iOS captura o toque
           (era isso que deixava o hambúrguer "morto"); o vidro do header
           preenche o topo até a borda, com as laterais seguras em paisagem */
        padding-top: calc(12px + var(--safe-top));
        padding-left: calc(16px + var(--safe-left));
        padding-right: calc(16px + var(--safe-right));
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }
    .top-bar-header {
        display: contents;
    }
    .btn-icon.mobile-menu-btn {
        display: flex;
        flex-shrink: 0;
        order: 1;
    }
    .actions {
        flex-shrink: 0;
        gap: 8px;
        order: 2;
        flex: 1;
        justify-content: flex-end;
    }
    .greeting {
        order: 3;
        width: 100%;
    }
    .greeting h1 {
        font-size: 1.3rem;
        white-space: normal;
        overflow: visible;
    }
    .greeting p {
        font-size: 0.85rem;
        white-space: normal;
        overflow: visible;
    }
    .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .profile-select-btn {
        padding: 6px 10px 6px 6px;
        font-size: 0.82rem;
        gap: 8px;
    }
    .avatar-sm {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .view-container { padding: 12px 16px 48px; }
    .grid-cols-2, .grid-cols-3 { grid-template-columns: 1fr; }
    
    /* Responsive tables */
    .table-container, .card, .history-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table {
        min-width: 500px;
    }
    
    /* Cards */
    .card {
        padding: 16px;
        border-radius: 16px;
    }
    
    /* Responsive Modals */
    .modal-content {
        max-width: 95%;
        padding: 24px 16px;
    }

    /* Grids de configurações e formulários: 1 coluna no celular */
    .settings-grid {
        grid-template-columns: 1fr;
    }
    /* Impede que campos/labels "empurrem" a largura além da tela */
    .settings-grid > *,
    .settings-section,
    .settings-form-group {
        min-width: 0;
    }
    /* Nenhum campo pode estourar a largura da tela */
    input, select, textarea {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Mobile Menu Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9;
    animation: fadeIn 0.2s ease-out;
}
.mobile-overlay.show { display: block; }
/* Trava a rolagem do fundo enquanto o menu lateral está aberto no mobile */
body.menu-open { overflow: hidden; }

/* Profile Selector Styles */
.profile-selector-container {
    position: relative;
    font-family: inherit;
}

.profile-select-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px 8px 8px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-select-btn:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 260px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    overflow: hidden;
    animation: fadeIn 0.15s ease-out;
}

.profile-dropdown.show {
    display: block;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--text-main);
    transition: background-color 0.2s;
    font-family: inherit;
}

.profile-dropdown-item:hover {
    background-color: var(--primary-light);
}

.profile-dropdown-item.active {
    background-color: var(--background);
    font-weight: 600;
}

.profile-dropdown-divider {
    height: 1px;
    background-color: var(--border);
    margin: 4px 0;
}

.profile-dropdown-action {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--primary-dark);
    font-weight: 500;
    transition: background-color 0.2s;
    font-family: inherit;
    font-size: 0.9rem;
}

.profile-dropdown-action:hover {
    background-color: var(--primary-light);
}

/* Vaccine Tabs & Vaccine Specific UI */
.vaccines-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    gap: 8px;
}

.vaccines-tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.vaccines-tab-btn:hover {
    color: var(--primary);
}

.vaccines-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Vaccine Cards and Grid */
.vaccine-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    transition: all 0.2s ease;
}

.vaccine-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.vaccine-status-tag {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.status-applied {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.status-overdue {
    background-color: #FEE2E2;
    color: #991B1B;
}

.status-future {
    background-color: #F1F5F9;
    color: #475569;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    /* Modais nunca colados sob a barra de status / barra home do iPhone */
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUp 0.25s ease-out;
}

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

.modal-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-close-btn:hover {
    color: var(--text-main);
}

/* Dark Mode Variables */
body.dark-mode {
    --primary: #38BDF8;
    --primary-dark: #0EA5E9;
    --primary-light: #082F49;
    --secondary: #34D399;
    --background: #0F172A;
    --surface: #1E293B;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border: #334155;
    --glass-bg: rgba(30, 41, 59, 0.8);
}

body.dark-mode .sidebar {
    background-color: #1E293B;
    border-right: 1px solid var(--border);
}

body.dark-mode .top-bar {
    background-color: rgba(15, 23, 42, 0.8);
}

/* Settings Form Styles */
.settings-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
/* Layout principal de configurações: 2 colunas no desktop, 1 no celular */
.settings-layout { grid-template-columns: 2fr 1fr; }
@media (max-width: 768px) {
    .settings-grid,
    .settings-layout { grid-template-columns: 1fr; }
    .settings-grid > * { min-width: 0; }
}

.settings-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.settings-form-group input, .settings-form-group select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.settings-form-group input:focus, .settings-form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* =========================================
   Landing Page (Stunning & Premium Design)
   ========================================= */
.landing-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    color: var(--text-main);
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: 'Inter', sans-serif;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(0, 440px);
    gap: 48px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    margin-bottom: 40px;
}

/* O cartão de entrada é desenhado como a TELA de um celular: a moldura
   escura em volta diz "isto é um aplicativo" antes de qualquer texto.
   A moldura é feita com border + pseudo-elementos (nenhuma imagem), então
   escala sem perder nitidez e não pesa no carregamento. */
.landing-content {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 11px solid #0F172A;
    border-radius: 46px;
    box-shadow:
        0 0 0 2px #334155,                    /* aro metálico externo */
        0 30px 60px -18px rgba(15, 23, 42, .45),
        inset 0 0 0 1px rgba(255, 255, 255, .6);
    /* 430px mantém a proporção perto de 2:1 — abaixo disso o cartão deixa de
       ser lido como celular e vira só uma caixa de bordas grossas. */
    padding: 52px 26px 34px;
    max-width: 430px;
    width: 100%;
    margin: 26px auto 0;      /* afasta a ilha do cabeçalho fixo */
    text-align: center;
    animation: slideUpFade 0.8s ease-out;
}

/* Ilha dinâmica: a pílula preta no topo da tela. */
.landing-content::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 86px;
    height: 20px;
    background: #0F172A;
    border-radius: 14px;
    z-index: 3;
}

/* Barra de gesto: a risquinha na base, igual à do iPhone. */
.landing-content::after {
    content: '';
    position: absolute;
    bottom: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 108px;
    height: 4px;
    background: #CBD5E1;
    border-radius: 4px;
}

/* Botões físicos laterais — detalhe pequeno que "fecha" a leitura de aparelho. */
.landing-hero .landing-content .lp-btn-lateral {
    position: absolute;
    left: -15px;
    width: 4px;
    background: #1E293B;
    border-radius: 4px 0 0 4px;
}
.lp-btn-lateral.b1 { top: 96px;  height: 30px; }
.lp-btn-lateral.b2 { top: 136px; height: 52px; }
.lp-btn-lateral.b3 { top: 198px; height: 52px; }

/* ===== Hero visual: exames voando para dentro do celular ===== */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    animation: slideUpFade 0.8s ease-out;
}

.hero-phone {
    position: relative;
    width: 250px;
    background: #0F172A;
    border-radius: 36px;
    padding: 12px;
    box-shadow: 0 25px 50px -12px rgba(2, 132, 199, 0.35);
    z-index: 2;
}

.hero-phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #0F172A;
    border-radius: 0 0 14px 14px;
    z-index: 3;
}

.hero-phone-screen {
    background: var(--background);
    border-radius: 26px;
    padding: 34px 14px 18px;
    overflow: hidden;
}

.hp-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.hp-greet {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

.hp-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.hp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 8px;
}

.hp-ico {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.hp-txt {
    min-width: 0;
    flex: 1;
    text-align: left;
}

.hp-txt strong {
    display: block;
    font-size: 0.66rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-txt small {
    font-size: 0.58rem;
    color: var(--text-muted);
}

.hp-pill {
    font-size: 0.55rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 999px;
    flex-shrink: 0;
}

.hp-pill.ok   { background: #D1FAE5; color: #065F46; }
.hp-pill.warn { background: #FEF3C7; color: #92400E; }
.hp-pill.new  { background: var(--primary); color: #fff; }

.hp-row-new {
    border-color: var(--primary);
    animation: hpArrive 9s ease-in-out infinite;
}

@keyframes hpArrive {
    0%, 18%  { opacity: 0; transform: translateY(8px) scale(0.96); }
    24%, 88% { opacity: 1; transform: translateY(0) scale(1); }
    96%, 100%{ opacity: 0; transform: translateY(8px) scale(0.96); }
}

/* Documentos soltos que voam para dentro do celular */
.hero-doc {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px 13px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    /* Acima do celular (z-index:2): os documentos "voam para dentro do app",
       então flutuam na frente do aparelho — o frame não pode cobri-los. */
    z-index: 5;
    opacity: 0;
    animation: flyIn 9s ease-in-out infinite;
}

.hero-doc i { color: var(--primary); font-size: 0.9rem; }
.hero-doc-1 i { color: #DC2626; }
.hero-doc-4 i { color: #D97706; }

.hero-doc-1 { top: 8%;  left: 4%;   animation-delay: 0s;    --tx: 130px; --ty: 190px; }
.hero-doc-2 { top: 34%; left: -2%;  animation-delay: 2.2s;  --tx: 140px; --ty: 90px;  }
.hero-doc-3 { top: 66%; left: 2%;   animation-delay: 4.4s;  --tx: 130px; --ty: -60px; }
.hero-doc-4 { top: 88%; left: 6%;   animation-delay: 6.6s;  --tx: 120px; --ty: -180px; }

@keyframes flyIn {
    0%       { opacity: 0; transform: translate(0, 0) scale(1) rotate(-3deg); }
    6%, 14%  { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
    26%      { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.25) rotate(4deg); }
    27%, 100%{ opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.25); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-doc { animation: none; opacity: 0.9; }
    .hp-row-new { animation: none; opacity: 1; }
}

@media (max-width: 900px) {
    .landing-hero {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    /* Com o cartão de entrada já desenhado como celular, o mockup abaixo
       repetia o mesmo objeto e só empurrava o resto da página para baixo.
       No desktop os dois convivem lado a lado (entrada + app em uso). */
    .hero-visual { display: none; }
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

.landing-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 24px;
}

.landing-logo i {
    font-size: 2.8rem;
    color: var(--primary);
    filter: drop-shadow(0 4px 6px rgba(14, 165, 233, 0.3));
}

.landing-content h1 {
    font-size: 2.4rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.landing-content p {
    /* 1rem (era 1.1) faz a proposta de valor fechar em 3 linhas dentro da
       moldura de 430px — a 1.1rem sobrava uma quarta linha com duas palavras.
       text-wrap: balance distribui as linhas por igual em vez de deixar a
       última quase vazia (ignorado por navegadores antigos, sem prejuízo). */
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 40px;
    text-wrap: balance;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Aviso legal discreto do rodapé do formulário. Substituiu o checkbox
   obrigatório, que era a primeira coisa que a pessoa lia ao chegar. */
.auth-legal {
    font-size: 0.74rem;
    line-height: 1.5;
    color: var(--text-muted, #94A3B8);
    text-align: center;
    margin-top: 14px;
}

.auth-legal a {
    color: var(--text-secondary, #64748B);
    text-decoration: underline;
}

.btn-google {
    background-color: #FFFFFF;
    color: #333333;
    border: 1px solid #D1D5DB;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    justify-content: center;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 14px 20px;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background-color: #F9FAFB;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 10px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span {
    padding: 0 12px;
    background: transparent;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    background: rgba(255,255,255,0.7);
}

.email-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
    background: #FFFFFF;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    width: 100%;
    animation: slideUpFade 1s ease-out 0.2s both;
}

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    background: var(--primary-light);
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .landing-content {
        /* mantém os 52px de topo da moldura: é o espaço onde vive a ilha */
        padding: 52px 20px 34px;
    }

    .landing-content h1 {
        font-size: 2rem;
    }

    /* Na largura de um celular a moldura fica com ~335px e o subtítulo
       chegava a 5 linhas. 0.95rem devolve uma linha sem prejudicar a
       leitura (0.9rem dava o mesmo resultado com fonte menor à toa). */
    .landing-content p {
        font-size: 0.95rem;
    }

    .landing-features {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Intro.js Tour – Custom Premium Overrides
   ========================================= */

/* Tooltip container */
.introjs-tooltip {
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    padding: 20px 24px 20px !important;
    max-width: 340px !important;
    min-width: 280px !important;
    font-family: 'Inter', sans-serif !important;
    border: 1px solid rgba(14, 165, 233, 0.12) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    animation: tourSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
}

@keyframes tourSlideIn {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Tooltip text */
.introjs-tooltiptext {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #334155 !important;
    padding: 0 30px 12px 0 !important;
}

/* Arrow */
.introjs-arrow {
    border: none !important;
}
.introjs-arrow.top {
    border-bottom-color: rgba(255, 255, 255, 0.96) !important;
    border-bottom-style: solid !important;
    border-bottom-width: 10px !important;
    border-left: 10px solid transparent !important;
    border-right: 10px solid transparent !important;
}
.introjs-arrow.bottom {
    border-top-color: rgba(255, 255, 255, 0.96) !important;
    border-top-style: solid !important;
    border-top-width: 10px !important;
    border-left: 10px solid transparent !important;
    border-right: 10px solid transparent !important;
}
.introjs-arrow.left {
    border-right-color: rgba(255, 255, 255, 0.96) !important;
    border-right-style: solid !important;
    border-right-width: 10px !important;
    border-top: 10px solid transparent !important;
    border-bottom: 10px solid transparent !important;
}
.introjs-arrow.right {
    border-left-color: rgba(255, 255, 255, 0.96) !important;
    border-left-style: solid !important;
    border-left-width: 10px !important;
    border-top: 10px solid transparent !important;
    border-bottom: 10px solid transparent !important;
}

/* Skip / close button — compact × in the top-right */
.introjs-skipbutton {
    position: absolute !important;
    top: 8px !important;
    right: 10px !important;
    font-size: 1.2rem !important;
    color: #94A3B8 !important;
    font-weight: 300 !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
    line-height: 28px !important;
    text-align: center !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.introjs-skipbutton:hover {
    color: #475569 !important;
    background: #F1F5F9 !important;
}

/* Button row */
.introjs-tooltipbuttons {
    border-top: 1px solid #F1F5F9 !important;
    padding: 14px 0 0 !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

/* All buttons base */
.introjs-button {
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 22px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-shadow: none !important;
    box-shadow: none !important;
    outline: none !important;
    letter-spacing: 0.01em !important;
}

/* "Anterior" / Previous */
.introjs-prevbutton {
    background: #F1F5F9 !important;
    color: #475569 !important;
}
.introjs-prevbutton:hover {
    background: #E2E8F0 !important;
    color: #1E293B !important;
    transform: translateX(-2px) !important;
}

/* "Próximo" / Next & "Começar!" / Done */
.introjs-nextbutton,
.introjs-donebutton {
    background: linear-gradient(135deg, #0EA5E9, #0284C7) !important;
    color: #FFFFFF !important;
}
.introjs-nextbutton:hover,
.introjs-donebutton:hover {
    background: linear-gradient(135deg, #0284C7, #0369A1) !important;
    transform: translateX(2px) !important;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35) !important;
}
.introjs-nextbutton:active,
.introjs-donebutton:active {
    transform: scale(0.97) !important;
}

/* Disabled state */
.introjs-disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}
.introjs-disabled:hover {
    transform: none !important;
}

/* Progress bar */
.introjs-progressbar {
    background: linear-gradient(90deg, #0EA5E9, #10B981) !important;
    border-radius: 999px !important;
    height: 4px !important;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.introjs-progress {
    background: #F1F5F9 !important;
    border-radius: 999px !important;
    height: 4px !important;
    margin: 0 0 6px 0 !important;
}

/* Step bullets / dots */
.introjs-bullets {
    text-align: center !important;
    padding: 8px 0 4px !important;
}
.introjs-bullets ul {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.introjs-bullets ul li {
    display: inline-block !important;
}
.introjs-bullets ul li a {
    display: block !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: #CBD5E1 !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    font-size: 0 !important;
    cursor: pointer !important;
    border: none !important;
}
.introjs-bullets ul li a:hover {
    background: #94A3B8 !important;
    transform: scale(1.2) !important;
}
.introjs-bullets ul li a.active {
    background: linear-gradient(135deg, #0EA5E9, #0284C7) !important;
    width: 24px !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4) !important;
}

/* Highlighted element ring */
.introjs-helperLayer {
    border-radius: 16px !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.25), 0 0 0 5000px rgba(15, 23, 42, 0.55) !important;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Overlay */
.introjs-overlay {
    background: rgba(15, 23, 42, 0.55) !important;
    transition: opacity 0.4s ease !important;
}

/* Helper number badge (step indicator) */
.introjs-helperNumberLayer {
    display: none !important;
}

/* ---- Tour Mobile Responsive ---- */
@media (max-width: 768px) {
    /* Force tooltip to center on mobile instead of floating next to element */
    .introjs-tooltip {
        position: fixed !important;
        top: auto !important;
        bottom: 16px !important;
        left: 16px !important;
        right: 16px !important;
        max-width: none !important;
        width: calc(100vw - 32px) !important;
        min-width: unset !important;
        margin: 0 !important;
        padding: 24px 20px 16px !important;
        border-radius: 20px !important;
        font-size: 0.9rem !important;
        z-index: 10000001 !important;
        transform: none !important;
    }

    /* Hide arrow on mobile since tooltip is fixed at bottom */
    .introjs-tooltip .introjs-arrow {
        display: none !important;
    }

    .introjs-tooltiptext {
        font-size: 0.9rem !important;
        padding: 0 0 12px 0 !important;
    }

    .introjs-tooltipbuttons {
        padding: 12px 0 0 !important;
        gap: 8px !important;
    }

    .introjs-button {
        padding: 10px 18px !important;
        font-size: 0.85rem !important;
        border-radius: 10px !important;
    }

    .introjs-helperLayer {
        border-radius: 12px !important;
    }
}

/* =========================================
   Import Modal — Document Import UI
   ========================================= */

/* Source Selector */
.import-source-selector {
    margin-bottom: 4px;
}

.import-source-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted, #64748B);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.import-source-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.import-source-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 16px;
    background: var(--background, #F8FAFC);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
}

.import-source-btn:hover {
    border-color: var(--primary, #0EA5E9);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.import-source-btn:active {
    transform: translateY(0);
}

.import-source-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.import-source-btn span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main, #0F172A);
}

.import-source-btn small {
    font-size: 0.75rem;
    color: var(--text-muted, #94A3B8);
    font-weight: 400;
}

/* Privacy note */
.import-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.import-privacy-note i {
    color: #059669;
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.import-privacy-note span {
    font-size: 0.82rem;
    color: #065F46;
    line-height: 1.5;
}

.import-privacy-note strong {
    color: #047857;
}

/* Cloud badge */
.import-cloud-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    width: fit-content;
}

.import-cloud-badge i {
    font-size: 1rem;
}

.import-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(20px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.import-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.import-modal-content {
    position: relative;
    background: var(--surface, #FFFFFF);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.import-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid var(--border, #E2E8F0);
}

.import-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main, #0F172A);
    display: flex;
    align-items: center;
    gap: 10px;
}

.import-modal-header h2 i {
    color: var(--primary, #0EA5E9);
}

.import-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-muted, #64748B);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.import-modal-close:hover {
    background: var(--primary-light, #E0F2FE);
    color: var(--primary, #0EA5E9);
}

.import-modal-body {
    padding: 24px 28px;
}

/* Dropzone */
.import-dropzone {
    border: 2px dashed var(--border, #E2E8F0);
    border-radius: 16px;
    min-height: 160px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
    overflow: hidden;
    background: var(--background, #F8FAFC);
}

.import-dropzone:hover {
    border-color: var(--primary, #0EA5E9);
    background: var(--primary-light, #E0F2FE);
}

.import-dropzone.drag-over {
    border-color: var(--primary, #0EA5E9);
    background: var(--primary-light, #E0F2FE);
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.import-dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.import-dropzone-empty i {
    font-size: 2.5rem;
    color: var(--primary, #0EA5E9);
    margin-bottom: 14px;
    opacity: 0.7;
}

.import-dropzone-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main, #0F172A);
    margin-bottom: 4px;
}

.import-dropzone-sub {
    font-size: 0.9rem;
    color: var(--text-muted, #64748B);
    margin-bottom: 16px;
}

.import-dropzone-formats {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.import-dropzone-formats span {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary, #0EA5E9);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.05em;
}

/* Preview */
.import-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 12px;
}

.import-preview img {
    max-height: 180px;
    max-width: 100%;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.import-preview-pdf {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: #FEF2F2;
    border-radius: 12px;
    width: 100%;
}

.import-preview-pdf i {
    font-size: 2rem;
    color: #EF4444;
}

.import-preview-pdf span {
    font-weight: 600;
    color: var(--text-main, #0F172A);
    word-break: break-all;
    font-size: 0.95rem;
}

.import-preview-change {
    background: var(--primary-light, #E0F2FE);
    color: var(--primary, #0EA5E9);
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.import-preview-change:hover {
    background: var(--primary, #0EA5E9);
    color: white;
}

/* Gift Banner (Referral Button) */
.gift-banner {
    margin: 15px 20px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}

.gift-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.gift-banner i {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

.gift-banner .gift-text {
    display: flex;
    flex-direction: column;
}

.gift-banner .gift-text strong {
    font-size: 0.85rem;
    font-weight: 700;
}

.gift-banner .gift-text span {
    font-size: 0.7rem;
    opacity: 0.9;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);}
    60% {transform: translateY(-3px);}
}

/* Fields */
.import-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.import-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #64748B);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.import-field input,
.import-field select,
.import-field textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border, #E2E8F0);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-main, #0F172A);
    background: var(--background, #F8FAFC);
    transition: all 0.2s;
}

.import-field input:focus,
.import-field select:focus,
.import-field textarea:focus {
    outline: none;
    border-color: var(--primary, #0EA5E9);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
    background: white;
}

.import-field textarea {
    resize: vertical;
    min-height: 60px;
}

.import-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Status pills */
.import-status-pills {
    display: flex;
    gap: 8px;
}

.import-pill {
    flex: 1;
    padding: 10px 8px;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 10px;
    background: var(--background, #F8FAFC);
    color: var(--text-muted, #64748B);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.import-pill:hover {
    border-color: var(--primary, #0EA5E9);
    color: var(--primary, #0EA5E9);
}

.import-pill.active[data-status="Normal"] {
    background: #ECFDF5;
    border-color: #10B981;
    color: #059669;
}

.import-pill.active[data-status="Atenção"] {
    background: #FFFBEB;
    border-color: #F59E0B;
    color: #D97706;
}

.import-pill.active[data-status="Alterado"] {
    background: #FEF2F2;
    border-color: #EF4444;
    color: #DC2626;
}

/* Footer */
.import-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 28px 24px;
    border-top: 1px solid var(--border, #E2E8F0);
}

.btn-import-cancel {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    background: var(--background, #F1F5F9);
    color: var(--text-muted, #64748B);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-import-cancel:hover {
    background: #E2E8F0;
    color: var(--text-main, #0F172A);
}

.btn-import-save {
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #0EA5E9, #0284C7);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-import-save:hover:not(:disabled) {
    background: linear-gradient(135deg, #0284C7, #0369A1);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
    transform: translateY(-1px);
}

.btn-import-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast notification */
.import-toast {
    position: fixed;
    bottom: calc(30px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #0F172A;
    color: white;
    padding: 14px 28px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.import-toast i {
    color: #10B981;
    font-size: 1.1rem;
}

.import-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =========================================
   Timeline (Dashboard)
   ========================================= */
.timeline {
    position: relative;
    padding-left: 24px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.timeline-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -25px; /* (24px padding + 1px center offset) */
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 1px var(--border);
    z-index: 1;
}

.timeline-item:hover .timeline-marker {
    background: var(--secondary);
    box-shadow: 0 0 0 1px var(--secondary);
}

.timeline-date {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-type {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =========================================
   Imaging Gallery
   ========================================= */
.imaging-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.imaging-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.imaging-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}

.imaging-preview {
    height: 160px;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.imaging-preview img, .imaging-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imaging-preview .play-icon {
    position: absolute;
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    opacity: 0.9;
}

.imaging-preview-fallback {
    font-size: 3rem;
    color: var(--primary-light);
}

.imaging-info {
    padding: 16px;
}

.imaging-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.imaging-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---- Import Modal Mobile ---- */
@media (max-width: 768px) {
    .import-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .import-modal-content {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        max-height: 95vh;
        animation: slideUpModalMobile 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    @keyframes slideUpModalMobile {
        from { opacity: 0; transform: translateY(100%); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .import-modal-header {
        padding: 20px 20px 14px;
    }
    
    .import-modal-body {
        padding: 16px 20px;
    }
    
    .import-modal-footer {
        padding: 14px 20px 20px;
    }
    
    .import-field-row {
        grid-template-columns: 1fr;
    }
    
    .import-dropzone-empty {
        padding: 30px 16px;
    }
    
    .import-toast {
        bottom: calc(16px + var(--safe-bottom));
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(20px);
    }
    
    .import-toast.show {
        transform: translateX(0) translateY(0);
    }
    
    .import-source-grid {
        gap: 10px;
    }
    
    .import-source-btn {
        padding: 16px 10px;
        gap: 6px;
    }
    
    .import-source-icon {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
    
    .import-source-btn span {
        font-size: 0.82rem;
    }
    
    .import-source-btn small {
        font-size: 0.7rem;
    }
    
    .import-privacy-note {
        padding: 12px 14px;
    }
    
    .import-privacy-note span {
        font-size: 0.78rem;
    }
}

/* =========================================
   Global Toast System
   ========================================= */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #0F172A;
    color: white;
    padding: 14px 28px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100001; /* Acima do modal */
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.toast.show {
    bottom: calc(40px + var(--safe-bottom));
    opacity: 1;
}

.toast.success i { color: #10B981; }
.toast.error i { color: #EF4444; }
.toast.info i { color: #3B82F6; }

/* =========================================
   Referral Modal (Flow Style)
   ========================================= */
.referral-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.referral-modal {
    background: white;
    width: 90%;
    max-width: 480px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
    position: relative;
    animation: importModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.referral-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
}

.referral-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.referral-banner {
    background: #FEF3C7; /* Soft yellow */
    color: #92400E; /* Dark yellow/brown text */
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.referral-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    padding: 0 12px;
}

.ref-tab {
    background: none;
    border: none;
    padding: 16px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.ref-tab.active {
    color: var(--text-dark);
    border-bottom-color: var(--text-dark);
}

.ref-tab:hover:not(.active) {
    color: var(--text-dark);
}

.referral-content {
    padding: 24px;
    background: #FAFAFA;
}

/* The Gift Card */
.referral-card {
    background: linear-gradient(135deg, #047857 0%, #064E3B 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 10px 15px -3px rgba(4, 120, 87, 0.3);
}

.referral-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><path d="M0 20 Q 50 50, 100 20 T 200 20 T 300 20 T 400 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>') no-repeat;
    background-size: cover;
    pointer-events: none;
}

.ref-card-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.ref-card-logo span {
    background: white;
    color: #064E3B;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.ref-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.ref-card-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.ref-how-it-works {
    margin-bottom: 24px;
}

.ref-how-it-works h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ref-how-it-works ul {
    list-style: none;
}

.ref-how-it-works li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.ref-how-it-works li i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.ref-inputs {
    display: flex;
    flex-direction: column;
}

.ref-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.ref-copy-wrapper {
    display: flex;
    gap: 8px;
}

.ref-copy-wrapper input {
    flex: 1;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
}

.ref-copy-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-ref-action {
    background: #E2E8F0;
    color: #475569;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ref-action:hover {
    background: #CBD5E1;
}

.btn-ref-action.dark {
    background: #0F172A;
    color: white;
}

.btn-ref-action.dark:hover {
    background: #1E293B;
}

@media (max-width: 768px) {
    .referral-modal {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
        animation: importModalInMobile 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .referral-content {
        flex: 1;
        overflow-y: auto;
    }
}

/* Mobile Bottom Navigation */
.bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Main Content gets padding to avoid being hidden by the fixed bottom nav */
    .main-content {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: var(--surface);
        border-top: 1px solid var(--border);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        z-index: 100;
        justify-content: space-around;
        /* env() real em vez de 16px fixo: no iPhone com barra home (~34px) o
           padding fixo deixava os ícones NA zona do gesto de home — tocar em
           "Adicionar" ativava o home em vez do botão. Agora a barra sobe acima
           da área reservada e os alvos ficam 100% tocáveis. Precisa do
           viewport-fit=cover no <meta viewport>, que foi adicionado junto. */
        padding: 8px var(--safe-right) calc(8px + env(safe-area-inset-bottom, 8px)) var(--safe-left);
    }
    
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-muted);
        gap: 4px;
        flex: 1;
        transition: all 0.2s ease;
    }
    
    .bottom-nav-item i {
        font-size: 1.25rem;
    }
    
    .bottom-nav-item span {
        font-size: 0.7rem;
        font-weight: 500;
    }
    
    .bottom-nav-item.active {
        color: var(--primary);
    }
    
    /* Make the middle button stand out */
    .bottom-nav-item:nth-child(2) {
        color: var(--primary);
        transform: translateY(-8px);
    }
    
    .bottom-nav-item:nth-child(2) i {
        font-size: 2rem;
        background: var(--primary);
        color: white;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    }
    
    /* Hide some sidebar links to prefer bottom nav */
    .sidebar {
        z-index: 101; /* Above bottom nav */
    }
}

/* ---------- Banner de instalação (PWA) ---------- */
#pwa-install-banner {
    position: fixed;
    z-index: 4000;
    left: 12px;
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: #0F172A;
    color: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    box-shadow: 0 12px 34px rgba(0,0,0,0.28);
    font-size: 14px;
    animation: pwaUp .3s ease;
}
@keyframes pwaUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
#pwa-install-banner .pwa-b-txt { line-height: 1.35; }
#pwa-install-banner .pwa-b-ic { margin-right: 3px; }
#pwa-install-banner .pwa-b-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
#pwa-install-banner .pwa-b-actions > button:first-child {
    background: #0EA5E9; color: #fff; border: none;
    padding: 10px 18px; border-radius: 9px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 14px;
}
#pwa-install-banner .pwa-b-x { background: transparent; color: #94A3B8; border: none; font-size: 15px; cursor: pointer; padding: 8px; line-height: 1; }
@media (min-width: 768px) { #pwa-install-banner { left: auto; max-width: 440px; bottom: 20px; right: 20px; } }
@media (max-width: 767px) { #pwa-install-banner { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* ==========================================================================
   LANDING — funil de vendas, privacidade/LGPD e rodapé
   Prefixo lp- para não colidir com o resto do app.
   ========================================================================== */
.lp-sec { padding: 72px 20px; background: var(--surface, #fff); }
.lp-sec-alt { background: #F8FAFC; }
.lp-wrap { max-width: 1080px; margin: 0 auto; }
.lp-wrap-estreito { max-width: 760px; margin: 0 auto; }
.lp-tag {
    display: inline-block; font-size: 0.75rem; font-weight: 800; letter-spacing: 1.2px;
    text-transform: uppercase; color: var(--primary, #0EA5E9);
    background: rgba(14,165,233,.1); padding: 6px 14px; border-radius: 20px; margin-bottom: 16px;
}
.lp-h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 800; line-height: 1.2; color: #0F172A; margin-bottom: 12px; letter-spacing: -0.5px; }
.lp-sub { font-size: 1.02rem; color: #64748B; line-height: 1.6; max-width: 640px; margin-bottom: 36px; }

/* Passos */
.lp-passos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 36px; }
.lp-passo { position: relative; padding-top: 8px; }

/* Moldura idêntica nos três: é ela que costura a foto do passo 1 com as
   telas dos passos 2 e 3, para os três lerem como uma sequência só. */
.lp-passo { text-align: center; }
.lp-passo-fig {
    aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden;
    border: 1px solid #E2E8F0; background: #F1F5F9; margin-bottom: 0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}
.lp-passo-fig img, .lp-passo-fig svg { display: block; width: 100%; height: 100%; object-fit: cover; }

/* A bolinha numerada fica centralizada, montada sobre a borda de baixo da
   foto (metade dentro, metade fora) — o anel branco a destaca da imagem. */
.lp-passo-marco { position: relative; display: flex; justify-content: center; margin: -23px 0 10px; }
.lp-num {
    width: 40px; height: 40px; border-radius: 50%; background: var(--primary, #0EA5E9); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem;
    flex-shrink: 0; position: relative; z-index: 1;
    border: 3px solid #fff; box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
}
/* Linha 1→2 e 2→3: de centro a centro das bolinhas, atravessando o gap.
   Tracejada porque o que ela representa é passagem de tempo, não um trilho. */
.lp-passo:not(:last-child) .lp-passo-marco::after {
    content: ''; position: absolute; top: 50%; left: calc(50% + 29px);
    width: calc(100% - 30px); height: 2px; transform: translateY(-1px);
    background-image: linear-gradient(to right, #BAE6FD 0 7px, transparent 7px 14px);
    background-size: 14px 2px; background-repeat: repeat-x;
}
.lp-passo h3 { font-size: 1.12rem; font-weight: 700; color: #0F172A; margin-bottom: 6px; }
.lp-passo p { font-size: 0.94rem; color: #64748B; line-height: 1.55; }

@media (max-width: 860px) {
    .lp-passos { grid-template-columns: 1fr; gap: 40px; }
    /* Empilhado, a linha horizontal não faz sentido: vira um trecho vertical
       no vão entre um passo e o outro, alinhado ao centro da bolinha. Cruzar
       o texto para ligar bolinha com bolinha seria pior do que não ligar. */
    .lp-passo:not(:last-child) .lp-passo-marco::after { display: none; }
    /* Contínua e com as pontas esmaecidas: no vão curto do empilhado, um
       tracejado só caberia em duas marquinhas e passaria por defeito.
       left 50%: acompanha a bolinha, que agora é centralizada. */
    .lp-passo:not(:last-child)::after {
        content: ''; position: absolute; bottom: -36px; left: 50%; margin-left: -1px;
        width: 2px; height: 32px; border-radius: 1px;
        background: linear-gradient(to bottom, rgba(125,211,252,0), #7DD3FC 45%, #7DD3FC 55%, rgba(125,211,252,0));
    }
}

/* Cards de recurso */
.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.lp-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 24px; transition: transform .2s ease, box-shadow .2s ease; }
.lp-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,42,.08); }
.lp-card i { font-size: 1.5rem; color: var(--primary, #0EA5E9); margin-bottom: 12px; display: block; }
.lp-card h3 { font-size: 1.05rem; font-weight: 700; color: #0F172A; margin-bottom: 6px; }
.lp-card p { font-size: 0.92rem; color: #64748B; line-height: 1.55; }

/* Planos */
.lp-planos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; align-items: start; margin-top: 32px; }
.lp-plano { background: #fff; border: 1px solid #E2E8F0; border-radius: 18px; padding: 28px 24px; position: relative; }
.lp-plano-destaque { border: 2px solid var(--primary, #0EA5E9); box-shadow: 0 16px 40px rgba(14,165,233,.14); }
.lp-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--primary, #0EA5E9); color: #fff; font-size: 0.72rem; font-weight: 800;
    padding: 5px 14px; border-radius: 20px; letter-spacing: .4px; white-space: nowrap;
}
.lp-plano-nome { font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #64748B; margin-bottom: 8px; }
.lp-plano-preco { font-size: 2.1rem; font-weight: 800; color: #0F172A; line-height: 1.1; margin-bottom: 20px; }
.lp-plano-preco span { display: block; font-size: 0.82rem; font-weight: 500; color: #64748B; margin-top: 6px; }
.lp-lista { list-style: none; padding: 0; margin: 0 0 24px; }
.lp-lista li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; color: #334155; margin-bottom: 10px; line-height: 1.45; }
.lp-lista i { color: #22C55E; margin-top: 3px; flex-shrink: 0; }
.lp-btn {
    width: 100%; padding: 14px 20px; border-radius: 10px; border: none; cursor: pointer;
    background: var(--primary, #0EA5E9); color: #fff; font-weight: 700; font-size: 0.98rem;
    font-family: inherit; transition: filter .2s ease;
}
.lp-btn:hover { filter: brightness(1.08); }
.lp-btn-ghost { background: #fff; color: var(--primary, #0EA5E9); border: 1.5px solid var(--primary, #0EA5E9); }
.lp-btn-grande { width: auto; padding: 16px 40px; font-size: 1.05rem; }
.lp-nota { font-size: 0.78rem; color: #94A3B8; text-align: center; margin-top: 10px; }

/* Coração da marca no centro do QR real (tela de compartilhamento) */
.qr-logo {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 34px; height: 34px; background: #fff; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px #fff;
}
.qr-logo svg { display: block; }

/* Lembrete de fim do teste grátis (dashboard) */
.trial-banner {
    display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
    padding: 14px 40px 14px 16px; border-radius: 12px;
    background: linear-gradient(135deg, #E0F2FE, #F0F9FF);
    border: 1px solid #BAE6FD; position: relative;
}
.trial-banner .tb-ic { font-size: 1.4rem; color: #0284C7; flex-shrink: 0; }
.trial-banner-txt { flex: 1; min-width: 0; }
.trial-banner-txt strong { display: block; color: #0F172A; font-size: 0.95rem; margin-bottom: 2px; }
.trial-banner-txt span { color: #475569; font-size: 0.85rem; line-height: 1.4; }
.trial-banner-cta {
    background: var(--primary, #0EA5E9); color: #fff; border: none; cursor: pointer;
    padding: 10px 16px; border-radius: 8px; font-weight: 700; font-size: 0.85rem;
    font-family: inherit; white-space: nowrap; transition: filter .2s ease;
}
.trial-banner-cta:hover { filter: brightness(1.08); }
.trial-banner-x {
    position: absolute; top: 8px; right: 10px; background: none; border: none;
    color: #64748B; cursor: pointer; font-size: 0.9rem; padding: 4px;
}
body.dark-mode .trial-banner { background: linear-gradient(135deg, #0C2A3D, #0F2233); border-color: #164E63; }
body.dark-mode .trial-banner-txt strong { color: #F1F5F9; }
body.dark-mode .trial-banner-txt span { color: #94A3B8; }
@media (max-width: 640px) {
    .trial-banner { flex-wrap: wrap; }
    .trial-banner-cta { width: 100%; }
}

/* Compartilhar com o médico (landing) */
.lp-medico { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: center; }
.lp-medico .lp-sub { margin-bottom: 24px; }
.lp-medico-lista { margin-bottom: 0; }
.lp-medico-visual { display: flex; justify-content: center; }
.lp-share-mock {
    width: min(300px, 100%); background: #fff; border: 1px solid #E2E8F0; border-radius: 18px;
    padding: 20px; box-shadow: 0 18px 44px -18px rgba(15, 23, 42, .25);
}
.lp-share-mock-head { font-size: 0.9rem; font-weight: 700; color: #0F172A; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.lp-share-mock-head i { color: var(--primary, #0EA5E9); }
.lp-share-mock-chips { display: flex; gap: 6px; margin-bottom: 16px; }
.lp-share-mock-chips span {
    flex: 1; text-align: center; font-size: 0.72rem; font-weight: 700; padding: 6px 4px;
    border-radius: 999px; border: 1.5px solid #E2E8F0; color: #64748B; white-space: nowrap;
}
.lp-share-mock-chips span.on { border-color: var(--primary, #0EA5E9); background: #E0F2FE; color: #0284C7; }
.lp-share-mock-qr {
    height: 120px; border-radius: 12px; background: #F8FAFC; border: 1px dashed #CBD5E1;
    display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.lp-share-mock-qrimg { width: 98px; height: 98px; display: block; }
.lp-share-mock-link {
    font-size: 0.75rem; color: #64748B; background: #F8FAFC; border: 1px solid #E2E8F0;
    border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden;
}
.lp-share-mock-btn {
    background: #22C55E; color: #fff; font-size: 0.85rem; font-weight: 700; text-align: center;
    padding: 11px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
@media (max-width: 860px) {
    .lp-medico { grid-template-columns: 1fr; gap: 30px; }
}

/* Chips de período — tela de compartilhamento com o médico (app) */
.share-chips { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.share-chip {
    flex: 1; min-width: 96px; padding: 8px 10px; border-radius: 999px;
    border: 1.5px solid var(--border, #E2E8F0); background: var(--surface, #fff);
    color: var(--text-muted, #64748B); font-size: 0.82rem; font-weight: 600;
    font-family: inherit; cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.share-chip.on {
    border-color: var(--primary, #0EA5E9); background: var(--primary-light, #E0F2FE);
    color: var(--primary-dark, #0284C7);
}

/* Privacidade (faixa escura) */
.lp-sec-escura { background: #0F172A; }
.lp-h2-claro { color: #F1F5F9; }
.lp-sub-claro { color: #94A3B8; }
.lp-tag-claro { color: #7DD3FC; background: rgba(125,211,252,.12); }
/* Mínimo 290px: com 6 cartões o desktop fecha em 3x2 simétrico.
   Nos 230px antigos cabiam 4 colunas e a grade quebrava em 4+2. */
.lp-priv { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; margin-top: 30px; }
.lp-priv-item i { font-size: 1.35rem; color: #7DD3FC; margin-bottom: 10px; display: block; }
.lp-priv-item h3 { font-size: 1rem; font-weight: 700; color: #F1F5F9; margin-bottom: 6px; }
.lp-priv-item p { font-size: 0.9rem; color: #94A3B8; line-height: 1.55; }
.lp-priv-links { margin-top: 32px; font-size: 0.9rem; color: #64748B; }
.lp-priv-links a { color: #7DD3FC; text-decoration: none; font-weight: 600; }
.lp-priv-links a:hover { text-decoration: underline; }
.lp-priv-links span { margin: 0 10px; }

/* FAQ */
.lp-faq-item { border-bottom: 1px solid #E2E8F0; padding: 4px 0; }
.lp-faq-item summary {
    cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 1rem; color: #0F172A;
    list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--primary, #0EA5E9); font-weight: 400; flex-shrink: 0; }
.lp-faq-item[open] summary::after { content: '−'; }
.lp-faq-item p { font-size: 0.94rem; color: #64748B; line-height: 1.65; padding-bottom: 18px; }

/* CTA final */
.lp-cta { background: linear-gradient(135deg, #0EA5E9, #075985); color: #fff; padding: 72px 20px; text-align: center; }
.lp-cta h2 { font-size: clamp(1.4rem, 4vw, 2.1rem); font-weight: 800; margin-bottom: 12px; line-height: 1.25; letter-spacing: -0.5px; }
.lp-cta p { font-size: 1.02rem; opacity: .92; margin-bottom: 28px; }
.lp-cta .lp-btn { background: #fff; color: #075985; }

/* Rodapé */
.lp-footer { background: #0B1220; color: #94A3B8; padding: 48px 20px 32px; }
.lp-footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; flex-wrap: wrap; margin-bottom: 28px; }
.lp-footer-marca { font-size: 1.15rem; font-weight: 800; color: #F1F5F9; }
.lp-footer-marca i { color: var(--primary, #0EA5E9); margin-right: 6px; }
.lp-footer-marca p { font-size: 0.88rem; font-weight: 400; color: #64748B; margin-top: 6px; }
.lp-footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.lp-footer-links a { color: #CBD5E1; text-decoration: none; font-size: 0.92rem; }
.lp-footer-links a:hover { color: #7DD3FC; text-decoration: underline; }
.lp-disclaimer { font-size: 0.8rem; line-height: 1.6; color: #64748B; border-top: 1px solid rgba(255,255,255,.08); padding-top: 22px; }
.lp-copy { font-size: 0.78rem; color: #475569; margin-top: 18px; }

@media (max-width: 768px) {
    .lp-sec, .lp-cta { padding: 52px 18px; }
    .lp-footer-top { flex-direction: column; gap: 18px; }
    .lp-btn-grande { width: 100%; }
    /* 3 planos: mantém a escada natural Gratuito → Individual → Família no mobile */
}

/* As seções do funil precisam sangrar de ponta a ponta: o .landing-page é um
   flex centralizado com padding lateral de 20px, então esticamos e anulamos
   esse padding com margem negativa. */
.lp-sec, .lp-cta, .lp-footer {
    align-self: stretch;
    margin-left: -20px;
    margin-right: -20px;
    width: auto;
}
/* o conteúdo interno volta a respeitar o respiro lateral */
.lp-sec > .lp-wrap, .lp-cta > .lp-wrap, .lp-footer > .lp-wrap { width: 100%; }
/* o último bloco encosta no fim da página (o .landing-page tem padding embaixo) */
.lp-footer { margin-bottom: -40px; }

/* A landing deixou de ser uma tela única (só o hero) e virou uma página longa
   com funil. Com justify-content:center o conteúdo que excede a altura
   transborda para FORA da área rolável e alguns navegadores não o pintam.
   Numa página que rola, o alinhamento correto é a partir do topo. */
.landing-page { justify-content: flex-start; }

/* ==========================================================================
   Os 3 pilares (Simples · Sexy · Seguro) — a régua de design do app.
   Momento visual mais forte da landing: fundo escuro, "S" gigante,
   cada pilar com sua cor. Simples no layout, sexy no acabamento.
   ========================================================================== */
.lp-pilares { background: radial-gradient(120% 120% at 50% 0%, #10243B 0%, #0B1220 55%, #0B1220 100%); }
.lp-pilares .lp-tag { color: #7DD3FC; background: rgba(125,211,252,.12); }
.lp-pilares .lp-h2 { color: #F1F5F9; }
.lp-pilares .lp-sub { color: #94A3B8; }
.lp-3s { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 40px; }
.lp-s {
    position: relative; overflow: hidden;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 20px; padding: 32px 26px 30px;
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.lp-s:hover { transform: translateY(-6px); background: rgba(255,255,255,.06); }
/* "S" gigante de marca-d'água ao fundo de cada card */
.lp-s-mark {
    position: absolute; top: -28px; right: -6px;
    font-size: 9rem; font-weight: 800; line-height: 1;
    color: rgba(255,255,255,.05); pointer-events: none; user-select: none;
    transition: color .25s ease;
}
.lp-s h3 { position: relative; font-size: 1.5rem; font-weight: 800; color: #F1F5F9; margin-bottom: 10px; letter-spacing: -0.3px; }
.lp-s p  { position: relative; font-size: 0.96rem; line-height: 1.6; color: #B6C2D2; }
/* barra de sotaque no topo + cor própria por pilar */
.lp-s::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; opacity: .9; }
.lp-s-1::before { background: #38BDF8; }             /* Simples — azul do app  */
.lp-s-1:hover { border-color: rgba(56,189,248,.5); }
.lp-s-1:hover .lp-s-mark { color: rgba(56,189,248,.16); }
.lp-s-1 h3 { color: #7DD3FC; }
.lp-s-2::before { background: #F472B6; }             /* Sexy — rosa            */
.lp-s-2:hover { border-color: rgba(244,114,182,.5); }
.lp-s-2:hover .lp-s-mark { color: rgba(244,114,182,.16); }
.lp-s-2 h3 { color: #F9A8D4; }
.lp-s-3::before { background: #34D399; }             /* Seguro — verde         */
.lp-s-3:hover { border-color: rgba(52,211,153,.5); }
.lp-s-3:hover .lp-s-mark { color: rgba(52,211,153,.16); }
.lp-s-3 h3 { color: #6EE7B7; }

/* ==========================================================================
   Antes e depois — Modo antigo (papelada) vs SuaSaúde (celular).
   Lado antigo dessaturado para reforçar o contraste; lado novo vibrante.
   ========================================================================== */
.lp-ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 38px; align-items: center; }
.lp-ba-col { position: relative; }
.lp-ba-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .8rem; font-weight: 800; letter-spacing: .3px;
    padding: 7px 15px; border-radius: 22px; margin-bottom: 16px;
}
.lp-ba-badge-antigo { background: #E5E7EB; color: #6B7280; }
.lp-ba-badge-novo   { background: rgba(14,165,233,.12); color: var(--primary, #0EA5E9); }
.lp-ba-foto-antigo {
    width: 100%; border-radius: 18px; display: block;
    box-shadow: 0 6px 18px rgba(15,23,42,.14);
    filter: grayscale(.4) contrast(.95) brightness(.98);
}
.lp-ba-foto-novo {
    width: 100%; border-radius: 18px; display: block;
    box-shadow: 0 18px 48px rgba(14,165,233,.22);
    border: 4px solid #fff; outline: 1px solid rgba(14,165,233,.22);
}
.lp-ba-legenda { font-size: .92rem; color: #64748B; line-height: 1.55; margin-top: 16px; }
.lp-ba-antigo .lp-ba-legenda { color: #94A3B8; }
@media (max-width: 768px) {
    .lp-ba-grid { grid-template-columns: 1fr; gap: 30px; align-items: stretch; }
}

/* ---------- Header fixo do topo da landing ---------- */
.lp-nav {
    position: sticky;
    top: 0;
    /* Barra de status do iPhone: o vidro sobe até a borda, o conteúdo não */
    padding-top: var(--safe-top);
    z-index: 1000;
    align-self: stretch;
    margin: -40px -20px 0;              /* sangra full-width + cola no topo (anula o padding do .landing-page) */
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid rgba(14, 165, 233, 0.12);
}
.lp-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.lp-nav-logo {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary, #0EA5E9);
    text-decoration: none;
    flex-shrink: 0;
}
.lp-nav-links {
    display: flex;
    gap: 28px;
}
.lp-nav-links a {
    color: #334155;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.2s ease;
}
.lp-nav-links a:hover {
    color: var(--primary, #0EA5E9);
}
.lp-nav-links a.lp-nav-dl {
    color: var(--primary-dark, #0284C7);
    background: rgba(14, 165, 233, .1);
    padding: 6px 14px;
    border-radius: 999px;
}
.lp-nav-links a.lp-nav-dl:hover { background: rgba(14, 165, 233, .18); color: var(--primary-dark, #0284C7); }
.lp-nav-links a.lp-nav-dl i { margin-right: 5px; font-size: .82em; }

/* ---------- Seção Download / Instalar ---------- */
.lp-dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 36px; align-items: stretch; }
.lp-dl-card {
    position: relative; background: #fff; border: 1px solid #E2E8F0;
    border-radius: 18px; padding: 28px 26px; box-shadow: 0 6px 20px rgba(15,23,42,.05);
}
.lp-dl-now { border-color: rgba(14,165,233,.4); }
.lp-dl-tag {
    display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800;
    letter-spacing: .4px; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.lp-dl-tag-ok { background: #D1FAE5; color: #065F46; }
.lp-dl-tag-soon { background: #FEF3C7; color: #92400E; }
.lp-dl-h3 { font-size: 1.25rem; font-weight: 800; color: #0F172A; margin: 0 0 6px; }
.lp-dl-p { font-size: .92rem; color: #64748B; line-height: 1.55; margin: 0 0 20px; }
.lp-dl-btn { width: 100%; justify-content: center; }
.lp-dl-btn i { margin-right: 8px; }
.lp-dl-steps { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; border-radius: 12px; transition: background .3s ease; padding: 4px; }
.lp-dl-step { font-size: .88rem; color: #334155; line-height: 1.5; }
.lp-dl-os { display: block; font-weight: 700; color: #0F172A; font-size: .8rem; margin-bottom: 2px; }
.lp-dl-os i { color: var(--primary, #0EA5E9); margin-right: 6px; }
.lp-dl-flash { background: rgba(14,165,233,.12); }
.lp-dl-badges { display: flex; flex-direction: column; gap: 12px; }
.lp-store-badge {
    display: inline-flex; align-items: center; gap: 12px; background: #1E293B; color: #fff;
    border-radius: 12px; padding: 11px 20px; opacity: .62; cursor: default; user-select: none;
    border: 1px solid rgba(255,255,255,.08); width: fit-content;
}
.lp-store-badge small { display: block; font-size: .62rem; opacity: .85; text-transform: uppercase; letter-spacing: .3px; }
.lp-store-badge strong { display: block; font-size: 1.05rem; line-height: 1.15; font-weight: 700; }
.lp-dl-avise { font-size: .82rem; color: #94A3B8; margin: 16px 0 0; }
.lp-dl-avise a { color: var(--primary-dark, #0284C7); font-weight: 600; }
@media (max-width: 768px) {
    .lp-dl-grid { grid-template-columns: 1fr; }
}
.lp-nav-cta {
    background: var(--primary, #0EA5E9);
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 9px;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.92rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: filter 0.2s ease;
}
.lp-nav-cta:hover { filter: brightness(1.08); }

/* Âncoras não ficam escondidas atrás do header sticky */
.lp-sec, .lp-cta { scroll-margin-top: 72px; }

@media (max-width: 768px) {
    .lp-nav-links { display: none; }     /* no celular: logo + botão Entrar */
    .lp-nav-inner { padding: 10px 16px; }
}
