/* ================= Tokens ================= */
:root {
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-2: #eef2f7;
    --border: #e1e6ee;
    --text: #0f1b2d;
    --muted: #5d6b80;
    --brand: #0c3b7a;
    --brand-hover: #0a3168;
    --brand-soft: #e6eef9;
    --accent: #12a66a;
    --pos: #0f9458;
    --neg: #d1394a;
    --warn-bg: #fff6e0;
    --info-bg: #e8f1fd;
    --ok-bg: #e3f6ec;
    --err-bg: #fdecee;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 6px 20px rgba(15, 27, 45, .06);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1220;
        --surface: #111a2c;
        --surface-2: #17223a;
        --border: #24314d;
        --text: #e7ecf5;
        --muted: #95a3bc;
        --brand: #5b93ff;
        --brand-hover: #7aa8ff;
        --brand-soft: #1a2946;
        --accent: #34d399;
        --pos: #34d399;
        --neg: #f87185;
        --warn-bg: #3a2f14;
        --info-bg: #16284a;
        --ok-bg: #123527;
        --err-bg: #3d1720;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
        color-scheme: dark;
    }
}

/* ================= Base ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
small { font-size: .82em; }
.muted { color: var(--muted); }
.block { display: block; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.icon { width: 20px; height: 20px; flex: none; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
[hidden] { display: none !important; }

/* ================= Botões ================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4em;
    height: 40px; padding: 0 16px;
    border-radius: var(--radius-sm); border: 1px solid transparent;
    font: 600 .92rem var(--font); cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #06101f; } }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--neg); color: #fff; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--neg); }
.icon-btn {
    display: inline-grid; place-items: center; width: 34px; height: 34px;
    border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
    color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.icon-btn .icon { width: 18px; height: 18px; }

/* ================= Formulários ================= */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: .85rem; font-weight: 500; color: var(--muted); }
input, select {
    height: 40px; width: 100%; padding: 0 12px;
    font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
input:focus, select:focus, .btn:focus-visible, .link:focus-visible, a:focus-visible {
    outline: 2px solid var(--brand); outline-offset: 1px;
}
input[type="color"] { padding: 3px; width: 46px; cursor: pointer; }
.field-color input { width: 60px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-grid {
    display: grid; gap: 14px 16px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    align-items: end;
}
.form-grid .field-wide { grid-column: span 2; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; }
.form-inline { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.form-inline .field { flex: 1 1 200px; }
.hint { color: var(--muted); font-size: .84rem; margin: 10px 0 0; }
.segmented { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; height: 40px; }
.segmented label { flex: 1; position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; height: 100%; cursor: pointer; }
.segmented span { display: grid; place-items: center; height: 100%; font-weight: 600; font-size: .9rem; color: var(--muted); }
.segmented label + label { border-left: 1px solid var(--border); }
.seg-receita input:checked + span { background: var(--ok-bg); color: var(--pos); }
.seg-despesa input:checked + span { background: var(--err-bg); color: var(--neg); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }

/* ================= Alertas ================= */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .92rem; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-ok { background: var(--ok-bg); color: var(--pos); }
.alert-info { background: var(--info-bg); color: var(--text); }
.alert-erro { background: var(--err-bg); color: var(--neg); }

/* ================= Marca ================= */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.1rem; font-weight: 500; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 700; color: var(--brand); margin-left: 1px; }

/* ================= Site público ================= */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.025em; margin-bottom: 18px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 36em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-preview, .hero-visual { position: relative; }
.preview-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; }
.preview-head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 16px; }
.tag { font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: 99px; }
.preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.preview-stats small, .preview-small small { display: block; color: var(--muted); }
.preview-stats b { font-size: .98rem; font-variant-numeric: tabular-nums; }
.preview-bars { display: grid; gap: 10px; }
.pbar { display: grid; grid-template-columns: 90px 1fr 36px; align-items: center; gap: 10px; font-size: .85rem; }
.pbar i { display: block; height: 8px; border-radius: 99px; background: linear-gradient(to right, var(--c) var(--w), var(--surface-2) var(--w)); }
.pbar small { text-align: right; color: var(--muted); }
.hero-preview { padding-bottom: 84px; }
.hero-visual { padding-bottom: 118px; }
.preview-small { position: absolute; right: -14px; bottom: 0; padding: 14px 18px; width: 200px; }
.preview-small b { display: block; font-size: 1.15rem; }
.preview-small span { font-size: .85rem; font-weight: 600; }
.features { padding: 64px 0; }
.features h2, .steps h2 { font-size: 1.6rem; text-align: center; margin-bottom: 32px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature .icon { width: 28px; height: 28px; color: var(--brand); margin-bottom: 12px; }
.feature h3 { font-size: 1.02rem; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.steps { padding: 32px 0 80px; text-align: center; }
.step-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; text-align: left; }
.step-list li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: grid; gap: 4px; }
.step-list li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; margin-bottom: 8px; }
.step-list span { color: var(--muted); font-size: .92rem; }

