/* ============================================================================
   Achei — design system · app.css
   Shared tokens + components for the marketing site, the affiliate workspace
   and the admin console. Plain CSS, no build step, both themes, WCAG AA.

   Table of contents
    00 · Fonts (self-hosted, latin subset)
    01 · Theme tokens — palette, type scale, spacing, radius, elevation, motion
    02 · Reset & base typography
    03 · Utilities (layout, text, spacing)
    04 · Buttons
    05 · Badges & pills
    06 · Panels, cards & page structure
    07 · Forms (fields, input groups, switch, checks, copy field)
    08 · Tables
    09 · Alerts & flashes
    10 · App shell (sidebar, topbar, workspace)
    11 · Data display (stats, charts, key-value, progress, activity)
    12 · Lists (filters, chips, bulk, pager, pagination, empty, skeleton)
    13 · Notifications
    14 · Overlays (modal, drawer, dropdown menu, tooltip)
    15 · Navigation (tabs, breadcrumbs, section nav)
    16 · Marketing kit (hero, sections, features, steps, pricing, compare,
        FAQ, proof, CTA band, footer)
    17 · Auth shell
    18 · Misc (code block, onboarding, checkout, error states)
    19 · Responsive composition
    20 · Motion preferences & print

   Component reference, HTML snippets and recipes: tools/DESIGN-SYSTEM.md
   ========================================================================== */

/* 00 · Fonts — Inter (text/UI) + Manrope (display). Latin subset only;
   self-hosted so pages stay fast, private and CSP-clean (font-src 'self'). */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/manrope-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/quicksand-variable.woff2') format('woff2'),
         url('../fonts/quicksand-variable.ttf') format('truetype');
}

/* 01 · Theme tokens
   Named palette: Violet (brand) · Ink · Lavender (surface) · Emerald ·
   Amber · Rose · Azure. Semantic tokens below are the only colors code
   should reference; raw hex lives here and in page CSS only.
   Foreground tokens are AA against --bg-card in BOTH themes. */
:root, .theme-light {
    color-scheme: light;
    /* palette · brand */
    --brand-ink: #160b2e;
    --brand-violet: #6d28d9;
    --brand-iris: #8b5cf6;
    --brand-lilac: #ede9fe;
    --brand-paper: #fbfaff;
    --brand-signal: #c6f36b;
    --primary: #6d28d9;
    --primary-2: #5b21b6;
    --primary-soft: #ede9fe;
    --primary-hover: #5b21b6;
    --on-primary: #ffffff;
    --accent: #8b5cf6;
    /* palette · surfaces & ink */
    --bg: #fbfaff;
    --bg-soft: #f3f0fb;
    --bg-card: #ffffff;
    --bg-card-2: #ede9fe;
    --line: #e4dff0;
    --text: #160b2e;
    --text-soft: #5f5675;
    --text-mute: #706582;
    --img-bg: #f5f2fb;
    /* palette · states (AA em qualquer superfície clara, incluindo --bg-card-2) */
    --success: #14754f;
    --warning: #8d5a16;
    --danger: #b53244;
    --info: #356c9d;
    --success-soft: color-mix(in srgb, var(--success) 10%, var(--bg-card));
    --warning-soft: color-mix(in srgb, var(--warning) 10%, var(--bg-card));
    --danger-soft: color-mix(in srgb, var(--danger) 10%, var(--bg-card));
    --info-soft: color-mix(in srgb, var(--info) 10%, var(--bg-card));
    --overlay: #150b2499;
    /* type scale (14px base) */
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-brand: 'Quicksand', var(--font);
    --font-display: 'Inter', system-ui, sans-serif;
    --fs-2xs: .62rem;
    --fs-xs: .68rem;
    --fs-sm: .72rem;
    --fs-base: .78rem;
    --fs-md: .83rem;
    --fs-lg: .92rem;
    --fs-xl: 1.05rem;
    --fs-2xl: 1.35rem;
    --fs-3xl: clamp(1.6rem, 2.4vw, 2rem);
    --fs-display: clamp(2.6rem, 4.6vw, 4.1rem);
    --lh-tight: 1.25;
    --lh: 1.6;
    /* spacing scale (4px base) */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    --sp-12: 48px;
    --sp-16: 64px;
    /* radius hierarchy — hairline chips, controls, cards, hero surfaces */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius: 18px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --radius-full: 999px;
    /* elevation — hairline for data, shadow only for floating surfaces */
    --shadow-xs: 0 1px 2px #39205e0a;
    --shadow-soft: 0 3px 12px #39205e04;
    --shadow: 0 20px 60px #39205e14;
    --shadow-lg: 0 28px 70px #39205e22;
    --shadow-overlay: 0 30px 90px #24104026;
    /* motion */
    --dur-fast: 120ms;
    --dur-base: 180ms;
    --dur-slow: 300ms;
    --ease-out: cubic-bezier(.22, .75, .3, 1);
    --ease-in-out: cubic-bezier(.5, 0, .2, 1);
    /* layout */
    --sidebar-w: 236px;
    --focus-ring: 3px solid var(--primary);
}
html[data-theme="dark"], .theme-dark {
    color-scheme: dark;
    /* palette · brand */
    --primary: #b99afc;
    --primary-2: #d0bcff;
    --primary-soft: #30204b;
    --primary-hover: #d6c3ff;
    --on-primary: #160b2e;
    --accent: #c6f36b;
    /* palette · surfaces & ink */
    --bg: #160b2e;
    --bg-soft: #1d1235;
    --bg-card: #24183c;
    --bg-card-2: #30214b;
    --line: #453555;
    --text: #fbfaff;
    --text-soft: #cfc3e0;
    --text-mute: #b6a8ca;
    --img-bg: #30214b;
    /* palette · states */
    --success: #83d6aa;
    --warning: #e4bc76;
    --danger: #ff99a4;
    --info: #91bfe5;
    --success-soft: color-mix(in srgb, var(--success) 12%, var(--bg-card));
    --warning-soft: color-mix(in srgb, var(--warning) 12%, var(--bg-card));
    --danger-soft: color-mix(in srgb, var(--danger) 12%, var(--bg-card));
    --info-soft: color-mix(in srgb, var(--info) 12%, var(--bg-card));
    --overlay: #0c0616b3;
    /* elevation */
    --shadow-xs: 0 1px 2px #0002;
    --shadow-soft: 0 3px 12px #0001;
    --shadow: 0 20px 60px #0003;
    --shadow-lg: 0 28px 70px #0005;
    --shadow-overlay: 0 30px 90px #0006;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
html, body { margin: 0; padding: 0; }
/* break-word only kicks in when a token (long URL, code string) would overflow
   its line; normal prose wrapping is untouched. */
body { background: var(--bg); color: var(--text); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--primary-2); text-decoration: none; text-underline-offset: 4px; }
a:hover { color: var(--primary); }
button:disabled, .btn:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
::selection { background: var(--brand-signal); color: var(--brand-ink); }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .55em; line-height: 1.25; letter-spacing: -.035em; }
h1 { font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 800; }
h4 { font-size: .92rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
svg.icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }
pre { overflow: auto; max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--text-soft); }
p a, li a, .hint a, .alert a, .field-error a, .small a, .muted a { text-decoration: underline; text-underline-offset: 3px; }
p a.btn, li a.btn, .small a.btn, .muted a.btn { text-decoration: none; }
.small { font-size: .79rem; }
.mono { font-family: 'Cascadia Code', Consolas, monospace; overflow-wrap: anywhere; }
/* Data (numbers, money, URLs) uses the UI face with tabular numerals; monospace
   is reserved for code, API snippets and keys (.mono). */
.num { font-family: var(--font); font-variant-numeric: tabular-nums; }
code { font-family: 'Cascadia Code', Consolas, monospace; font-size: .92em; }
/* Legacy `class="mono"` on data cells renders as data; keys keep mono in a
   child <span class="mono"> (or apply .mono to the inner element). */