/* ---- Autenticação ---- */
.auth { display: grid; place-items: center; padding: 56px 16px 72px; min-height: calc(100vh - 140px); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 32px; }
.auth-card h1 { margin-bottom: 4px; }
.auth-alt { text-align: center; margin: 20px 0 0; color: var(--muted); font-size: .92rem; }

/* ================= Área logada ================= */
.app { min-height: 100vh; }
.app-bar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.app-bar-inner { display: flex; align-items: center; gap: 20px; height: 64px; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.app-bar .brand { flex: none; }
.app-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.app-nav::-webkit-scrollbar { display: none; }
.app-nav a { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; font-size: .92rem; white-space: nowrap; }
.app-nav a .icon { width: 18px; height: 18px; }
.app-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.app-nav a.active { background: var(--brand-soft); color: var(--brand); }
.app-user { display: flex; align-items: center; gap: 8px; flex: none; }
.app-user-link { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 4px 8px 4px 4px; border-radius: 99px; }
.app-user-link:hover, .app-user-link.active { background: var(--surface-2); text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; flex: none; }
.who { min-width: 0; max-width: 170px; line-height: 1.25; }
.who strong, .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who strong { font-size: .9rem; }
.who small { color: var(--muted); font-size: .76rem; }
.main { padding: 28px 32px 56px; min-width: 0; max-width: 1280px; margin: 0 auto; }
/* no computador o menu fica só com texto (cabe com até 8 itens + botão Owner); ícones voltam no celular */
.who { display: none; }
.app-nav a .icon { display: none; }
@media (max-width: 960px) {
    .app-bar-inner { flex-wrap: wrap; height: auto; gap: 8px 12px; padding: 10px 16px 0; }
    .app-bar .brand { flex: 1; }
    .app-nav { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 16px 8px; }
    .app-nav a { padding: 8px 12px; font-size: .9rem; }
    .app-nav a .icon { display: block; }
}
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.page-head p { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; margin-bottom: 6px; }
.back .icon { width: 16px; height: 16px; }
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-nav strong { min-width: 150px; text-align: center; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat small { color: var(--muted); font-weight: 500; }
.stat b { font-size: 1.35rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.stat span { font-size: .84rem; font-weight: 500; }
.stat-accent { background: var(--brand-soft); border-color: transparent; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 18px; }
.grid-2-wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.empty { color: var(--muted); padding: 18px 0; margin: 0; }

.chart-box { position: relative; height: 260px; }
.chart-donut { height: 180px; }
.chart-split { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; align-items: center; }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.legend-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 44px; align-items: center; gap: 10px; }
.legend-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-list i { width: 10px; height: 10px; border-radius: 3px; }
.legend-list b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.legend-list small { color: var(--muted); text-align: right; }
.card .legend-list { margin-top: 14px; }
.chart-split .legend-list { margin-top: 0; }

.tx-list { list-style: none; padding: 0; margin: 0; }
.tx-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tx-list li:last-child { border-bottom: 0; }
.tx-list b { display: block; font-weight: 500; }
.tx-list small { color: var(--muted); }
.tx-list span { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; }

.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { display: inline-block; margin-left: 12px; }
.ticker { font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.badge { font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.badge-compra { background: var(--info-bg); color: var(--brand); }
.badge-venda { background: var(--err-bg); color: var(--neg); }
.badge-provento { background: var(--ok-bg); color: var(--pos); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select { width: auto; min-width: 170px; }
.totals { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.totals b { font-variant-numeric: tabular-nums; margin-left: 4px; }

.cat-list { list-style: none; padding: 0; margin: 0; }
.cat-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cat-list li:last-child { border-bottom: 0; }
.cat-edit { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cat-edit input[name="nome"] { height: 36px; flex: 1; min-width: 0; }
.cat-edit input[type="color"] { height: 36px; width: 40px; }
.cat-edit small { white-space: nowrap; }

.danger-zone { border-color: color-mix(in srgb, var(--neg) 35%, var(--border)); }

/* ================= Responsivo ================= */
@media (max-width: 1100px) {
    .grid-2, .grid-2-wide { grid-template-columns: minmax(0, 1fr); }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .hero { padding: 40px 0 64px; }
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .preview-small { right: 8px; }
    .step-list { grid-template-columns: 1fr; }

    .main { padding: 20px 16px 48px; }
}

@media (max-width: 560px) {
    body { font-size: 14.5px; }
    h1 { font-size: 1.35rem; }
    .feature-grid { grid-template-columns: 1fr; }
    .page-head { align-items: stretch; }
    .month-nav { width: 100%; justify-content: space-between; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat { padding: 12px 14px; }
    .stat b { font-size: 1.1rem; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid .field-wide { grid-column: 1 / -1; }
    .chart-split { grid-template-columns: minmax(0, 1fr); }
    .month-nav strong { min-width: 0; }
    .card { padding: 16px; }
    .table-wrap { margin: 0 -16px; padding: 0 16px; }
    .filters select { min-width: 0; flex: 1; }
    .auth-card { padding: 24px 20px; }
    .preview-stats b { font-size: .85rem; }
    .cat-edit small { display: none; }
}


/* ================= Site público: navegação ================= */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }
.site-menu { display: flex; align-items: center; gap: 4px; }
.site-menu > a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: .95rem; }
.site-menu > a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-menu > a.active { color: var(--brand); }
.menu-auth { display: flex; align-items: center; gap: 8px; margin-left: 12px; }

/* Seletor de idioma */
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border); color: var(--text); font-size: .85rem; font-weight: 600; cursor: pointer; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { background: var(--surface-2); }
.lang-switch[open] summary { border-color: var(--brand); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 160px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; }
.lang-menu a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: .9rem; white-space: nowrap; }
.lang-menu a:hover { background: var(--surface-2); text-decoration: none; }
.lang-menu a.sel { color: var(--brand); font-weight: 600; }
.lang-notice { margin: 14px 0 0; text-align: center; }
.lang-notice a { font-weight: 600; }
.menu-toggle { display: none; }

.ticker { position: relative; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--border); height: 46px; display: flex; align-items: center; font-size: .92rem; }
.ticker-track { display: flex; align-items: center; white-space: nowrap; animation: ticker 140s linear infinite; will-change: transform; }
.ticker-dup { display: flex; align-items: center; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.tick { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; border-right: 1px solid var(--border); line-height: 1; }
.tick b { font-weight: 700; color: var(--text); letter-spacing: .01em; }
.tick-dot { font-style: normal; color: var(--muted); font-size: .7rem; }
.tick-price { color: var(--text); font-variant-numeric: tabular-nums; }
.tick-var { font-variant-numeric: tabular-nums; font-weight: 500; }
.tick-var.pos { color: var(--pos); }
.tick-var.neg { color: var(--neg); }
.tick-logo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface-2); color: var(--brand); font-size: .62rem; font-weight: 800; }
.tick-logo img { width: 100%; height: 100%; object-fit: cover; }
.tick-indice { background: #0c3b7a; color: #fff; }
.tick-moeda { background: #0f9458; color: #fff; }
.tick-cripto { background: #f7931a; color: #fff; font-size: .8rem; }
.tick-commodity { background: #b8860b; color: #fff; }
.tick-exterior { background: #1f2937; color: #fff; }
.ticker-date { position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 14px 0 34px; background: linear-gradient(to right, transparent, var(--surface) 26px); color: var(--muted); font-size: .72rem; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ================= Seções ================= */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head h2, .split h2, .final-cta h2, .cta-band h2, .materials-band h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.02em; margin: 0; }
.section-head > a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.section-head .icon, .asset-link .icon { width: 18px; height: 18px; }
.section .eyebrow { margin-bottom: 8px; }
.page-hero { padding: 56px 0 44px; background: linear-gradient(180deg, var(--brand-soft), transparent); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.025em; margin-bottom: 12px; max-width: 22em; }
.page-hero .lead { margin: 0; }
.page-hero + .section { padding-top: 32px; }

.brazil-notice { display: inline-flex; align-items: center; gap: 7px; margin: 14px 0 0; padding: 6px 12px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: .82rem; }
.brazil-notice .icon { width: 15px; height: 15px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .92rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { width: 18px; height: 18px; color: var(--accent); }
.alloc { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 3px; margin: 6px 0 14px; }
.alloc i { width: var(--w); background: var(--c); }
.alloc-legend { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px 14px; font-size: .86rem; }
.alloc-legend li { display: flex; align-items: center; gap: 7px; }
.alloc-legend i { width: 10px; height: 10px; border-radius: 3px; }
.alloc-legend b { margin-left: auto; font-weight: 600; }

.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.asset-card, .guide-card {
    display: flex; flex-direction: column; gap: 8px; height: 100%;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
    color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.asset-card:hover, .guide-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow); }
.asset-card h3, .guide-card h2 { font-size: 1.08rem; margin: 6px 0 0; }
.asset-card p, .guide-card p { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }
.asset-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: .9rem; margin-top: 6px; }
.guide-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex: none; }
.guide-icon .icon { width: 24px; height: 24px; }
.start-here { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 18px 22px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); color: var(--text); }
.start-here:hover { text-decoration: none; border-color: var(--accent); }
.start-here .icon { color: var(--accent); flex: none; }
.start-here span { flex: 1; }

.guide-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.guide-card { position: relative; }
.guide-num { position: absolute; top: 18px; right: 20px; font-size: 1.6rem; font-weight: 800; color: var(--border); }
.guide-meta { color: var(--muted); font-size: .82rem; font-weight: 500; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.split .lead { margin: 14px 0 22px; }
.service-list { display: grid; gap: 14px; }
.service { display: flex; gap: 16px; padding: 18px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.section-alt .service { background: var(--bg); }
.service > .icon { width: 26px; height: 26px; color: var(--brand); flex: none; margin-top: 2px; }
.service h3 { font-size: 1rem; margin-bottom: 4px; }
.service p { margin: 0; color: var(--muted); font-size: .92rem; }
.check-list { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 12px; }
.check-list li { padding-left: 30px; position: relative; color: var(--muted); }
.check-list li b { color: var(--text); }
.check-list li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.split .btn + .btn { margin-left: 8px; }

.cta-band, .materials-band { display: flex; align-items: center; gap: 24px; justify-content: space-between; flex-wrap: wrap; padding: 32px; border-radius: 20px; background: var(--brand); color: #fff; }
.cta-band p, .materials-band p { margin: 8px 0 0; opacity: .85; }
.cta-band .btn-primary, .materials-band .btn-primary { background: #fff; color: var(--brand); }
@media (prefers-color-scheme: dark) { .cta-band, .materials-band { background: var(--brand-soft); color: var(--text); } .cta-band .btn-primary, .materials-band .btn-primary { background: var(--brand); color: #06101f; } }
.materials-band > div:nth-child(2) { flex: 1; min-width: 240px; }
.materials-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: rgba(255, 255, 255, .15); }
.materials-icon .icon { width: 30px; height: 30px; }
.final-cta { text-align: center; padding-bottom: 88px; }
.final-cta .lead { margin: 12px auto 26px; }

/* ---- Vídeos ---- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.video-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .15s, transform .3s; }
.yt:hover img { opacity: 1; transform: scale(1.03); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; transform: translate(-50%, -50%); border-radius: 12px; background: #e62117; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.yt-play::after { content: ""; position: absolute; left: 26px; top: 13px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.video-meta { padding: 14px 16px 16px; }
.video-meta h3 { font-size: .98rem; margin: 0 0 4px; line-height: 1.35; }
.video-meta small { color: var(--muted); }

/* ---- Produtos ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.product-img { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; padding: 16px; }
.product-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-ph .icon { width: 48px; height: 48px; color: var(--muted); }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.product-body h3 { font-size: 1rem; margin: 0; }
.product-body p { color: var(--muted); font-size: .88rem; margin: 0; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.product-foot .btn { height: 36px; padding: 0 14px; font-size: .86rem; }
.affiliate-note { margin: 22px 0 0; font-size: .84rem; color: var(--muted); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pills a { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 500; font-size: .9rem; }
.pills a:hover { color: var(--text); text-decoration: none; }
.pills a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .pills a.active { color: #06101f; } }
.pills small { opacity: .7; margin-left: 2px; }

.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty-state > .icon { width: 44px; height: 44px; color: var(--brand); margin-bottom: 10px; }
.empty-state h1, .empty-state h2 { color: var(--text); font-size: 1.3rem; }
.empty-state p { max-width: 32em; margin: 0 auto 18px; }

/* ---- Parceiros ---- */
.partner-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; }
.partner { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); flex: none; }
.partner:hover { text-decoration: none; border-color: var(--brand); }
.partner.active { border-color: var(--brand); background: var(--brand-soft); }
.partner img, .partner-ph { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.partner-ph { display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }
.partner-ph.small { width: 30px; height: 30px; font-size: .85rem; }
.partner b, .partner small { display: block; line-height: 1.2; }
.partner small { color: var(--muted); }
.partner-detail { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.partner-detail h2 { margin: 0; }
.partner-detail p { margin: 4px 0 0; }
.partner-detail .btn svg { width: 18px; height: 18px; color: #e62117; }

/* ---- Guia ---- */
.page-hero-guide { padding-bottom: 32px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs span { margin: 0 6px; }
.guide-title { display: flex; gap: 18px; align-items: center; }
.guide-title .guide-icon { width: 60px; height: 60px; border-radius: 16px; }
.guide-title .guide-icon .icon { width: 32px; height: 32px; }
.guide-title h1 { margin: 0 0 4px; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding-top: 8px; padding-bottom: 64px; }
.guide-aside { position: relative; }
.toc { position: sticky; top: 88px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); margin-bottom: 18px; }
.toc h2, .aside-cta h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; }
.toc a { color: var(--text); }
.aside-cta { padding: 20px; border-radius: var(--radius); background: var(--brand-soft); }
.aside-cta h2 { color: var(--brand); }
.aside-cta p { font-size: .9rem; color: var(--muted); }

.prose { font-size: 1.02rem; line-height: 1.7; max-width: 46em; }
.prose-narrow { margin-inline: auto; }
.prose h2 { font-size: 1.45rem; margin: 2em 0 .6em; scroll-margin-top: 90px; letter-spacing: -.015em; }
.prose h3 { font-size: 1.1rem; margin: 1.5em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose .lead { font-size: 1.15rem; color: var(--text); }
.prose .table { margin: 0 0 1.4em; font-size: .94rem; line-height: 1.5; }
.prose .table td { vertical-align: top; }
.keypoints { padding: 20px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); margin: 1.5em 0; }
.keypoints h3 { margin: 0 0 .5em; font-size: 1rem; }
.keypoints ul { margin: 0; }
.callout { padding: 16px 20px; border-radius: var(--radius-sm); background: var(--info-bg); margin: 1.4em 0; font-size: .96rem; }
.callout.warn { background: var(--warn-bg); }
.callout.disclaimer { background: var(--surface-2); color: var(--muted); font-size: .9rem; margin-top: 2.5em; }
.faq { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; }
.faq summary { padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.2rem; line-height: 1; }
.faq[open] summary::after { content: "−"; }
.faq p { padding: 0 18px 16px; margin: 0; color: var(--muted); }
.guide-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 2.5em; }
.guide-pager a { display: flex; flex-direction: column; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.guide-pager a:hover { text-decoration: none; border-color: var(--brand); }
.guide-pager a.next { text-align: right; grid-column: 2; }
.guide-pager small { color: var(--muted); }
.guide-pager span { font-weight: 600; }

/* ---- Rodapé ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 48px 0 24px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin: 14px 0 18px; max-width: 26em; }
.site-footer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--text); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); color: var(--muted); }
.socials a:hover { color: var(--brand); border-color: var(--brand); }
.socials svg { width: 18px; height: 18px; }
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
.footer-legal p { margin: 0 0 8px; }

/* ---- Área logada: materiais e admin ---- */
.material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.material-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.material-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--accent))); display: grid; place-items: center; color: #fff; }
.material-cover img { width: 100%; height: 100%; object-fit: cover; }
.material-cover span { display: grid; justify-items: center; gap: 4px; }
.material-cover .icon { width: 40px; height: 40px; }
.material-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.material-body h2 { font-size: 1.02rem; margin: 0; }
.material-body p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.material-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.material-foot .icon { width: 18px; height: 18px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; grid-column: 1 / -1; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
input[type="file"] { padding: 7px 10px; height: auto; }
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.rank li:last-child { border-bottom: 0; }
.thumb { width: 80px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; }
.social-field span { display: flex; align-items: center; gap: 8px; }
.social-field svg { width: 16px; height: 16px; }
.quote-rows { display: grid; gap: 8px; max-width: 640px; }
.quote-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 8px; }
.quote-head span { font-size: .8rem; font-weight: 600; color: var(--muted); }

/* ---- Responsivo (site público) ---- */
@media (max-width: 1000px) {
    .menu-toggle { display: inline-grid; }
    .site-menu {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 2px;
        padding: 12px 16px 18px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    }
    .site-menu.open { display: flex; }
    .site-menu > a { padding: 12px; }
    .menu-auth { margin: 10px 0 0; }
    .menu-auth .btn { flex: 1; }
    .site-header { position: sticky; }
    .site-header .nav { position: static; }
    .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .guide-layout { grid-template-columns: minmax(0, 1fr); }
    .guide-aside { order: -1; }
    .toc { position: static; }
    .aside-cta { display: none; }
}
@media (max-width: 860px) {
    .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .split-tool .tool-visual { order: 2; }
}
@media (max-width: 560px) {
    .section { padding: 44px 0; }
    .asset-grid { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .cta-band, .materials-band { padding: 24px; }
    .guide-pager { grid-template-columns: minmax(0, 1fr); }
    .guide-pager a.next { grid-column: 1; }
    .prose { font-size: 1rem; }
    .quote-row { grid-template-columns: 1fr 1fr 80px; }
    .split .btn + .btn { margin: 8px 0 0; }
    .ticker-date { display: none; }
    .hero-visual { padding-bottom: 0; }
    .hero-visual .preview-small { display: none; }
}

/* ================= Leads ================= */
.lead-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px 32px; align-items: center; padding: 28px 30px; border-radius: 20px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border)); margin: 2.5em 0 1em; }
.prose .lead-box h2 { margin: 0 0 4px; font-size: 1.2rem; }
.lead-box h2 { font-size: 1.25rem; margin: 0 0 4px; letter-spacing: -.01em; }
.lead-box p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.lead-copy { display: flex; gap: 16px; align-items: flex-start; }
.lead-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand); color: #fff; flex: none; }
.lead-icon .icon { width: 24px; height: 24px; }
.lead-form { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) auto; gap: 8px; }
.lead-form input[type="email"], .lead-form input[name="nome"] { background: var(--surface); }
.lead-consent { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--muted); line-height: 1.4; }
.lead-consent input { width: 16px; height: 16px; margin-top: 1px; flex: none; accent-color: var(--brand); }
.prose .lead-box { grid-template-columns: minmax(0, 1fr); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ================= Calculadoras ================= */
.section-tight { padding: 24px 0; }
.page-hero + .section-tight { padding-top: 0; }
.calc-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.calc-form { display: flex; flex-direction: column; gap: 14px; margin: 0; position: sticky; top: 84px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-result { min-width: 0; }
.calc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.calc-stats .stat b { font-size: 1.5rem; }
.calc-table summary { cursor: pointer; font-weight: 600; }
.calc-table[open] summary { margin-bottom: 12px; }
.calc-content { padding-top: 24px; }
.formula { font-size: 1.3rem; font-weight: 600; text-align: center; padding: 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.progress-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .92rem; }
.progress { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; transition: width .3s; }
.calc-teasers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.calc-teaser { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.calc-teaser:hover { text-decoration: none; border-color: var(--brand); }
.calc-teaser > span:nth-child(2) { flex: 1; }
.calc-teaser b, .calc-teaser small { display: block; }
.calc-teaser small { color: var(--muted); font-size: .88rem; }
.calc-teaser > .icon { color: var(--brand); }

@media (max-width: 900px) {
    .lead-box { grid-template-columns: minmax(0, 1fr); padding: 22px; }
    .calc-layout { grid-template-columns: minmax(0, 1fr); }
    .calc-form { position: static; }
    .calc-teasers { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .lead-form { grid-template-columns: minmax(0, 1fr); }
    .calc-stats { grid-template-columns: minmax(0, 1fr); }
}

/* ================= Owner ================= */
.material-cover { position: relative; }
.material-cover .material-tag { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: rgba(10, 26, 51, .85); color: #fff; font-size: .76rem; font-weight: 600; }
.material-tag .icon { width: 13px; height: 13px; }
.material-card.locked .material-cover { filter: grayscale(.6); opacity: .8; }
.is-locked { cursor: default; color: var(--muted); }
.is-locked .icon { width: 16px; height: 16px; }
.lock-note { font-size: .8rem !important; color: var(--muted); margin-top: 8px !important; }
.owner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; font-size: 1.05rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
h3.sub { font-size: .95rem; margin: 22px 0 6px; }
.filters input { width: auto; flex: 1 1 220px; }

.forgot { align-self: flex-end; font-size: .88rem; margin-top: -6px; }

/* ================= Loja, carrinho e pagamentos ================= */
.cart-btn { position: relative; }
.cart-btn span { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cart-list { list-style: none; padding: 0; margin: 0; }
.cart-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-list li:last-child { border-bottom: 0; }
.cart-img { width: 56px; height: 56px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-title b, .cart-title small { display: block; }
.cart-summary { position: sticky; top: 84px; }
.sum-row { display: flex; justify-content: space-between; padding: 8px 0; }
.sum-total { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 14px; font-size: 1.15rem; }
.cupom-form { display: flex; gap: 8px; margin: 6px 0; }
.price s { color: var(--muted); font-size: .85em; margin-right: 6px; }
.price.big b { font-size: 1.8rem; }
.product-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.product-gallery { aspect-ratio: 1; border-radius: var(--radius); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.product-gallery img { width: 100%; height: 100%; object-fit: contain; }
.product-gallery .icon { width: 80px; height: 80px; color: var(--muted); }
.product-buy { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 22px 0 8px; }
.product-body h3 a { color: var(--text); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.plan-card h2 { font-size: 1.4rem; }
.plan-prices { display: grid; gap: 14px; margin-top: 10px; }
.plan-option { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); }
.plan-option b { font-size: 1.4rem; }
.plan-option small { display: block; }
.pix-qr { display: grid; place-items: center; min-height: 230px; margin: 10px auto; }
.pix-qr img, .pix-qr canvas { background: #fff; padding: 10px; border-radius: 12px; }
.pix-code { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); resize: none; margin-bottom: 10px; }
.pix-info { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 4px; font-size: .92rem; }
.pix-valor { font-size: 1.2rem; color: var(--text); }
.checkout-result { text-align: center; max-width: 640px; margin: 20px auto; padding: 40px 28px; }
.result-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; }
.result-icon .icon { width: 32px; height: 32px; }
.result-icon.ok { background: var(--ok-bg); color: var(--pos); }
.result-icon.wait { background: var(--info-bg); color: var(--brand); }
.result-icon.fail { background: var(--err-bg); color: var(--neg); }
.steps-list { padding-left: 20px; display: grid; gap: 8px; }
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; font-size: .82rem; }
textarea { width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* ================= Cursos ================= */
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.course-nav h3 { font-size: .9rem; margin: 14px 0 6px; }
.course-nav h3:first-child { margin-top: 0; }
.course-nav ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: .9rem; }
.course-nav li.current a { font-weight: 700; }
.course-nav li.done a { color: var(--pos); }

@media (max-width: 900px) {
    .cart-layout, .product-page, .course-layout { grid-template-columns: minmax(0, 1fr); }
    .cart-summary { position: static; }
    .cart-list li { grid-template-columns: 44px minmax(0, 1fr) auto; }
    .cart-list li form { grid-column: 2 / -1; }
}

/* Mostrar/ocultar senha */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Botão Owner: sempre visível ao lado do usuário */
.owner-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 99px; background: var(--brand); color: #fff; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.owner-btn .icon { width: 18px; height: 18px; }
.owner-btn:hover { background: var(--brand-hover); text-decoration: none; }
.owner-btn.active { box-shadow: 0 0 0 3px var(--brand-soft); }
@media (prefers-color-scheme: dark) { .owner-btn { color: #06101f; } }
@media (max-width: 560px) { .owner-btn span { display: none; } .owner-btn { padding: 0 10px; } }

/* Menu da área logada: indica quando há itens escondidos à direita */
.app-nav.has-more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }

/* ================= Owner: tela mais larga e abas sem rolagem ================= */
.is-owner .main, .is-owner .app-bar-inner { max-width: 1720px; }
.tabs { flex-wrap: wrap; overflow: visible; row-gap: 2px; }
.tabs a { padding: 9px 13px; font-size: .93rem; }
@media (max-width: 700px) {
    .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .tabs::-webkit-scrollbar { display: none; }
}