.table td.mono, .compare td.mono { font-family: var(--font); font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: .6rem; } .mt-2 { margin-top: 1.2rem; } .mt-3 { margin-top: 1.75rem; }
.mb-2 { margin-bottom: 1.25rem; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid > *, .flex > *, .flex-between > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .02em; color: var(--primary-2); margin-bottom: 12px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; flex-shrink: 0; border-radius: 2px; background: var(--primary); }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 200; padding: 12px 20px; background: var(--text); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Controls */
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-card-2); color: var(--text); font-size: .82rem; font-weight: 600; line-height: 1.4; text-align: center; transition: background .18s, border-color .18s, box-shadow .18s, transform .18s; }
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading::after { content: ''; width: 14px; height: 14px; flex-shrink: 0; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.skeleton { border-radius: 8px; background: var(--bg-card-2); animation: pulse-soft 1.4s ease-in-out infinite; min-height: 14px; }
.btn:hover { color: var(--text); border-color: var(--text-mute); transform: translateY(-1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 3px 5px #6d28d90c; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); box-shadow: 0 4px 12px #6d28d930; }
.btn-success { background: var(--primary-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.btn-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--bg-card)); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.btn-warning { color: var(--warning); background: color-mix(in srgb, var(--warning) 7%, var(--bg-card)); }
.btn-ghost { background: var(--bg-card); color: var(--text-soft); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--primary); }
.btn-sm { min-height: 38px; padding: 7px 11px; font-size: .75rem; border-radius: 7px; }
.btn-lg { padding: 14px 24px; min-height: 50px; font-size: .9rem; border-radius: 10px; }
.btn-icon, .theme-toggle { display: inline-grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--text-soft); }
.btn-icon:hover, .theme-toggle:hover { color: var(--primary); background: var(--bg-soft); border-color: var(--line); }
.theme-toggle .theme-sun { display: none; }
html[data-theme="dark"] .theme-toggle .theme-sun { display: inline-flex; }
html[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px; font-size: .67rem; font-weight: 600; line-height: 1.5; border: 1px solid transparent; background: var(--bg-soft); color: var(--text-soft); vertical-align: middle; }
.badge-success { background: color-mix(in srgb, var(--success) 10%, var(--bg-card)); color: var(--success); }
.badge-danger, .badge-hot { background: color-mix(in srgb, var(--danger) 10%, var(--bg-card)); color: var(--danger); }
.badge-warning { background: color-mix(in srgb, var(--warning) 10%, var(--bg-card)); color: var(--warning); }
.badge-info { background: color-mix(in srgb, var(--info) 10%, var(--bg-card)); color: var(--info); }
.badge-muted { background: var(--bg-soft); color: var(--text-mute); }
.badge-shopee { color: #b7401e; background: #ffede4; }
.badge-ml { color: #766016; background: #fff5c5; }
.badge-amazon { color: #815321; background: #fff0d8; }
/* Selo de loja (as seis lojas, mesmo peso): .badge-store[data-store=<código>]
   é o formato canônico (pedido console1; merchant_badge() migra na integração).
   As classes antigas por loja continuam valendo como apelido. AA nos dois temas. */
.badge-store { color: var(--text-soft); background: var(--bg-soft); border-color: var(--line); white-space: nowrap; }
.badge-store[data-store="shopee"] { color: #b7401e; background: #ffede4; border-color: #fbd2c4; }
.badge-store[data-store="mercadolivre"] { color: #766016; background: #fff5c5; border-color: #f2e39a; }
.badge-store[data-store="amazon"] { color: #815321; background: #fff0d8; border-color: #f3dcb8; }
.badge-store[data-store="aliexpress"], .badge-aliexpress { color: #b4232f; background: #fdebec; border-color: #f7cdd1; }
.badge-store[data-store="kabum"], .badge-kabum { color: #b2470b; background: #fff0e3; border-color: #fbd7b8; }
.badge-store[data-store="magalu"], .badge-magalu { color: #1259b8; background: #e8f1fd; border-color: #c6dbf7; }
html[data-theme="dark"] .badge-store,
.theme-dark .badge-store {
    background: color-mix(in srgb, var(--bg-soft) 70%, var(--bg-card));
    border-color: var(--line);
}
html[data-theme="dark"] .badge-store[data-store="shopee"],
.theme-dark .badge-store[data-store="shopee"] {
    color: #ff9d7d;
    background: color-mix(in srgb, #b7401e 26%, var(--bg-card));
}
html[data-theme="dark"] .badge-store[data-store="mercadolivre"],
.theme-dark .badge-store[data-store="mercadolivre"] {
    color: #ecd27a;
    background: color-mix(in srgb, #766016 26%, var(--bg-card));
}
html[data-theme="dark"] .badge-store[data-store="amazon"],
.theme-dark .badge-store[data-store="amazon"] {
    color: #e8c089;
    background: color-mix(in srgb, #815321 26%, var(--bg-card));
}
html[data-theme="dark"] :is(.badge-store[data-store="aliexpress"], .badge-aliexpress) {
    color: #ff9ca5;
    background: color-mix(in srgb, #b4232f 26%, var(--bg-card));
}
html[data-theme="dark"] :is(.badge-store[data-store="kabum"], .badge-kabum) { color: #ffb47e; background: color-mix(in srgb, #b2470b 26%, var(--bg-card)); }
html[data-theme="dark"] :is(.badge-store[data-store="magalu"], .badge-magalu) { color: #93c0fb; background: color-mix(in srgb, #1259b8 26%, var(--bg-card)); }
html[data-theme="dark"] .badge-shopee, .theme-dark .badge-shopee { color: #ff9d7d; background: color-mix(in srgb, #b7401e 26%, var(--bg-card)); }
html[data-theme="dark"] .badge-ml, .theme-dark .badge-ml { color: #ecd27a; background: color-mix(in srgb, #766016 26%, var(--bg-card)); }
html[data-theme="dark"] .badge-amazon, .theme-dark .badge-amazon { color: #e8c089; background: color-mix(in srgb, #815321 26%, var(--bg-card)); }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); box-shadow: var(--shadow-soft); }
.card-pad-lg { padding: 32px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head h2 { font-size: var(--fs-lg); }
.stat-card { position: relative; padding: 20px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.stat-label { color: var(--text-soft); font-size: .76rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.stat-label .icon { color: var(--primary); }
.stat-value { font: 800 clamp(1.5rem, 2.3vw, 2rem)/1.2 var(--font-display); letter-spacing: -.045em; margin: 8px 0 7px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* Delta: legenda quieta sem direção; up/down/flat viram chips legíveis
   (ícone + texto, nunca só cor) com fundo próprio para qualquer superfície. */
.stat-delta { color: var(--text-mute); font-size: .7rem; line-height: 1.5; }
.stat-delta .icon { flex-shrink: 0; vertical-align: middle; }
.stat-delta.up, .stat-delta.down, .stat-delta.flat {
    display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
    padding: 3px 9px; border: 1px solid transparent; border-radius: var(--radius-full);
    font-weight: 600; line-height: 1.45;
}
.stat-delta.up { color: var(--success); background: color-mix(in srgb, var(--success) 10%, var(--bg-card)); border-color: color-mix(in srgb, var(--success) 22%, transparent); }
.stat-delta.down { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--bg-card)); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.stat-delta.flat { color: var(--text-soft); background: var(--bg-soft); border-color: var(--line); }
.stat-featured { background: #482377; color: #faf5ff; border-color: #482377; box-shadow: var(--shadow-soft); }
/* Destaque não pinta os chips: delta up/down/flat mantém as cores semânticas
   (fundo próprio) também dentro do card em violeta. */
.stat-featured .stat-label,
.stat-featured .stat-label .icon,
.stat-featured .stat-delta:not(.up):not(.down):not(.flat),
.stat-featured .stat-delta:not(.up):not(.down):not(.flat) .icon { color: #ddc7f9; }
html[data-theme="dark"] .stat-featured, .theme-dark .stat-featured { background: #34234f; color: #f1edf9; border-color: #4b3670; }
html[data-theme="dark"] .stat-featured .stat-label,
html[data-theme="dark"] .stat-featured .stat-label .icon,
html[data-theme="dark"] .stat-featured .stat-delta:not(.up):not(.down):not(.flat),
html[data-theme="dark"] .stat-featured .stat-delta:not(.up):not(.down):not(.flat) .icon,
.theme-dark .stat-featured .stat-label,
.theme-dark .stat-featured .stat-label .icon,
.theme-dark .stat-featured .stat-delta:not(.up):not(.down):not(.flat),
.theme-dark .stat-featured .stat-delta:not(.up):not(.down):not(.flat) .icon { color: #c9afff; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 7px; color: var(--text); font-size: .76rem; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 43px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-card); color: var(--text); font: .83rem var(--font); transition: box-shadow .18s, border-color .18s; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-mute); opacity: .85; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: var(--danger); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
.search-field { position: relative; }
.search-field .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-mute); pointer-events: none; }
.search-field input { padding-left: 38px !important; }
.search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; }
.search-clear::before { content: ''; position: absolute; inset: -6px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px !important; }
.password-wrap .btn-icon { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }
.char-count { text-align: right; color: var(--text-mute); font-size: .68rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.img-preview { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--img-bg); padding: 10px; display: none; }
.img-preview.visible { display: block; }
.img-preview img { max-height: 140px; margin: 0 auto; object-fit: contain; }
.field textarea { min-height: 118px; resize: vertical; line-height: 1.6; }
.field input:disabled { background: var(--bg-soft); opacity: .7; }
/* Read-only values read as reference data, not as editable inputs. */
input[readonly], textarea[readonly], select[readonly] { background: var(--bg-soft); color: var(--text-soft); cursor: default; }
/* Fieldsets group fields like a quiet card section (no UA groove border). */
fieldset { min-width: 0; margin: 0 0 var(--sp-4); padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); }
legend { padding: 0 6px; margin-bottom: var(--sp-2); color: var(--text-soft); font-size: var(--fs-sm); font-weight: 600; }
fieldset > legend { grid-column: 1 / -1; }
.field-error { color: var(--danger); font-size: .75rem; margin-top: 6px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
.field.has-error .hint { display: none; }
.field .hint { color: var(--text-mute); font-size: .72rem; margin-top: 7px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
/* Rótulo invisível que amplia a área de toque de checkboxes de tabela (44px). */
.check-hit { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.check-row { display: flex; gap: 8px; flex-wrap: wrap; }
.check-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--bg-card); font-size: .78rem; }
.check-pill:has(input:checked) { color: var(--primary-2); background: var(--primary-soft); border-color: var(--primary); }
/* Checkbox da pílula dentro de .field não herda o tamanho dos inputs de texto */
.field .check-pill input[type="checkbox"] { width: auto; min-height: 0; padding: 0; border: 0; box-shadow: none; }
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.table-wrap:focus-visible { outline-offset: 2px; }
.table-scroll-hint { display: none; color: var(--text-mute); font-size: .68rem; margin: 6px 2px 0; }
.table-wrap.is-scrollable + .table-scroll-hint { display: block; }
table.table { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--bg-card); font-size: .79rem; }
.table th { padding: 13px 17px; text-align: left; background: var(--bg-soft); color: var(--text-mute); font-size: .64rem; text-transform: uppercase; letter-spacing: .075em; font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.table td { position: relative; padding: 15px 17px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 45%, var(--bg-card)); }
.table td .small { font-size: .7rem; }
.table td > .flex { gap: 8px; }
.thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 9px; background: var(--img-bg); padding: 4px; }
.alert { display: block; padding: 14px 17px; margin-bottom: 18px; border: 1px solid; border-radius: 10px; font-size: .8rem; line-height: 1.65; }
.alert > .icon { margin-right: 8px; vertical-align: middle; }
.alert > :last-child { margin-bottom: 0; }
.alert-success { color: var(--success); background: color-mix(in srgb, var(--success) 8%, var(--bg-card)); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--bg-card)); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-warning { color: var(--warning); background: color-mix(in srgb, var(--warning) 8%, var(--bg-card)); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert-info { color: var(--info); background: color-mix(in srgb, var(--info) 8%, var(--bg-card)); border-color: color-mix(in srgb, var(--info) 25%, transparent); }

/* Workspace */
.app-shell { display: flex; min-height: 100vh; }
/* The sidebar column stretches with the page (full-height background even in
   full-page captures); the inner column stays pinned to the viewport. */
.sidebar { width: var(--sidebar-w); flex-shrink: 0; align-self: stretch; position: relative; background: #21152f; color: #eee6f6; }
.sidebar-inner { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 27px 16px 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font: 800 1.15rem var(--font-display); letter-spacing: -.06em; }
.brand-text span { font-size: .62rem; color: var(--text-mute); font-weight: 500; margin-top: 1px; }
.sidebar .brand { padding: 0 10px; color: #faf5ff; }
.sidebar .brand-mark { background: #d2b8ff; color: #381762; }
.sidebar .brand-text span { color: #b6a2c9; }
.workspace-label { display: flex; gap: 9px; align-items: center; padding: 10px 12px; margin-top: 18px; background: #ffffff06; border: 1px solid #ffffff18; border-radius: 10px; color: #cbbbdc; font-size: .7rem; }
.workspace-label .workspace-dot { width: 7px; height: 7px; background: #c4a0ff; border-radius: 50%; }
.workspace-label .badge { margin-left: auto; background: #ffffff10; color: #d3c5e4; font-size: .58rem; }
.side-nav { display: flex; flex-direction: column; flex: 1; gap: 4px; margin-top: 11px; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #6b5490 transparent; }
.nav-section { margin: 16px 12px 5px; text-transform: none; letter-spacing: 0; font-size: .71rem; color: #b6a2c9; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 8px 13px; border-radius: 8px; color: #c7b6d8; font-size: .76rem; font-weight: 500; transition: background .18s, color .18s; }
.nav-item:hover { color: #fff; background: #ffffff09; }
.nav-item.active { color: #f5ebff; background: #4a2a6c; box-shadow: inset 3px 0 #d2b8ff; }
.nav-ico { width: 20px; display: inline-flex; justify-content: center; opacity: .9; }
/* Páginas filhas no sidebar (Palavras monitoradas sob Ofertas, WhatsApp sob
   Configurações, Execuções sob Crawler): rótulo recuado, mais quieto, e o
   estado ativo herda o .nav-item.active comum — sem cores novas. */
.nav-item.nav-sub { min-height: 34px; padding: 5px 13px 5px 52px; gap: 8px; font-size: .72rem; }
.nav-item.nav-sub .nav-ico { display: none; }
.nav-item.nav-sub:not(.active) { opacity: .82; }
.nav-item.nav-sub:not(.active):hover, .nav-item.nav-sub:focus-visible { opacity: 1; }
.side-footer { margin-top: 12px; flex-shrink: 0; }
.plan-chip { padding: 17px; border: 1px solid #ffffff1c; border-radius: 12px; background: #ffffff06; color: #c6b0da; font-size: .72rem; }
.plan-chip strong { display: flex; align-items: center; gap: 7px; color: #f1e4ff; font-family: var(--font-display); font-size: .9rem; margin-bottom: 6px; }
.plan-chip .plan-meter { margin-top: 12px; }
.plan-chip .plan-meter-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: #b6a2c9; font-size: .66rem; }
.plan-chip .plan-meter-head strong { display: inline; margin: 0; color: #e7d9f7; font: 600 .66rem var(--font); font-variant-numeric: tabular-nums; }
.plan-chip .progress { height: 5px; background: #ffffff1c; }
.plan-chip .progress > span { background: #c4a0ff; }
.plan-chip .plan-chip-note { display: block; margin-top: 12px; color: #b6a2c9; }
.plan-chip a { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: #d2b8ff; font-weight: 600; }
.plan-chip a:hover { color: #ecdfff; }
/* Link secundário do card do plano ("Ver planos"): mesma família de cor, sem
   o destaque do CTA de upgrade — que só aparece perto do limite. */
.plan-chip a.plan-chip-quiet { justify-content: flex-start; color: inherit; font-weight: 500; }
.plan-chip a.plan-chip-quiet:hover { color: inherit; opacity: .82; }
/* Admin role: one quiet line, no meter or upsell. */
.plan-chip-compact { padding: 11px 13px; }
.plan-chip-compact strong { margin: 0; font-size: .78rem; }
.main-col { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 15px 32px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-card) 94%, transparent); backdrop-filter: blur(16px); }
.topbar-title { display: flex; align-items: center; gap: 12px; flex: 1; color: var(--text); font-size: .76rem; font-weight: 600; min-width: 0; }
.topbar-title .muted { font-weight: 400; }
.topbar-divider { color: var(--line); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-search { position: relative; flex: 0 1 300px; }
.topbar-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-mute); pointer-events: none; }
.topbar-search input { width: 100%; height: 42px; padding: 9px 52px 9px 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-size: .8rem; }
.topbar-search input::placeholder { color: var(--text-mute); }
.topbar-search input:focus { outline: none; border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.sidebar-search { position: relative; display: none; margin: 10px 12px 4px; }
.sidebar-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-mute); pointer-events: none; }
.sidebar-search input { width: 100%; height: 42px; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-soft); color: var(--text); font-size: .8rem; }
.sidebar-search input::placeholder { color: var(--text-mute); }
.sidebar-search input:focus { outline: none; border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); padding: 2px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--bg-card); color: var(--text-mute); font: 600 .62rem var(--font); pointer-events: none; }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 36px)); }
.toast { display: flex; gap: 9px; align-items: center; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-card); color: var(--text); box-shadow: var(--shadow); font-size: .8rem; font-weight: 500; }
.toast .icon { color: var(--success); flex: none; }
.toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-close { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text-mute); font-size: 1.05rem; line-height: 1; cursor: pointer; }
.toast-close:hover { background: var(--bg-soft); color: var(--text); }
.toast-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.toast-error .icon { color: var(--danger); }
.toast-warning .icon { color: var(--warning); }
.toast-info .icon { color: var(--info); }
.back-to-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; box-shadow: var(--shadow); background: var(--bg-card); }
.back-to-top[hidden] { display: none !important; }
.back-to-top .icon { transform: rotate(-90deg); }
.toast-region + .back-to-top, .back-to-top.has-toasts { bottom: 86px; }
.sticky-cta { display: none; }
.save-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-top: 16px; border: 1px solid var(--primary); border-radius: 12px; background: color-mix(in srgb, var(--primary-soft) 88%, var(--bg-card)); box-shadow: var(--shadow-soft); }
.save-bar .muted { margin-right: auto; }
/* Sticky action bars are opt-in (.form-actions--sticky) and only for one long
   form per page — sticky bars cover the fields under them otherwise. */
.form-actions--sticky { position: sticky; bottom: 14px; z-index: 25; }
html:has(.form-actions--sticky) { scroll-padding-bottom: 110px; }
/* Formulários de ação inline em linhas de tabela (sinônimo de .row-form) */
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.score { display: inline-flex; align-items: center; gap: 5px; color: var(--text-soft); font-size: .78rem; font-weight: 600; }
.score .icon { color: var(--warning); }
.coupon-chip { display: inline-flex; align-items: center; gap: 6px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 0 4px 0 16px; margin-left: 5px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-sm); }
.user-chip:hover { color: var(--primary-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #eddec9; color: #725738; font-size: .8rem; font-weight: 700; }
html[data-theme="dark"] .avatar, .theme-dark .avatar { background: #3a2f22; color: #e8c9a0; }
.user-meta { display: flex; flex-direction: column; line-height: 1.4; max-width: 145px; }
.user-meta strong { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: .62rem; color: var(--text-mute); }
.menu-toggle, .sidebar-close, .sidebar-backdrop { display: none; }
.content { width: 100%; max-width: 1560px; margin: 0 auto; padding: 34px 32px 60px; }
.page-heading { margin-bottom: 28px; align-items: flex-end; }
.page-heading p { font-size: .82rem; }
.page-heading h1 { margin-bottom: 7px; }
.page-heading .flex { flex-wrap: wrap; }
.workspace-footer { margin-top: auto; padding: 18px 32px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--text-mute); font-size: .65rem; }
.workspace-footer-links { display: flex; gap: 18px; }
.workspace-footer-links a { color: var(--text-soft); }
.workspace-footer-links a:hover { color: var(--primary-2); }
.dashboard-charts { grid-template-columns: 1.5fr 1fr 1fr; }
.dashboard-charts .card { padding: 22px; }
.quick-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.quick-action { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 14px 10px; color: var(--text-soft); border: 1px solid var(--line); border-radius: 10px; background: var(--bg-card); font-size: .71rem; font-weight: 500; transition: border-color .18s, background .18s; }
.quick-action span { color: var(--primary); display: flex; }
.quick-action:hover { color: var(--primary-2); border-color: var(--primary); background: var(--primary-soft); }
.chart-box { position: relative; height: 250px; }
.chart-box-sm { height: 200px; }
.chart-fallback { padding: 15px; font-size: .8rem; color: var(--text-soft); }
.chart-empty { display: grid; place-items: center; height: 100%; margin: 0; color: var(--text-mute); font-size: var(--fs-base); text-align: center; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .78rem; color: var(--text-soft); }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.progress { height: 6px; border-radius: 999px; background: var(--bg-card-2); overflow: hidden; }
.progress > span { height: 100%; display: block; background: var(--primary); border-radius: inherit; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .8rem; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-soft); min-width: 0; flex: 0 0 auto; max-width: 55%; } /* rótulo não encolhe letra a letra; quebra só entre palavras */
.kv .v { font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.filters .field { min-width: 140px; flex: 1 1 140px; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 24px; color: var(--text-soft); font-size: .8rem; flex-wrap: wrap; }
.pager-nav { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-soft); font-size: .8rem; font-weight: 600; }
a.pager-nav:hover { border-color: var(--primary); color: var(--primary-2); background: var(--primary-soft); }
.pager-nav[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.empty { text-align: center; padding: 40px 24px; background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--text-soft); }
.empty h2, .empty h3 { color: var(--text); margin-bottom: .4em; }
.empty .big { width: 58px; height: 58px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 18px; background: var(--bg-card); color: var(--primary); }
.empty p { max-width: 440px; margin: 0 auto 1em; }
.empty .btn { margin-top: 2px; }
/* Sem ação possível (ou já oferecida no cabeçalho): variante mais quieta e
   compacta — mesma mensagem, menos presença. */
.empty[data-empty-quiet] { padding: 28px 22px; }
.panel-body .empty { padding: 28px 20px; }
.bulk-bar { display: none; position: sticky; top: 90px; z-index: 15; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--primary); border-radius: 10px; background: var(--primary-soft); box-shadow: var(--shadow-soft); }
.bulk-bar.visible { display: flex; }
.bulk-count { color: var(--text-soft); font-size: .8rem; margin-right: 5px; }
.bulk-bar input[type="checkbox"], .table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.activity-feed { display: flex; flex-direction: column; }
.activity-item { display: flex; align-items: flex-start; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border: 0; }
.activity-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.activity-body { min-width: 0; }
.activity-body .small:first-child { color: var(--text); font-weight: 500; }
/* Listas ranqueadas (top ofertas, grupos) e lista de ações: vocabulário
   compartilhado do dashboard — baseline canônico aqui, espelhado em
   pages/work1.css (mesmos valores, sem divergência visual). */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.rank-item:last-child { border-bottom: 0; }
.rank-main { min-width: 0; }
.rank-values { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.cell-main { color: var(--text); font-weight: 600; font-size: var(--fs-base); overflow-wrap: anywhere; }
.cell-sub { color: var(--text-mute); font-size: var(--fs-xs); margin-top: 2px; overflow-wrap: anywhere; }
a.cell-main:hover { color: var(--primary-2); }
.action-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.action-item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.action-item:last-child { border-bottom: 0; }
.action-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-full); background: var(--bg-card-2); color: var(--text-soft); flex-shrink: 0; }
.action-ico.tone-warning { background: var(--warning-soft); color: var(--warning); }
.action-ico.tone-danger { background: var(--danger-soft); color: var(--danger); }
.action-ico.tone-info { background: var(--info-soft); color: var(--info); }
.action-ico.tone-success { background: var(--success-soft); color: var(--success); }
.action-ico.tone-muted { background: var(--bg-card-2); color: var(--text-mute); }
.action-label { flex: 1; min-width: 0; font-size: var(--fs-base); color: var(--text); }
.all-clear { display: flex; align-items: flex-start; gap: 14px; padding: 6px 2px; }
.all-clear-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--success-soft); color: var(--success); flex-shrink: 0; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-row .btn { flex: 1 1 120px; }
.plan-usage { max-width: 340px; padding: 13px 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; }
.plan-usage-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: var(--text-soft); font-size: .73rem; }
.plan-usage-head strong { color: var(--text); }
.onboarding { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 24%, var(--line)); }
.onboarding-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.onboarding-step { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; font-size: .75rem; color: var(--text-soft); }
.onboarding-step .check { display: grid; place-items: center; flex-shrink: 0; width: 23px; height: 23px; border: 1px solid var(--line); border-radius: 50%; }
.onboarding-step.done .check { color: var(--bg-card); background: var(--primary); border-color: var(--primary); }
.onboarding-step.done { color: var(--text); }
.onboarding-step a { margin-left: auto; white-space: nowrap; }
.notif-wrap { position: relative; }
.notif-badge { position: absolute; top: 1px; right: 0; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; background: #c6454f; color: white; font-size: .58rem; border-radius: 10px; border: 2px solid var(--bg-card); }
.notif-dropdown { display: none; position: absolute; top: calc(100% + 14px); right: 0; width: 360px; max-width: calc(100vw - 32px); background: var(--bg-card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 14px; overflow: hidden; z-index: 80; }
.notif-dropdown.open { display: block; }
.notif-head { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); font-size: .8rem; }
.notif-list { max-height: 330px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 15px 18px; color: var(--text-soft); border-bottom: 1px solid var(--line); }
.notif-item:hover, .notif-item.unread { background: var(--primary-soft); }
.notif-item strong { font-size: .79rem; color: var(--text); }
.notif-dot { width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.notif-item:not(.unread) .notif-dot { background: var(--line); }
.notif-empty { padding: 30px 18px; color: var(--text-mute); text-align: center; }
.notif-foot { display: block; padding: 13px; text-align: center; color: var(--primary-2); font-weight: 600; font-size: .76rem; }

/* Storefront */
.public-body { background: var(--bg-card); }
.container { width: min(1192px, calc(100% - 64px)); margin: 0 auto; }
.public-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg-card) 95%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); padding: max(19px, env(safe-area-inset-top)) 0 19px; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: .79rem; font-weight: 500; }
.public-nav .nav-links { margin-left: auto; }
.nav-links > a:not(.btn) { color: var(--text-soft); }
.nav-links > a:hover { color: var(--primary); }
.public-menu-toggle { display: none; }
.hero { padding: 82px 0 0; background: var(--bg); }
.hero-layout { display: grid; grid-template-columns: 1.12fr 1fr; gap: 64px; align-items: center; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; padding: 7px 12px; border-radius: 6px; color: var(--primary-2); background: var(--primary-soft); font-size: .68rem; font-weight: 600; }
.hero h1 { font-size: clamp(2.6rem, 4.6vw, 4.1rem); line-height: 1.09; font-weight: 800; letter-spacing: -.065em; margin-bottom: 24px; }
.hero h1 .grad { color: var(--primary); }
.hero p.lead { max-width: 470px; color: var(--text-soft); font-size: .98rem; line-height: 1.85; margin-bottom: 27px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-assurance { display: flex; align-items: center; gap: 6px; color: var(--text-mute); font-size: .67rem; margin: 15px 0 0; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 68px; padding: 30px 0; border-top: 1px solid var(--line); gap: 24px; }
.hero-stats > div { border-right: 1px solid var(--line); padding-left: 14px; }
.hero-stats > div:first-child { padding-left: 0; }
.hero-stats > div:last-child { border: 0; }
.hero-stats .num { font: 800 1.65rem var(--font-display); letter-spacing: -.04em; }
.hero-stats .lbl { color: var(--text-mute); font-size: .7rem; margin-top: 3px; }
.hero-visual { position: relative; padding: 28px; border-radius: 26px; background: var(--primary-soft); background-image: radial-gradient(color-mix(in srgb, var(--primary) 28%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.workflow-preview { position: relative; padding: 25px; background: var(--bg-card); color: var(--text); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.preview-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.preview-heading strong { font-family: var(--font-display); font-size: .9rem; }
.preview-heading span { color: var(--text-soft); font-size: .62rem; }
.preview-number { color: var(--text-mute); font-size: .63rem; letter-spacing: .1em; }
.marketplace-row { display: flex; gap: 8px; margin: 12px 0 19px; }
.marketplace-pill { flex: 1; display: grid; place-items: center; height: 42px; border: 1px solid var(--line); border-radius: 8px; font-size: .65rem; font-weight: 700; background: var(--bg-soft); }
.marketplace-pill:first-child { color: #b7401e; } .marketplace-pill:nth-child(2) { color: #766016; } .marketplace-pill:last-child { color: #815321; }
html[data-theme="dark"] .marketplace-pill:first-child, .theme-dark .marketplace-pill:first-child { color: #eba287; }
html[data-theme="dark"] .marketplace-pill:nth-child(2), .theme-dark .marketplace-pill:nth-child(2) { color: #e4c173; }
html[data-theme="dark"] .marketplace-pill:last-child, .theme-dark .marketplace-pill:last-child { color: #d9a878; }
.workflow-connector { width: 1px; height: 23px; margin: 0 auto; background: var(--line); position: relative; }
.workflow-connector::after { content: ''; position: absolute; width: 5px; height: 5px; border: solid var(--text-mute); border-width: 0 1px 1px 0; transform: rotate(45deg); bottom: 1px; left: -2px; }
.preview-ai { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--primary-soft); padding: 16px; }
.preview-ai .icon { color: var(--primary); }
.preview-ai strong { display: block; font-size: .8rem; }
.preview-ai small { display: block; color: var(--text-soft); font-size: .65rem; margin-top: 2px; }
.preview-offer { padding: 17px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 15px; }
.preview-offer-image { width: 58px; height: 67px; flex-shrink: 0; display: grid; place-items: center; background: var(--img-bg); border-radius: 8px; color: var(--text-mute); }
.preview-offer-image img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.preview-offer strong { display: block; font-size: .74rem; line-height: 1.5; }
.preview-offer .preview-price { margin-top: 4px; color: var(--primary-2); font-size: 1.06rem; font-weight: 800; }
.preview-bottom { display: flex; align-items: center; gap: 9px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--text-soft); font-size: .66rem; }
.preview-bottom .icon { color: var(--primary); }
.visual-caption { margin: 17px 0 0; text-align: center; color: var(--text-soft); font-size: var(--fs-xs); letter-spacing: .02em; }
.section { padding: 72px 0; }
.section-title { margin-bottom: 32px; text-align: center; }
.section-title h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.05em; }
.section-title p { max-width: 580px; color: var(--text-soft); margin: 0 auto; font-size: .88rem; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; text-align: left; gap: 24px; }
.section-heading p { margin-left: 0; }
.section-tinted { background: var(--bg); border-block: 1px solid var(--line); }
.feature-card { padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-card); }
.feature-ico { width: 44px; height: 44px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); border-radius: 12px; margin-bottom: 23px; }
.feature-card h3 { margin-bottom: 10px; font-size: 1.02rem; }
.feature-card p { color: var(--text-soft); font-size: .82rem; line-height: 1.8; margin: 0; }
.steps, .steps-3 { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step, .step-card { padding: 28px; border-top: 1px solid var(--line); }
.step-num { font: 500 2.4rem var(--font-display); color: var(--primary); opacity: .7; margin-bottom: 26px; letter-spacing: -.06em; }
.step-card p { margin: 0; font-size: .83rem; line-height: 1.8; }
.offer-card { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--line); border-radius: 15px; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.offer-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); box-shadow: var(--shadow); }
.offer-card .img { width: 100%; height: auto; aspect-ratio: 1.45; object-fit: contain; background: var(--img-bg); padding: 24px; }
.offer-card:focus-within { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); box-shadow: var(--shadow-soft); }
.offer-card .body { display: flex; flex-direction: column; flex: 1; padding: 22px; }
.offer-card .title { font-family: var(--font-display); font-size: .93rem; font-weight: 700; line-height: 1.5; min-height: 44px; margin: 14px 0; }
.offer-card .body > .flex-between:last-child { margin-top: auto; padding-top: 20px; }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-now { font: 800 1.5rem var(--font-display); letter-spacing: -.05em; color: var(--primary-2); white-space: nowrap; }
.price-old { color: var(--text-mute); font-size: .78rem; text-decoration: line-through; }
.product-placeholder { display: grid; place-items: center; min-height: 160px; aspect-ratio: 1.45; background: var(--bg-soft); color: var(--text-mute); }
.product-placeholder .icon { width: 42px; height: 42px; opacity: .45; }
.product-detail-image { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; padding: 28px; background: var(--img-bg); border-radius: 14px; }
.offer-row { flex-direction: row; gap: 20px; align-items: center; padding: 20px; }
.offer-row-image { width: 100px; height: 100px; object-fit: contain; padding: 8px; border-radius: 10px; flex-shrink: 0; background: var(--img-bg); }
.offer-row .title { min-height: 0; margin: 8px 0; }
.pricing-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 36px; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 33px 27px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; }
.price-card.featured { border: 2px solid var(--primary); background: color-mix(in srgb, var(--primary-soft) 45%, var(--bg-card)); }
.plan-name { font: 800 1.1rem var(--font-display); }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; font: 800 clamp(2.15rem, 3.4vw, 2.9rem)/1.1 var(--font-display); letter-spacing: -.055em; margin: 17px 0 5px; font-variant-numeric: tabular-nums; }
.plan-price .price-amount { font: inherit; letter-spacing: inherit; color: var(--text); white-space: nowrap; }
.plan-price span:not(.price-amount) { color: var(--text-soft); font: 500 .82rem var(--font); letter-spacing: 0; }
.price-card ul { list-style: none; padding: 0; margin: 24px 0 30px; flex: 1; border-top: 1px solid var(--line); padding-top: 19px; }
.price-card li { display: flex; gap: 10px; padding: 8px 0; color: var(--text-soft); font-size: .8rem; }
.price-card li::before { content: '✓'; color: var(--primary); font-weight: 700; }
.plan-flag { position: absolute; top: -14px; right: 23px; background: var(--primary); color: var(--on-primary); border-radius: 6px; padding: 5px 13px; font-size: .61rem; font-weight: 700; letter-spacing: .05em; }
.plans-teaser { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 22px 28px; }
.closing-cta { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 48px; background: #32174f; color: #f8f0ff; border-radius: 20px; }
.closing-cta h2 { font-size: 2rem; letter-spacing: -.05em; }
.closing-cta p { margin: 0; color: #cdb5e2; font-size: .88rem; max-width: 490px; }
.closing-cta .btn { background: #e7d4ff; color: #452066; border-color: #e7d4ff; flex-shrink: 0; }
.public-footer { padding: 50px 0 max(24px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; }
.footer-grid p { max-width: 360px; font-size: .77rem; line-height: 1.8; margin-top: 18px; }
.footer-grid .footer-title, .footer-grid h4 { font-family: var(--font); font-size: .75rem; margin-bottom: 18px; }
.footer-grid > div > a, .footer-grid > div > span { display: block; margin-bottom: 11px; color: var(--text-soft); font-size: .76rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--text-mute); font-size: .64rem; }
.landing-hero { padding: 57px 0 39px; background: var(--bg); border-bottom: 1px solid var(--line); text-align: center; margin-bottom: 26px; }
.landing-hero h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.05em; max-width: 960px; margin: 0 auto 17px; }
.landing-hero .sub { font-size: .9rem; color: var(--text-soft); max-width: 660px; margin: 0 auto; line-height: 1.8; }
.landing-hero .hero-tag { margin-bottom: 16px; }
.theme-light, .theme-dark { background: var(--bg); color: var(--text); }
.theme-gradient { background: linear-gradient(135deg, var(--primary-soft), var(--bg)); }
.filter-bar { display: flex; flex-direction: column; gap: 18px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.filter-row .field { flex: 1 1 150px; }
.filter-row .field-grow { flex: 2 1 220px; }
.filter-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.filter-chips, .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row { justify-content: center; }
.chip { display: inline-flex; gap: 8px; align-items: center; min-height: 38px; padding: 8px 13px; border: 1px solid var(--line); background: var(--bg-card); border-radius: 8px; color: var(--text-soft); font-size: .73rem; font-weight: 500; transition: background .18s, border-color .18s; }
.chip:hover, .chip-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-2); }
.chip-count { color: var(--text-mute); padding-left: 8px; border-left: 1px solid var(--line); font-size: .65rem; }

/* Account entry */
.auth-body { min-height: 100dvh; background: var(--bg-card); }
.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-story { background: #2a163f; color: #faf3ff; padding: 40px clamp(32px, 6vw, 90px); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-story .brand { color: #faf3ff; }
.auth-story .brand-mark { background: #d9b8ff; color: #47236d; }
.auth-story .brand-text span { color: #bda3d0; }
.auth-story-content { margin: auto 0; padding: 66px 0; position: relative; z-index: 1; max-width: 440px; }
.auth-story .eyebrow { color: #d5b3ff; }
.auth-story h2 { font-size: clamp(2.2rem, 3.7vw, 3.5rem); letter-spacing: -.055em; line-height: 1.15; }
.auth-story h2 em { color: #d9b8ff; font-style: normal; }
.auth-story p { font-size: .88rem; color: #cdb8df; max-width: 370px; line-height: 1.9; }
.auth-benefits { display: flex; flex-direction: column; gap: 19px; padding-top: 22px; }
.auth-benefits > div { display: flex; align-items: center; gap: 14px; font-size: .78rem; }
.auth-benefits .icon { color: #d9b8ff; }
.auth-story-foot { font-size: .65rem; color: #b299c7; padding-top: 25px; border-top: 1px solid #ffffff20; }
.auth-panel { display: flex; flex-direction: column; align-items: center; padding: max(30px, env(safe-area-inset-top)) 32px max(30px, env(safe-area-inset-bottom)); }
.auth-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: .74rem; }
.auth-wrap { width: min(400px, 100%); margin: auto; padding: 40px 0; }
.auth-card { padding: 0; }
.auth-card h1 { font-size: 1.85rem; letter-spacing: -.05em; }
.auth-card > .muted { font-size: .82rem; margin-bottom: 28px; }
.auth-card .form-grid { gap: 20px; }
.auth-card .field input { min-height: 48px; }
.auth-card .btn-lg { min-height: 49px; }
.auth-foot { font-size: .66rem; text-align: center; color: var(--text-mute); margin: 26px 0 0; }
.auth-foot p { margin: 0; }
.brand-center { justify-content: center; margin-bottom: 22px; }
.section-nav { display: flex; gap: 5px; padding: 6px; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); overflow-x: auto; position: sticky; top: 86px; z-index: 18; }
.section-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 10px 15px; color: var(--text-soft); font-size: .75rem; white-space: nowrap; border-radius: 7px; }
.section-nav a:hover, .section-nav a:focus { color: var(--primary-2); background: var(--primary-soft); }
.section-nav a.active, .section-nav a[aria-current="true"] { color: var(--primary-2); background: var(--primary-soft); font-weight: 700; }
/* From 768px the strip wraps instead of clipping section links at the right
   edge; below that it stays a single scrollable row (mobile tab strip). */
@media (min-width: 768px) { .section-nav { flex-wrap: wrap; overflow-x: visible; } }
.settings-overview { align-items: start; }
.checkout-summary { padding: 26px; margin: 24px 0; background: var(--primary-soft); border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.checkout-summary > strong { font: 700 1.15rem var(--font-display); }
.checkout-summary .stat-value { font-size: 2.3rem; margin: 8px 0; }
.error-state { max-width: 760px; margin: 36px auto; padding: 50px 30px; border-style: solid; background: var(--bg-card); }
.error-code { font: 800 clamp(5rem, 12vw, 8rem)/1.2 var(--font-display); color: color-mix(in srgb, var(--primary) 72%, var(--bg-card)); letter-spacing: -.07em; margin-bottom: 22px; }

/* ============================================================
   Buttons — variants, sizes, states (see also §04 core rules above)
   ============================================================ */
.btn-secondary { background: var(--bg-card); color: var(--text); border-color: color-mix(in srgb, var(--text-mute) 35%, var(--line)); }
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--text-mute); color: var(--text); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row .btn { flex: 0 1 auto; }

/* ============================================================
   Forms — input groups, switch, segmented control, copy field
   ============================================================ */
.input-group { display: flex; align-items: stretch; gap: 0; min-height: 43px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); overflow: hidden; transition: box-shadow .18s, border-color .18s; }
.input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.input-group input { flex: 1; min-width: 0; min-height: 41px; padding: 10px 13px; border: 0; background: transparent; color: var(--text); font: var(--fs-md) var(--font); }
.input-group input:focus { outline: none; box-shadow: none; }
.input-group-addon { display: inline-flex; align-items: center; padding: 0 13px; background: var(--bg-soft); color: var(--text-mute); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.input-group-addon:first-child { border-right: 1px solid var(--line); }
.input-group-addon:last-child { border-left: 1px solid var(--line); }
.input-group-addon .btn-icon { width: 34px; height: 34px; }
.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field input { flex: 1; min-width: 0; font-family: var(--font); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; font-size: var(--fs-base); }
.copy-field input.mono { font-family: 'Cascadia Code', Consolas, monospace; }
.copy-field .btn { flex-shrink: 0; }

.switch { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; flex-shrink: 0; width: 42px; height: 24px; border: 1px solid var(--line); border-radius: var(--radius-full); background: var(--bg-card-2); transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base); }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg-card); box-shadow: var(--shadow-xs); transition: transform var(--dur-base) var(--ease-out); }
.switch input:checked + .switch-track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: var(--on-primary); }
.switch input:focus-visible + .switch-track { outline: var(--focus-ring); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: .55; }
.switch-text { font-size: var(--fs-base); color: var(--text-soft); }
/* Escuro: o botão desligado era mais escuro que o trilho (quase invisível);
   agora botão claro e trilho com borda legível (contraste ≥ 3:1). */
html[data-theme="dark"] .switch-track, .theme-dark .switch-track { border-color: color-mix(in srgb, var(--text-mute) 55%, var(--line)); }
html[data-theme="dark"] .switch-track::after, .theme-dark .switch-track::after { background: var(--text-soft); }
html[data-theme="dark"] .switch input:checked + .switch-track::after,
.theme-dark .switch input:checked + .switch-track::after { background: var(--on-primary); }
/* .field label is display:block (0-1-1); keep a switch label inline inside fields. */
.field label.switch { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 0; font-size: inherit; font-weight: inherit; color: inherit; }

.segmented { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); }
.segmented button { min-height: 34px; padding: 6px 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-soft); font-size: var(--fs-base); font-weight: 600; transition: background var(--dur-base), color var(--dur-base); }
.segmented button:hover { color: var(--text); background: var(--bg-soft); }
.segmented button[aria-pressed="true"], .segmented button.active { background: var(--primary-soft); color: var(--primary-2); }
.segmented button:focus-visible { outline: var(--focus-ring); outline-offset: 1px; }

/* ============================================================
   Panels & page structure — hierarchy without identical cards
   ============================================================ */
.panel { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: var(--fs-lg); }
.panel-body { padding: 20px; min-width: 0; }
.panel-body > :first-child { margin-top: 0; }
.panel-body > :last-child { margin-bottom: 0; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg-soft); border-radius: 0 0 var(--radius-md) var(--radius-md); }
.panel-flat { border-radius: var(--radius-sm); }
/* Ação de cabeçalho (botão pequeno, segmented, form): não encolhe e vai para a
   direita mesmo quando quebra para a própria linha em telas estreitas. */
.panel-head > .btn, .panel-head > .btn-sm, .panel-head > .segmented,
.panel-head > form, .panel-head > .panel-actions, .panel-head > .badge {
    flex-shrink: 0; margin-left: auto;
}
.panel-head .segmented { padding: 3px; }
.panel-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
/* Painéis adiáveis (<details class="panel panel-deferred">): o sumário imita o
   .panel-head e ganha marcador (chevron) + foco próprios. Valores espelham o
   padrão estabelecido em pages/work1.css para o visual não divergir. */
.panel-deferred > .panel-deferred-head { list-style: none; cursor: pointer; }
.panel-deferred > .panel-deferred-head::-webkit-details-marker { display: none; }
.panel-deferred > .panel-deferred-head {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px; border-bottom: 1px solid transparent;
}
.panel-deferred[open] > .panel-deferred-head { border-bottom-color: var(--line); }
.panel-deferred-head h2 {
    flex: 1; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin: 0; font-size: var(--fs-lg);
}
.panel-deferred-head h2 .badge { flex-shrink: 0; }
.panel-deferred > .panel-deferred-head::after {
    content: ''; flex-shrink: 0; width: 8px; height: 8px; margin-right: 2px;
    border-right: 2px solid var(--text-mute); border-bottom: 2px solid var(--text-mute);
    transform: rotate(45deg); transition: transform var(--dur-base) var(--ease-out);
}
.panel-deferred[open] > .panel-deferred-head::after { transform: rotate(-135deg); }
.panel-deferred-head:focus-visible { outline: var(--focus-ring); outline-offset: -3px; }
/* Baseline genérico de <details><summary>: marcador chevron coerente com o
   sistema + anel de foco. Padrões específicos (accordion, panel-deferred,
   activity-more) mantêm seus próprios marcadores por especificidade. */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
    /* inline-block: fora de um summary flex o ::after inline virava um traço "|" */
    content: ''; display: inline-block; vertical-align: .2em; flex-shrink: 0; width: 8px; height: 8px; margin-left: auto;
    border-right: 2px solid var(--text-mute); border-bottom: 2px solid var(--text-mute);
    transform: rotate(45deg); transition: transform var(--dur-base) var(--ease-out);
}
details[open] > summary::after { transform: rotate(-135deg); }
details > summary:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-xs); }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 16px; font-size: var(--fs-sm); color: var(--text-mute); }
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs a:hover { color: var(--primary-2); }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 600; }
.breadcrumbs .crumb-sep { color: var(--line); user-select: none; }

/* ============================================================
   Tables — row actions & selection affordances
   ============================================================ */
.table-compact th, .table-compact td { padding: 9px 13px; }
/* Tables inside narrow (half-width) cards: use .table-wrap.table-fit — the table
   drops the 640px min-width and columns marked .col-optional disappear below
   640px of container width (container query), so the card never needs scrolling. */
.table-wrap.table-fit { container-type: inline-size; }
.table-wrap.table-fit table.table { min-width: 0; }
@container (max-width: 640px) {
    .table-fit .col-optional { display: none; }
}
.row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.table .cell-main { color: var(--text); font-weight: 600; }
.table .cell-sub { color: var(--text-mute); font-size: .7rem; }

/* ============================================================
   14 · Overlays — modal, drawer, dropdown menu, tooltip
   ============================================================ */
.overlay-backdrop { position: fixed; inset: 0; z-index: 100; border: 0; padding: 0; background: var(--overlay); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base); }
.overlay-backdrop.open { opacity: 1; visibility: visible; }

.modal { position: fixed; left: 50%; top: 50%; z-index: 110; width: min(520px, calc(100vw - 32px)); max-height: min(84dvh, 720px); display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay); opacity: 0; visibility: hidden; transform: translate(-50%, calc(-50% + 12px)); transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base); }
.modal.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.modal-sm { width: min(400px, calc(100vw - 32px)); }
.modal-lg { width: min(760px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 24px 0; }
.modal-head h2, .modal-head h3 { margin: 0; font-size: var(--fs-xl); letter-spacing: -.03em; }
.modal-body { padding: 14px 24px 4px; overflow-y: auto; min-width: 0; }
.modal-body > :first-child { margin-top: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 18px 24px 22px; }
.modal-foot .btn { min-width: 110px; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 110; width: min(420px, 100vw); display: flex; flex-direction: column; background: var(--bg-card); border-left: 1px solid var(--line); box-shadow: var(--shadow-overlay); visibility: hidden; transform: translateX(100%); transition: transform var(--dur-slow) var(--ease-out), visibility var(--dur-slow); }
.drawer.open { visibility: visible; transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2, .drawer-head h3 { margin: 0; font-size: var(--fs-lg); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drawer-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); }

.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: calc(100% + 10px); right: 0; z-index: 85; min-width: 232px; padding: 6px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.dropdown-menu.open { display: block; }
.dropdown-menu.from-left { right: auto; left: 0; }
.menu-label { padding: 9px 12px 5px; color: var(--text-mute); font-size: var(--fs-xs); font-weight: 600; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 9px 12px; border: 0; border-radius: var(--radius-xs); background: none; color: var(--text); font: var(--fs-base) var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--primary-soft); color: var(--primary-2); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-soft); color: var(--danger); }
.menu-item .icon { color: var(--text-mute); }
.menu-divider { height: 1px; margin: 6px 8px; background: var(--line); }
.menu-form { margin: 0; }

[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 95; padding: 6px 10px; border-radius: var(--radius-xs); background: var(--text); color: var(--bg-card); font-size: var(--fs-xs); font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out); }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; }

/* ============================================================
   15 · Navigation — tabs, section nav already in §12, pagination
   ============================================================ */
.tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tab { min-height: 42px; padding: 10px 15px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-soft); font-size: var(--fs-base); font-weight: 600; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"], .tab.active { color: var(--primary-2); border-bottom-color: var(--primary); }
.tab:focus-visible { outline: var(--focus-ring); outline-offset: -3px; border-radius: var(--radius-xs); }
.tab-panel > :first-child { margin-top: 0; }

.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 38px; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-soft); font-size: var(--fs-base); font-weight: 600; }
.pagination a:hover { border-color: var(--primary); color: var(--primary-2); background: var(--primary-soft); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pagination .gap { border: 0; background: none; min-width: 24px; }
.pagination .pager-nav[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ============================================================
   16 · Marketing kit additions — shot frame, billing toggle,
   comparison, FAQ, testimonial/proof
   ============================================================ */
.shot-frame { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--bg-card); box-shadow: var(--shadow-lg); }
.shot-bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.shot-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.shot-title { margin-left: 8px; color: var(--text-mute); font-size: var(--fs-xs); }
.shot-body { padding: 18px; background: var(--img-bg); }

.billing-toggle { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px; }
.billing-save { margin-left: 2px; }

.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
table.compare { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--bg-card); font-size: var(--fs-base); }
.compare th, .compare td { padding: 13px 18px; border-bottom: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--text-soft); }
.compare thead th { background: var(--bg-soft); color: var(--text); font-family: var(--font-display); font-size: var(--fs-md); }
.compare thead th.featured { color: var(--primary-2); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare .icon { vertical-align: middle; }
.compare .yes { color: var(--success); }
.compare .no { color: var(--text-mute); }

.faq { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }
.accordion { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); overflow: hidden; }
.accordion-item { border: 0; }
.accordion-item + .accordion-item { border-top: 1px solid var(--line); }
.accordion-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; padding: 15px 18px; font: 600 var(--fs-md)/1.45 var(--font); color: var(--text); cursor: pointer; list-style: none; }
.accordion-item > summary::-webkit-details-marker { display: none; }
.accordion-item > summary::after { content: '+'; flex-shrink: 0; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--text-soft); font-size: .95rem; font-weight: 500; line-height: 1; }
.accordion-item > summary::after { margin-left: 0; transform: none; }
/* O chevron genérico de details (rotate 45°) virava o "+" num "×" — o marcador do accordion não gira. */
.accordion-item[open] > summary::after { transform: none; }
.accordion-item[open] > summary::after { content: '−'; border-color: var(--primary); color: var(--primary-2); }
.accordion-item > summary:focus-visible { outline: var(--focus-ring); outline-offset: -3px; }
.accordion-body { padding: 0 18px 18px; color: var(--text-soft); font-size: var(--fs-base); line-height: 1.8; }
.accordion-body > :last-child { margin-bottom: 0; }

.testimonial { display: flex; flex-direction: column; gap: 18px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); }
.testimonial blockquote { margin: 0; font: 600 var(--fs-xl)/1.7 var(--font-display); letter-spacing: -.025em; color: var(--text); }
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testimonial-author .avatar { width: 40px; height: 40px; }
.testimonial-author strong { display: block; font-size: var(--fs-base); }
/* :not(.avatar) keeps the initials on .avatar's own colors — the generic span
   rule used to win on specificity and pushed them to --text-mute (4.18:1). */
.testimonial-author span:not(.avatar) { color: var(--text-mute); font-size: var(--fs-sm); }
.proof-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 32px; color: var(--text-mute); font-size: var(--fs-base); font-weight: 500; }
.proof-bar strong { color: var(--text); font-family: var(--font-display); font-size: var(--fs-lg); letter-spacing: -.03em; }

.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 44px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--primary-soft); }
.cta-band h2 { font-size: var(--fs-2xl); letter-spacing: -.045em; margin-bottom: 8px; }
.cta-band p { margin: 0; color: var(--text-soft); max-width: 480px; }

/* ============================================================
   18 · Misc — code block, stepper, onboarding already above
   ============================================================ */
.code-block { position: relative; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-soft); }
.code-block pre { margin: 0; font: .75rem/1.75 'Cascadia Code', Consolas, monospace; color: var(--text); white-space: pre; }
.code-block .btn-icon { position: absolute; top: 8px; right: 8px; background: var(--bg-card); border: 1px solid var(--line); }

.stepper { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: step; }
.stepper-step { display: flex; align-items: center; gap: 11px; flex: 1 1 180px; min-width: 0; padding-right: 18px; }
.stepper-marker { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg-card); color: var(--text-soft); font-size: var(--fs-sm); font-weight: 700; }
.stepper-step.done .stepper-marker { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.stepper-step.current .stepper-marker { border-color: var(--primary); color: var(--primary-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.stepper-label { min-width: 0; }
.stepper-label strong { display: block; font-size: var(--fs-base); color: var(--text); }
.stepper-label span { color: var(--text-mute); font-size: var(--fs-sm); }
.stepper-step:not(:last-child) .stepper-marker { position: relative; }
.stepper-step:not(:last-child)::after { content: ''; flex: 1; height: 1px; min-width: 18px; background: var(--line); }

.auth-code { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.auth-code input { width: 46px; height: 52px; text-align: center; font: 700 1.2rem var(--font-display); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text); }

/* Responsive additions for the new components */
@media (max-width: 720px) {
    .modal { width: calc(100vw - 24px); max-height: 86dvh; }
    .drawer { width: 100vw; }
    .cta-band { flex-direction: column; align-items: flex-start; padding: 28px; }
    .stepper-step { flex-basis: 100%; padding-right: 0; }
    .stepper-step:not(:last-child)::after { display: none; }
    .btn-row .btn { flex: 1 1 140px; }
    .proof-bar { gap: 10px 20px; }
}

/* Responsive composition */
@media (min-width: 1600px) { .content { padding-top: 42px; } }
@media (max-width: 1200px) {
    :root { --sidebar-w: 222px; }
    .content { padding: 28px 24px 45px; }
    .topbar { padding-inline: 24px; }
    .user-meta { display: none; }
    .hero-layout { gap: 38px; }
    .hero-visual { padding: 20px; }
    .quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-charts > :first-child { grid-column: 1 / -1; }
    .stat-card { padding: 18px; }
    .onboarding-steps { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-layout { gap: 28px; }
    .hero h1 { font-size: 3rem; }
    .nav-links { gap: 18px; }
    .nav-links .nav-secondary { display: none; }
    .hero-visual { padding: 15px; }
    .workflow-preview { padding: 20px; }
    .pricing-grid { gap: 15px; }
    .price-card { padding: 28px 20px; }
    .auth-story { padding: 34px; }
}
@media (max-width: 900px) {
    .sidebar { position: fixed; top: 0; left: -270px; z-index: 60; width: 248px; height: 100dvh; transition: left .22s ease; visibility: hidden; }
    .sidebar-inner { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
    .nav-item { min-height: 44px; }
    .nav-item.nav-sub { min-height: 40px; }
    body.sidebar-open .sidebar { left: 0; visibility: visible; }
    body.sidebar-open { overflow: hidden; }
    .sidebar-close { display: grid; position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; color: #cdb9dc; }
    .menu-toggle { display: grid; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 50; background: #150b2499; backdrop-filter: blur(3px); border: 0; }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .topbar { min-height: 68px; padding-top: max(12px, env(safe-area-inset-top)); }
    .content { padding: 27px 22px 45px; padding-bottom: max(45px, env(safe-area-inset-bottom)); }
    .hero { padding-top: 48px; }
    .hero-layout { grid-template-columns: 1fr; gap: 40px; }
    .hero-copy { max-width: 650px; }
    .hero h1 { font-size: clamp(2.8rem, 7vw, 4rem); }
    .hero p.lead { max-width: 590px; }
    .hero-visual { max-width: 560px; width: 100%; margin: 0 auto; padding: 28px; }
    .hero-stats { margin-top: 40px; }
    .auth-shell { grid-template-columns: .85fr 1fr; }
    .auth-story h2 { font-size: 2.5rem; }
    .grid-3:not(.dashboard-charts) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps-3 { gap: 5px; }
    .step-card { padding: 22px 16px; }
    .footer-grid { gap: 30px; }
}
@media (max-width: 720px) {
    .container { width: calc(100% - 36px); }
    .public-nav { padding: max(14px, env(safe-area-inset-top)) 0 14px; }
    .public-menu-toggle { display: grid; }
    .public-nav .nav-links { display: none; position: absolute; left: 0; top: 100%; width: 100%; padding: 20px; background: var(--bg-card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); align-items: stretch; flex-direction: column; gap: 0; }
    .public-nav.menu-open .nav-links { display: flex; }
    .public-nav.menu-open .nav-secondary { display: block; }
    .public-nav .nav-links > a:not(.btn) { padding: 13px 8px; }
    .public-nav .nav-links .btn { margin-top: 10px; }
    .public-nav .theme-toggle { margin-left: auto; }
    .nav-inner { gap: 8px; }
    .topbar { padding: max(12px, env(safe-area-inset-top)) 16px 12px; gap: 8px; }
    .topbar-title { font-size: .72rem; }
    .topbar-title .muted, .topbar-divider, .topbar-upgrade { display: none; }
    .topbar-right { gap: 4px; }
    .user-chip { padding-left: 8px; margin-left: 2px; }
    .content { padding: 25px 16px max(40px, env(safe-area-inset-bottom)); }
    .page-heading { gap: 18px; margin-bottom: 24px; }
    .page-heading > .flex { width: 100%; }
    .page-heading .btn { flex: 1; }
    .card { padding: 20px; }
    .grid { gap: 14px; }
    .grid-2, .grid-3:not(.dashboard-charts), .dashboard-charts, .form-grid { grid-template-columns: 1fr; }
    .dashboard-charts > :first-child { grid-column: auto; }
    .stat-card { padding: 17px; border-radius: 13px; }
    .stat-value { font-size: clamp(1.2rem, 5.8vw, 1.65rem); }
    .stat-label, .stat-delta { font-size: .66rem; }
    .stat-label .icon { width: 15px; height: 15px; }
    .quick-actions { gap: 8px; }
    .quick-action { flex-direction: column; gap: 7px; font-size: .65rem; padding: 12px 6px; }
    .notif-dropdown { position: fixed; top: 66px; right: 16px; }
    .table-wrap { border-radius: 9px; }
    .filters .field, .filter-row .field, .filter-row .field-grow { flex: 1 1 calc(50% - 12px); min-width: 130px; }
    .filter-row .field-grow, .filter-row .btn { flex-basis: 100%; }
    .filter-meta { align-items: flex-start; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .hero-stats > div { padding-left: 0; } .hero-stats > div:nth-child(2) { border: 0; }
    .hero h1 { font-size: 2.85rem; }
    .hero p.lead { font-size: .9rem; }
    .hero-visual { padding: 20px; }
    .section { padding: 50px 0; }
    .section-heading { flex-direction: column; align-items: flex-start; gap: 15px; }
    .section-title { margin-bottom: 26px; }
    .steps, .steps-3, .pricing-grid { grid-template-columns: 1fr; gap: 26px; }
    .step-card { padding: 25px 0 5px; }
    .step-num { margin-bottom: 14px; }
    .feature-card { padding: 25px; }
    .offer-card .img { aspect-ratio: 1.6; }
    .offer-card .body { padding: 22px; }
    .offer-row { gap: 14px; flex-wrap: wrap; padding: 17px; }
    .offer-row-image { width: 76px; height: 90px; }
    .offer-row > .btn { flex-basis: 100%; }
    .closing-cta { flex-direction: column; align-items: flex-start; padding: 30px; gap: 25px; }
    .closing-cta h2 { font-size: 1.8rem; }
    .closing-cta .btn { width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
    .footer-bottom { gap: 8px; margin-top: 25px; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-story { padding: max(25px, env(safe-area-inset-top)) 25px 25px; }
    .auth-story-content { padding: 28px 0 3px; max-width: none; }
    .auth-story h2 { font-size: 1.9rem; margin: 0; }
    .auth-story .eyebrow, .auth-story-content > p, .auth-benefits, .auth-story-foot { display: none; }
    .auth-panel { padding: 20px 25px max(20px, env(safe-area-inset-bottom)); }
    .auth-wrap { padding: 35px 0; }
    .auth-card h1 { font-size: 1.6rem; }
    .plans-teaser { flex-direction: column; align-items: flex-start; }
    .landing-hero { padding-top: 36px; }
}
@media (max-width: 400px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-cta .btn { width: 100%; }
    .hero-visual { padding: 14px; }
    .workflow-preview { padding: 17px; }
    .topbar-title { font-size: .65rem; }
    .topbar-right > .user-chip { display: none; }
    .onboarding-step { flex-wrap: wrap; }
    .onboarding-step > span { flex: 1; }
    .onboarding-step a { margin-left: 33px; }
    .kv { flex-wrap: wrap; gap: 6px; }
    .kv .v { text-align: left; }
}
@media (max-width: 1200px) { .topbar-search { display: none; } .sidebar-search { display: block; } }
@media (max-width: 720px) {
    .sticky-cta { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg-card) 96%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
    .sticky-cta .price-now { font-size: 1.25rem; }
    .sticky-cta .btn { flex: 1; }
    body.has-sticky-cta, body:has(.sticky-cta) { padding-bottom: 76px; }
    .toast-region { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: none; }
    .back-to-top { bottom: calc(84px + env(safe-area-inset-bottom)); }
    .bulk-bar { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); }
    .form-actions--sticky { bottom: calc(8px + env(safe-area-inset-bottom)); }
    .section-nav { top: 74px; }
    /* Tap targets: every interactive control keeps a ≥44px hit area. */
    .chip { min-height: 44px; }
    .segmented button { min-height: 44px; }
    .pagination a, .pagination span { min-width: 44px; min-height: 44px; }
    .menu-item { min-height: 44px; }
    .section-nav a { min-height: 44px; }
    .tab { min-height: 44px; }
    .search-clear { width: 44px; height: 44px; }
    .btn-sm { min-height: 44px; }
    .check-pill { min-height: 44px; }
    .check-hit { min-width: 44px; min-height: 44px; }
    .toast-close { width: 44px; height: 44px; }
    .pager-nav { min-height: 44px; }
    .user-chip { min-height: 44px; }
    .input-group-addon .btn-icon { width: 44px; height: 44px; }
    .field input, .field select, .field textarea { min-height: 44px; }
    .row-form select { min-height: 44px; }
    .table input[type="checkbox"], .bulk-bar input[type="checkbox"] { width: 20px; height: 20px; }
    .workspace-footer { padding: 18px 18px max(18px, env(safe-area-inset-bottom)); font-size: .6rem; }
}
/* Tabelas empilham em cartões no celular. Padrão único (marque a tabela com
   .table-stack e ponha data-label nos <td>, igual às variantes page-scoped de
   ofertas/grupos/tracking): sem rolagem horizontal em 390px. */
@media (max-width: 720px) {
    table.table-stack { min-width: 0; }
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
    .table-stack tr {
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        padding: 6px 14px;
        background: var(--bg-card);
    }
    .table-stack td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 0;
        border-bottom: 1px solid var(--line);
        text-align: right;
    }
    .table-stack td:last-child { border-bottom: 0; }
    .table-stack td::before {
        content: attr(data-label);
        color: var(--text-mute);
        font-size: var(--fs-xs);
        text-align: left;
        flex-shrink: 0;
        margin-right: auto;
    }
    .table-stack td:not([data-label])::before, .table-stack td[data-label=""]::before { content: none; }
    /* A primeira célula é o título do cartão — sem rótulo, alinhada à esquerda. */
    .table-stack td:first-child { border-top: 0; padding-top: 12px; justify-content: flex-start; text-align: left; }
    .table-stack td:first-child::before { display: none; }
    .table-stack .cell-main, .table-stack .cell-sub, .table-stack .small { text-align: left; }
    .table-stack .row-actions { justify-content: flex-start; }
    .table-wrap:has(.table-stack) + .table-scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* Screenshot mode: QA sets <html data-shot> before capturing so nothing is
   caught mid-transition (charts also skip their entry animation in app.js). */
html[data-shot] *, html[data-shot] *::before, html[data-shot] *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
}
@media print {
    /* !important: componentes declarados depois (faixa do evento, "Confirme seu e-mail") não voltam no papel (UX-04). */
    .sidebar, .topbar, .public-nav, .public-footer, .workspace-footer, .quick-actions, .skip-link,
    .event-banner, .content > .alert, .toast-region, .back-to-top, [data-print-hide] { display: none !important; }
    .content, .container { width: 100%; padding: 0; }
    .card, .stat-card { break-inside: avoid; box-shadow: none; }
    body { background: white; color: black; }
}

/* ============================================================
   17 · Primitives P8 — meter, chips/tag input, variáveis, combobox,
   WhatsApp bubble, sparkline, stat tile, timeline, file drop, code/OTP,
   QR frame, filter pills, skeletons (see tools/DESIGN-SYSTEM.md §2b)
   ============================================================ */

/* --- Meter (.meter / .meter-bar) — progresso determinado e indeterminado --- */
.meter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.meter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--text-soft); font-size: var(--fs-xs); }
.meter-head strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.meter-bar { height: 8px; border-radius: var(--radius-full); background: var(--bg-card-2); overflow: hidden; }
.meter-bar > span { display: block; height: 100%; width: var(--meter-value, 0%); border-radius: inherit; background: var(--primary); transition: width var(--dur-slow) var(--ease-out); }
.meter-bar[data-indeterminate] > span { width: 40%; animation: meter-slide 1.15s var(--ease-in-out) infinite; }
@keyframes meter-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
.meter-sm .meter-bar { height: 5px; }
.meter-lg .meter-bar { height: 12px; }
.meter.tone-success .meter-bar > span { background: var(--success); }
.meter.tone-warning .meter-bar > span { background: var(--warning); }
.meter.tone-danger .meter-bar > span { background: var(--danger); }
.meter-caption { color: var(--text-mute); font-size: var(--fs-2xs); }

/* --- Chips, tag input e toggles em chip (dias da semana, palavras) --- */
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 43px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-card); cursor: text; }
.tag-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.tag-input > input { flex: 1 1 110px; min-width: 110px; min-height: 28px; padding: 3px 6px; border: 0; background: transparent; color: var(--text); font: var(--fs-base) var(--font); }
.tag-input > input:focus { outline: none; box-shadow: none; }
.tag-input > input::placeholder { color: var(--text-mute); }
.tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 4px 4px 11px; border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line)); border-radius: var(--radius-full); background: var(--primary-soft); color: var(--primary-2); font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; }
.tag-text { overflow-wrap: anywhere; }
.tag-remove { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: var(--radius-full); background: transparent; color: inherit; cursor: pointer; }
.tag-remove:hover { background: color-mix(in srgb, var(--primary) 16%, transparent); }
.tag-remove:focus-visible { outline: var(--focus-ring); outline-offset: 1px; }
.tag-remove .icon { width: 11px; height: 11px; }
.chip-toggle[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-2); }
.chip-toggle[aria-pressed="true"] .chip-check { display: inline-flex; }
.chip-toggle .chip-check { display: none; width: 13px; height: 13px; }
.chip-toggle:focus-visible { outline: var(--focus-ring); outline-offset: 1px; }
/* --- Toggle-chip de seleção múltipla (grupo de checkboxes) ---
   Label pill com o checkbox real escondido visualmente (clip — nunca
   display:none) para teclado e leitores de tela continuarem funcionando;
   checked = pill da marca preenchido + ícone de check. Sem JS: o estado
   vem do próprio checkbox dentro do label. Tokens only — claro/escuro free. */
.check-chip { position: relative; gap: 6px; padding: 7px 11px; cursor: pointer; user-select: none; }
.check-chip input[type="checkbox"] { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.check-chip .chip-check { display: none; width: 13px; height: 13px; flex: none; }
.check-chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-2); }
.check-chip:has(input:checked) .chip-check { display: inline-flex; }
.check-chip:has(input:focus-visible) { outline: var(--focus-ring); outline-offset: 1px; }
.check-chip:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.check-chip:not(:has(input:checked)):hover { border-color: var(--primary); background: var(--bg-soft); color: var(--text); }
.chip-row-weekdays { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row-weekdays .chip { min-height: 38px; padding: 7px 11px; }

/* --- Variáveis de template (inserção em textarea) --- */
.var-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 10px; border: 1px dashed color-mix(in srgb, var(--primary) 32%, var(--line)); border-radius: var(--radius-full); background: var(--bg-card); color: var(--primary-2); font-family: 'Cascadia Code', Consolas, monospace; font-size: var(--fs-2xs); font-weight: 600; cursor: pointer; }
.var-chip:hover { border-style: solid; background: var(--primary-soft); }
.var-chip:focus-visible { outline: var(--focus-ring); outline-offset: 1px; }
.var-chip-label { color: var(--text-mute); font-family: var(--font); font-weight: 500; }

/* --- Combobox (busca com lista — seletor de grupos) --- */
.combobox { position: relative; min-width: 0; }
.combobox-input { width: 100%; min-height: 43px; padding: 10px 38px 10px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-card); color: var(--text); font: var(--fs-md) var(--font); }
.combobox-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.combobox-input::placeholder { color: var(--text-mute); }
.combobox-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; }
.combobox-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70; max-height: 232px; margin: 0; padding: 5px; overflow-y: auto; list-style: none; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.combobox-list[hidden] { display: none; }
.combobox-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 8px 11px; border-radius: var(--radius-xs); color: var(--text); font-size: var(--fs-base); cursor: pointer; }
.combobox-option:hover, .combobox-option.active, .combobox-option[aria-selected="true"] { background: var(--primary-soft); color: var(--primary-2); }
.combobox-option small { color: var(--text-mute); font-size: var(--fs-2xs); }
.combobox-empty { padding: 13px 11px; color: var(--text-mute); font-size: var(--fs-base); }

/* --- Balão de mensagem do WhatsApp (preview de grupo, oferta, home mock) --- */
.wa-thread { display: flex; flex-direction: column; gap: 9px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-soft); }
.wa-thread-title { display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: var(--fs-xs); font-weight: 600; }
.wa-bubble { position: relative; max-width: min(86%, 430px); padding: 9px 12px 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); color: var(--text); font-size: var(--fs-base); line-height: 1.55; }
.wa-bubble p { margin: 0 0 4px; }
.wa-bubble p:last-child { margin-bottom: 0; }
.wa-bubble-out { align-self: flex-end; background: color-mix(in srgb, var(--primary-soft) 65%, var(--bg-card)); border-color: color-mix(in srgb, var(--primary) 20%, var(--line)); }
.wa-bubble-in { align-self: flex-start; }
.wa-bubble strong { font-weight: 700; }
.wa-bubble em { font-style: italic; }
.wa-bubble del { color: var(--text-mute); }
.wa-bubble a { color: var(--primary-2); overflow-wrap: anywhere; }
.wa-bubble-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 3px; color: var(--text-mute); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
.wa-bubble-meta .icon { width: 13px; height: 13px; }
.wa-time-divider { align-self: center; padding: 3px 10px; border-radius: var(--radius-full); background: var(--bg-card-2); color: var(--text-mute); font-size: var(--fs-2xs); }

/* --- Sparkline (SVG leve, sem Chart.js; .sparkline[data-values]) --- */
.sparkline { display: inline-block; width: 92px; height: 30px; vertical-align: middle; flex-shrink: 0; }
.sparkline svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sparkline .spark-line { fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sparkline .spark-dot { fill: var(--primary); }
.sparkline .spark-base { stroke: var(--line); stroke-width: 1.5; stroke-linecap: round; }
.sparkline.up .spark-line { stroke: var(--success); }
.sparkline.up .spark-dot { fill: var(--success); }
.sparkline.down .spark-line { stroke: var(--danger); }
.sparkline.down .spark-dot { fill: var(--danger); }
.sparkline.flat .spark-line { stroke: var(--text-mute); }
.sparkline.flat .spark-dot { fill: var(--text-mute); }
.sparkline-lg { width: 140px; height: 42px; }
.sparkline-sm { width: 60px; height: 22px; }

/* --- Stat tile (mini-métrica para grades densas) --- */
.stat-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); }
.stat-tile-label { display: flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: var(--fs-xs); font-weight: 500; }
.stat-tile-label .icon { color: var(--primary); }
.stat-tile-value { color: var(--text); font: 700 var(--fs-xl)/1.15 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-tile-sub { color: var(--text-mute); font-size: var(--fs-2xs); }
.stat-tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.stat-tile .stat-delta { margin-top: 3px; }

/* --- Linha do tempo (auditoria, histórico) --- */
.timeline { position: relative; list-style: none; margin: 0; padding: 0; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: flex; gap: 13px; padding: 6px 0 14px; }
.timeline-item:last-child { padding-bottom: 2px; }
.timeline-dot { position: absolute; left: 2px; top: 8px; width: 16px; height: 16px; border: 2px solid var(--bg-card); border-radius: 50%; background: var(--primary); }
.timeline-dot.tone-success { background: var(--success); }
.timeline-dot.tone-warning { background: var(--warning); }
.timeline-dot.tone-danger { background: var(--danger); }
.timeline-dot.tone-info { background: var(--info); }
.timeline-dot.tone-muted { background: var(--text-mute); }
.timeline-body { flex: 1; min-width: 0; padding-left: 22px; }
.timeline-body .cell-main { font-size: var(--fs-base); }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; color: var(--text-mute); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }

/* --- Zona de upload (importar CSV) --- */
.file-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 26px 18px; border: 1.5px dashed var(--line); border-radius: var(--radius-md); background: var(--bg-soft); color: var(--text-soft); text-align: center; cursor: pointer; transition: border-color var(--dur-base), background var(--dur-base); }
.file-drop:hover, .file-drop.is-dragover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-2); }
.file-drop:focus-within { outline: var(--focus-ring); outline-offset: 2px; }
.file-drop .icon { color: var(--primary); }
.file-drop strong { color: var(--text); font-size: var(--fs-base); }
.file-drop small { color: var(--text-mute); font-size: var(--fs-xs); }
.file-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop-file { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text); font-size: var(--fs-base); text-align: left; }
.file-drop-file .icon { color: var(--success); }

/* --- Código/OTP (6 caixas, cola inteiro) --- */
.code-input { display: flex; gap: 8px; }
.code-input input { width: 46px; height: 54px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text); font: 700 1.35rem/1 var(--font-display); text-align: center; font-variant-numeric: tabular-nums; }
.code-input input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.code-input input[aria-invalid="true"] { border-color: var(--danger); }
.code-input.is-complete input { border-color: var(--success); }
@media (max-width: 420px) { .code-input input { width: clamp(38px, 12vw, 46px); height: 50px; } }

/* --- Moldura de QR (pareamento WhatsApp) --- */
.qr-frame { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); }
.qr-frame-plate { padding: 10px; border-radius: var(--radius-xs); background: white; line-height: 0; }
.qr-frame img, .qr-frame canvas, .qr-frame svg { display: block; width: 180px; height: 180px; }
.qr-frame figcaption, .qr-frame .qr-caption { color: var(--text-soft); font-size: var(--fs-xs); text-align: center; }
.qr-frame-sm img, .qr-frame-sm canvas, .qr-frame-sm svg { width: 120px; height: 120px; }

/* --- Filtro: barra com pills de filtro ativo --- */
.filter-bar { display: flex; flex-direction: column; gap: 14px; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 5px 3px 11px; border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line)); border-radius: var(--radius-full); background: var(--primary-soft); color: var(--primary-2); font-size: var(--fs-xs); font-weight: 600; }
.filter-pill-name { color: var(--text-soft); font-weight: 500; }
.filter-pill button { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: var(--radius-full); background: transparent; color: inherit; cursor: pointer; }
.filter-pill button:hover { background: color-mix(in srgb, var(--primary) 16%, transparent); }
.filter-pill button:focus-visible { outline: var(--focus-ring); outline-offset: 1px; }
.filter-pill button .icon { width: 11px; height: 11px; }
.filter-pill-clear { min-height: 30px; padding: 3px 10px; font-size: var(--fs-xs); }

/* --- Skeletons (linhas e cards; o global reduced-motion corta o pulse) --- */
.skeleton-text { height: 12px; margin: 5px 0; min-height: 12px; }
.skeleton-title { height: 17px; width: 42%; min-height: 17px; }
.skeleton-row { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.skeleton-row:last-child { border-bottom: 0; }
.skeleton-row .skeleton { flex: 1; }
.skeleton-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; min-height: 34px; }
.skeleton-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); display: flex; flex-direction: column; gap: 9px; }
.skeleton-stack { display: flex; flex-direction: column; gap: 8px; }

/* --- Drawer de personalização do painel (suporte P7/painel) --- */
.personalize-list { display: flex; flex-direction: column; gap: 4px; }
.personalize-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-card); font-size: var(--fs-base); }
.personalize-item .switch { min-height: 0; margin-left: auto; }
.personalize-item.is-locked { opacity: .72; }
.personalize-item .badge { margin-left: auto; }
.personalize-item.is-locked .badge + .badge { margin-left: 6px; }

/* Tooltip com toque: [data-tooltip] (canônico) e alias [data-tip] — o texto
   acessível vive num .sr-only apontado por aria-describedby (app.js). */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 95; padding: 6px 10px; border-radius: var(--radius-xs); background: var(--text); color: var(--bg-card); font-size: var(--fs-xs); font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out); }
[data-tip]:hover::after, [data-tip]:focus-visible::after,
[data-tip].tip-open::after, [data-tooltip].tip-open::after { opacity: 1; }

/* Small multiples: grade compacta de gráficos pequenos (KPIs, origens) */
.small-multiples { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: var(--sp-4); }
.small-multiples .chart-box { height: 150px; }
.small-multiples .chart-box-sm { height: 110px; }

/* ============================================================
   21 · Primitives P9 — countdown ao vivo, cupom, badge de evento,
   list editor, balão de enquete, heatmap, banner de evento,
   paleta de comandos (see tools/DESIGN-SYSTEM.md §2.13)
   ============================================================ */

/* --- Countdown ao vivo ([data-countdown="ISO8601"]) --- */
[data-countdown] { font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-countdown].countdown-done { color: var(--text-mute); }
.countdown-strong { font-weight: 700; color: var(--primary-2); }

/* --- Cupom (ticket: código + valor + regras + validade) --- */
.coupon { display: flex; align-items: stretch; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-card); overflow: hidden; }
.coupon-body { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 18px; }
.coupon-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.coupon-code { display: inline-flex; align-items: center; padding: 5px 11px; border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--line)); border-radius: var(--radius-xs); background: var(--primary-soft); color: var(--primary-2); font-weight: 700; letter-spacing: .04em; font-size: var(--fs-md); }
.coupon-value { font: 800 var(--fs-2xl)/1.15 var(--font-display); letter-spacing: -.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.coupon-rules { margin: 0; color: var(--text-soft); font-size: var(--fs-xs); line-height: 1.65; }
.coupon-stub { display: flex; flex-direction: column; justify-content: center; gap: 5px; flex-shrink: 0; width: 148px; padding: 14px 16px; border-left: 2px dashed var(--line); background: var(--bg-soft); color: var(--text-soft); font-size: var(--fs-xs); text-align: center; }
.coupon-shop { font-weight: 700; color: var(--text); }
.coupon-expiry { color: var(--text-mute); }
@media (max-width: 560px) {
    .coupon { flex-direction: column; }
    .coupon-stub { width: auto; border-left: 0; border-top: 2px dashed var(--line); }
}

/* --- Badge de evento sazonal --- */
.badge-event { gap: 6px; background: var(--primary-soft); color: var(--primary-2); border-color: color-mix(in srgb, var(--primary) 25%, transparent); font-weight: 700; }
.badge-event-live { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* --- List editor (opções de enquete: add/remove/reorder) --- */
.list-editor { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.list-editor-rows { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.list-editor-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.list-editor-row input { flex: 1; min-width: 0; min-height: 41px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-card); color: var(--text); font: var(--fs-md) var(--font); }
.list-editor-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.list-editor-row .btn-icon { width: 38px; height: 38px; border-color: var(--line); background: var(--bg-card); color: var(--text-soft); }
.list-editor-row .btn-icon:hover { border-color: var(--primary); color: var(--primary-2); }
.list-editor-row .btn-icon:disabled { opacity: .45; }
.list-editor-row.is-new input { border-color: var(--primary); }
.list-editor-add { align-self: flex-start; }
@media (max-width: 720px) {
    .list-editor-row .btn-icon { width: 44px; height: 44px; }
}

/* --- Balão de enquete (prévia WhatsApp) --- */
.wa-bubble--poll .wa-poll-title { margin: 0 0 8px; }
.wa-poll-options { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.wa-poll-option { display: flex; align-items: center; gap: 9px; padding: 7px 4px; border-top: 1px solid var(--line); color: var(--text); font-size: var(--fs-base); }
.wa-poll-option:first-child { border-top: 0; }
.wa-poll-radio { flex-shrink: 0; width: 15px; height: 15px; border: 2px solid var(--text-mute); border-radius: 50%; }
.wa-poll-count { margin-left: auto; color: var(--text-mute); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }

/* --- Heatmap 7×24 (melhores horários) --- */
.heatmap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.heatmap-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; }
.heatmap-day { display: flex; align-items: center; color: var(--text-mute); font-size: var(--fs-2xs); }
.heatmap-cell { aspect-ratio: 1; min-height: 9px; border-radius: 3px; background: var(--bg-card-2); }
.heatmap-cell.hm-1 { background: color-mix(in srgb, var(--primary) 22%, var(--bg-card-2)); }
.heatmap-cell.hm-2 { background: color-mix(in srgb, var(--primary) 45%, var(--bg-card-2)); }
.heatmap-cell.hm-3 { background: color-mix(in srgb, var(--primary) 70%, var(--bg-card-2)); }
.heatmap-cell.hm-4 { background: color-mix(in srgb, var(--primary) 94%, var(--bg-card-2)); }
.heatmap-hours { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; color: var(--text-mute); font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
.heatmap-hours span { white-space: nowrap; }
.heatmap-legend { display: flex; align-items: center; gap: 5px; color: var(--text-mute); font-size: var(--fs-2xs); }
.heatmap-legend .heatmap-cell { width: 14px; height: 14px; min-height: 0; aspect-ratio: auto; }
@media (max-width: 560px) {
    .heatmap-grid, .heatmap-hours { gap: 2px; }
}

/* --- Banner de evento sazonal (shell) --- */
.event-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--line)); border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--text); font-size: var(--fs-base); }
.event-banner strong { font-family: var(--font-display); letter-spacing: -.02em; }
.event-banner-ico { display: inline-flex; color: var(--primary); flex-shrink: 0; }
.event-banner-text { flex: 1 1 220px; min-width: 0; color: var(--text-soft); }
.event-banner a { font-weight: 600; white-space: nowrap; }
.event-banner .event-banner-dismiss { margin-left: auto; width: 36px; height: 36px; color: var(--text-soft); }
@media (max-width: 720px) {
    .event-banner .event-banner-dismiss { width: 44px; height: 44px; }
}

/* --- Faixa "Confirme seu e-mail" (shell, OD-24): não bloqueia nada --- */
.alert.verify-strip { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 14px; }
.alert.verify-strip > .icon { margin-right: 0; flex-shrink: 0; }
.verify-strip-text { flex: 1 1 260px; min-width: 0; color: var(--text); }
.verify-strip-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.verify-strip-actions form { margin: 0; }
.verify-strip-close { display: none; }
/* Celular: uma linha só (título + "Enviar link" + ×), sem o e-mail e a explicação (UX-05). */
@media (max-width: 720px) {
    .alert.verify-strip { flex-wrap: nowrap; gap: 8px; padding: 4px 4px 4px 12px; }
    .alert.verify-strip > .icon { align-self: center; margin-top: 0; }
    .verify-strip-why, .verify-strip-later-text { display: none; }
    .verify-strip-text { flex: 1 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .verify-strip-actions { flex-shrink: 0; gap: 2px; }
    .verify-strip-actions .btn { min-height: 40px; }
    .verify-strip-close { display: inline-flex; width: 40px; height: 40px; color: var(--text-soft); }
}

/* --- Paleta de comandos (Ctrl/Cmd+K) e ajuda de atalhos (?) --- */
.cmdk-search { padding: 12px 24px 0; }
.cmdk-input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); color: var(--text); font: var(--fs-md) var(--font); }
.cmdk-input:focus { outline: none; border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.cmdk-list { max-height: min(46dvh, 380px); margin: 10px 0 0; padding: 6px; overflow-y: auto; list-style: none; }
.cmdk-item { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 9px 12px; border-radius: var(--radius-xs); color: var(--text); font-size: var(--fs-base); cursor: pointer; }
.cmdk-item .icon { color: var(--text-mute); flex-shrink: 0; }
.cmdk-item small { margin-left: auto; color: var(--text-mute); font-size: var(--fs-2xs); white-space: nowrap; }
.cmdk-item:hover, .cmdk-item.active { background: var(--primary-soft); color: var(--primary-2); }
.cmdk-item.active .icon { color: var(--primary); }
.cmdk-empty { padding: 18px 12px; color: var(--text-mute); text-align: center; }
.cmdk-foot { justify-content: flex-start; }
.shortcut-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.shortcut-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--text-soft); font-size: var(--fs-base); }
.shortcut-list li:last-child { border-bottom: 0; }
.shortcut-keys { display: inline-flex; gap: 4px; }
.kbd-static { display: inline-flex; align-items: center; padding: 2px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--bg-card); color: var(--text-mute); font: 600 var(--fs-2xs) var(--font); white-space: nowrap; }

/* --- Impressão (recibo, extratos): papel sempre claro, mesmo com o tema escuro salvo (UX-04).
   Fica no fim do arquivo para valer sobre os tokens do tema escuro. --- */
@media print {
    :root, html[data-theme="dark"], .theme-dark {
        color-scheme: light;
        --bg: #ffffff; --bg-soft: #f6f6f6; --bg-card: #ffffff; --bg-card-2: #f2f2f2; --line: #cccccc;
        --text: #111111; --text-soft: #333333; --text-mute: #555555; --img-bg: #ffffff;
        --primary: #4c1d95; --primary-2: #4c1d95; --primary-soft: #f2f2f2;
        --success: #14754f; --warning: #8d5a16; --danger: #b53244; --info: #356c9d;
    }
}
