/* Fiscal API - design system
   Direcao visual: "papel de seguranca fiscal". Tinta azul-marinho, cobalto como acao,
   ambar de carimbo como destaque, textura guilhoche (roseta de notas e cheques) ao fundo
   e um selo circular no progresso dos primeiros passos. Sem fontes/CDN externos (CSP). */

:root {
    --bg: #f3f5fb;
    --surface: #ffffff;
    --surface-2: #f7f9ff;
    --text: #0f1b33;
    --text-muted: #5b6783;
    --border: #e2e7f3;
    --border-strong: #cdd5e8;

    --primary: #3d5afe;
    --primary-hover: #2f47d9;
    --primary-soft: #e8ecff;
    --primary-ink: #ffffff;
    --accent: #f5a524;
    --accent-soft: #fff1d6;
    --accent-ink: #8a5a00;
    --success: #0e9f6e;
    --success-soft: #def7ec;
    --danger: #e0364f;
    --danger-soft: #fde8ec;

    --ring: rgba(61, 90, 254, .32);
    --shadow-sm: 0 1px 2px rgba(15, 27, 51, .06), 0 1px 1px rgba(15, 27, 51, .04);
    --shadow-md: 0 8px 24px -8px rgba(15, 27, 51, .16), 0 2px 6px rgba(15, 27, 51, .05);
    --shadow-lg: 0 24px 60px -20px rgba(15, 27, 51, .35);
    --radius: 14px;
    --radius-sm: 10px;

    --mesh-1: rgba(61, 90, 254, .13);
    --mesh-2: rgba(245, 165, 36, .12);
    --guilloche-opacity: .07;
    --dot: rgba(61, 90, 254, .18);
    --topbar-bg: rgba(243, 245, 251, .78);

    --sb-bg: linear-gradient(180deg, #101d3a 0%, #0a1326 100%);
    --sb-text: #aeb9d6;
    --sb-text-strong: #ffffff;
    --sb-hover: rgba(255, 255, 255, .06);
    --sb-active: rgba(108, 134, 255, .2);
    --sb-border: rgba(255, 255, 255, .08);

    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0a1020;
        --surface: #111a2e;
        --surface-2: #0e1627;
        --text: #e8eefb;
        --text-muted: #93a1c2;
        --border: #1f2b45;
        --border-strong: #2c3b5e;
        --primary: #6c86ff;
        --primary-hover: #8399ff;
        --primary-soft: rgba(108, 134, 255, .15);
        --primary-ink: #0a1020;
        --accent: #ffb938;
        --accent-soft: rgba(255, 185, 56, .14);
        --accent-ink: #ffd27d;
        --success: #34d399;
        --success-soft: rgba(52, 211, 153, .14);
        --danger: #ff6b81;
        --danger-soft: rgba(255, 107, 129, .14);
        --ring: rgba(108, 134, 255, .45);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, .6);
        --shadow-lg: 0 28px 70px -22px rgba(0, 0, 0, .8);
        --mesh-1: rgba(108, 134, 255, .16);
        --mesh-2: rgba(255, 185, 56, .08);
        --guilloche-opacity: .09;
        --dot: rgba(160, 180, 255, .16);
        --topbar-bg: rgba(10, 16, 32, .72);
        --sb-bg: linear-gradient(180deg, #0b1427 0%, #070d1b 100%);
    }
}

:root[data-theme="dark"] {
    --bg: #0a1020;
    --surface: #111a2e;
    --surface-2: #0e1627;
    --text: #e8eefb;
    --text-muted: #93a1c2;
    --border: #1f2b45;
    --border-strong: #2c3b5e;
    --primary: #6c86ff;
    --primary-hover: #8399ff;
    --primary-soft: rgba(108, 134, 255, .15);
    --primary-ink: #0a1020;
    --accent: #ffb938;
    --accent-soft: rgba(255, 185, 56, .14);
    --accent-ink: #ffd27d;
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, .14);
    --danger: #ff6b81;
    --danger-soft: rgba(255, 107, 129, .14);
    --ring: rgba(108, 134, 255, .45);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 28px 70px -22px rgba(0, 0, 0, .8);
    --mesh-1: rgba(108, 134, 255, .16);
    --mesh-2: rgba(255, 185, 56, .08);
    --guilloche-opacity: .09;
    --dot: rgba(160, 180, 255, .16);
    --topbar-bg: rgba(10, 16, 32, .72);
    --sb-bg: linear-gradient(180deg, #0b1427 0%, #070d1b 100%);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* fundo: malha de luz + roseta guilhoche, sempre atras do conteudo */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 520px at 88% -8%, var(--mesh-1), transparent 62%),
        radial-gradient(760px 460px at -8% 108%, var(--mesh-2), transparent 58%);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

::selection { background: var(--primary); color: var(--primary-ink); }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.eyebrow { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ---------- estrutura ---------- */
.app-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main::after {
    content: "";
    position: fixed;
    top: -230px;
    right: -230px;
    width: 780px;
    height: 780px;
    background: url("/assets/img/guilloche.svg") center / contain no-repeat;
    opacity: var(--guilloche-opacity);
    pointer-events: none;
    z-index: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 32px;
    background: var(--topbar-bg);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title, .topbar strong { font-size: 17px; letter-spacing: -.01em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions form { margin: 0; }

.content { position: relative; z-index: 1; flex: 1; padding: 28px 32px 56px; }
.content::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 340px;
    background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}
.content > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.content > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3) { animation-delay: .08s; }
.content > *:nth-child(4) { animation-delay: .12s; }
.content > *:nth-child(5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- sidebar ---------- */
.sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 264px;
    height: 100vh;
    flex: none;
    display: flex;
    flex-direction: column;
    padding: 18px 14px 14px;
    color: var(--sb-text);
    background: var(--sb-bg);
    border-right: 1px solid var(--sb-border);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 30;
}
.sidebar::after {
    content: "";
    position: absolute;
    left: -150px;
    bottom: -190px;
    width: 520px;
    height: 520px;
    background: url("/assets/img/guilloche.svg") center / contain no-repeat;
    opacity: .1;
    pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.brand-name strong { font-family: var(--font-display); font-style: italic; font-weight: 700; color: var(--accent); margin-left: 1px; }
.icon-btn.sidebar-close { display: none; margin-left: auto; color: #fff; background: transparent; border-color: rgba(255, 255, 255, .18); }

.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--sb-text);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--sb-hover); color: var(--sb-text-strong); text-decoration: none; }
.nav-link.active {
    background: var(--sb-active);
    color: var(--sb-text-strong);
    box-shadow: inset 3px 0 0 var(--accent);
}
.nav-link.active .icon { color: var(--accent); }

.nav-group { margin-top: 10px; }
.nav-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #7f8cb0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { color: #c3cdea; }
.nav-group .chev { width: 14px; height: 14px; transition: transform .2s; }
.nav-group:not([open]) .chev { transform: rotate(-90deg); }
.nav-group[open] > .nav-link { animation: rise .25s both; }

.sidebar-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.setup-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(245, 165, 36, .35);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(245, 165, 36, .16), rgba(245, 165, 36, .05));
    color: #ffe2a8;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .15s, border-color .15s;
}
.setup-chip:hover { transform: translateY(-1px); border-color: rgba(245, 165, 36, .65); }
.setup-chip-ring {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), rgba(255, 255, 255, .14) 0);
    color: var(--accent);
}
.setup-chip-ring::before { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: #14203d; }
.setup-chip-ring .icon { position: relative; width: 16px; height: 16px; }
.setup-chip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.setup-chip-text strong { font-size: 13.5px; color: #fff; }
.setup-chip-text small { font-size: 12px; color: #d9c08a; }

.company-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--sb-border); border-radius: var(--radius); background: rgba(255, 255, 255, .04); }
.company-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(108, 134, 255, .2); color: #b9c6ff; flex: none; }
.company-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.company-text strong { color: #fff; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-text small { font-size: 12px; color: #8f9cc0; }
.company-text small.env-sandbox { color: #ffd27d; }
.company-text small.env-production { color: #6ee7b7; }

.sidebar-overlay { display: none; }

/* ---------- topo: ambiente, lançador, botoes ---------- */
.env-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); }
.env-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.env-pill.env-sandbox { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.env-pill.env-sandbox .dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(245, 165, 36, .22); }
.env-pill.env-production { color: var(--success); background: var(--success-soft); border-color: transparent; }
.env-pill.env-production .dot { background: var(--success); box-shadow: 0 0 0 3px rgba(14, 159, 110, .2); }

.launcher { gap: 8px; border-color: rgba(245, 165, 36, .5); background: var(--accent-soft); color: var(--accent-ink); }
.launcher:hover { background: var(--accent-soft); border-color: var(--accent); }
.launcher-ring { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), rgba(128, 128, 128, .28) 0); position: relative; flex: none; }
.launcher-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent-soft); }
.launcher-count { font-variant-numeric: tabular-nums; font-weight: 700; }
.icon-btn.menu-btn { display: none; }

/* ---------- botoes e campos ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--primary-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 6px 14px -6px var(--ring);
    transition: background .15s, transform .12s, box-shadow .15s, border-color .15s;
}
a.btn:hover { text-decoration: none; }
.btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn .icon { width: 16px; height: 16px; }

.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="url"], input[type="file"], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: .7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.field textarea { min-height: 96px; resize: vertical; }

.panel-form { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.form-section-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.form-section-title:first-child { margin-top: 0; }
.form-section-title .icon { width: 16px; height: 16px; color: var(--primary); }

.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.form-inline { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.form-inline .field { flex: 1; min-width: 160px; margin-bottom: 14px; }
.form-inline .btn { margin-bottom: 14px; }

.field-hint { margin: -6px 0 18px; color: var(--text-muted); font-size: 12.5px; }

.cnpj-check { margin-bottom: 22px; padding: 18px 20px; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm, none); }
.cnpj-check header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 15px; }
.cnpj-check .cnpj-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.cnpj-check .cnpj-grid > div:not(.cnpj-vs) { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cnpj-check .cnpj-grid b { font-family: var(--font-mono, ui-monospace, monospace); font-size: 18px; letter-spacing: .02em; }
.cnpj-check .cnpj-grid small { color: var(--text-muted); overflow-wrap: anywhere; }
.cnpj-check .cnpj-vs { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; font-weight: 700; background: var(--surface-2); }
.cnpj-check p { margin: 14px 0 0; font-size: 13.5px; color: var(--text-muted); }
.cnpj-match { border-left-color: var(--success); }
.cnpj-match header, .cnpj-match .cnpj-vs { color: var(--success); }
.cnpj-match .cnpj-vs { background: var(--success-soft); }
.cnpj-mismatch { border-left-color: var(--danger); background: var(--danger-soft); }
.cnpj-mismatch header, .cnpj-mismatch .cnpj-vs { color: var(--danger); }
.cnpj-same_root, .cnpj-unknown { border-left-color: var(--accent); }
.cnpj-same_root header, .cnpj-unknown header { color: var(--accent-ink); }
@media (max-width: 640px) { .cnpj-check .cnpj-grid { grid-template-columns: 1fr; } .cnpj-check .cnpj-vs { margin: 0 auto; } }

.company-doc { margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); font-size: 13.5px; }
.company-doc strong { color: var(--text); }

.alert { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 14px; }
.alert.error { background: var(--danger-soft); color: var(--danger); border-color: rgba(224, 54, 79, .25); }
.alert.success { background: var(--success-soft); color: var(--success); border-color: rgba(14, 159, 110, .25); }

/* ---------- cards, indicadores, hero ---------- */
.section-title { margin: 28px 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.hero-card + .section-title { margin-top: 28px; }

.grid-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 8px; }

.card { position: relative; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; }
.card .label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.card .value { margin-top: 6px; font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.card .value-money { font-size: 26px; }
.card .value small { font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--text-muted); margin-right: 2px; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.stat-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }
.tone-success .stat-icon { background: var(--success-soft); color: var(--success); }
.tone-danger .stat-icon { background: var(--danger-soft); color: var(--danger); }
.tone-accent .stat-icon { background: var(--accent-soft); color: var(--accent-ink); }
.tone-muted .stat-icon { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

.hero-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 30px 34px;
    margin-bottom: 4px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(120deg, #101d3a 0%, #1b2f6b 55%, #3148d6 100%);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.hero-card-copy { position: relative; z-index: 1; max-width: 560px; }
.hero-card .eyebrow { color: #ffd27d; }
.hero-card h2 { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.hero-card p { margin: 10px 0 0; color: #c8d2f2; }
.hero-card .eyebrow { margin: 0 0 8px; }
.hero-card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-card .btn { background: #fff; color: #14246b; box-shadow: none; }
.hero-card .btn:hover { background: #eef1ff; color: #14246b; }
.hero-card .btn.secondary { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .28); }
.hero-card .btn.secondary:hover { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .5); }
.hero-card-art {
    position: absolute;
    right: -120px;
    top: 50%;
    width: 440px;
    height: 440px;
    transform: translateY(-50%);
    background: url("/assets/img/guilloche.svg") center / contain no-repeat;
    opacity: .28;
    filter: hue-rotate(20deg) brightness(1.8);
    pointer-events: none;
}

/* ---------- tabelas ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
th, td { padding: 13px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
th { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--primary-soft); }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions form { margin: 0; }

.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.list-toolbar .form-inline { margin: 0; flex: 1; align-items: center; }
.list-toolbar .form-inline .field, .list-toolbar .form-inline .btn { margin-bottom: 0; }
.list-toolbar > .btn { flex: none; }

.empty-state { position: relative; padding: 48px 24px; margin-bottom: 24px; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--surface-2)); overflow: hidden; }
.empty-state::before { content: ""; position: absolute; left: 50%; top: -90px; width: 300px; height: 300px; transform: translateX(-50%); background: url("/assets/img/guilloche.svg") center / contain no-repeat; opacity: .08; pointer-events: none; }
.empty-state > * { position: relative; }
.empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); }
.empty-icon .icon { width: 24px; height: 24px; }
.empty-state p { margin: 0 0 16px; color: var(--text-muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.active, .badge.production, .badge.AUTHORIZED { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge.revoked, .badge.inactive, .badge.CANCELLED { background: var(--surface-2); color: var(--text-muted); }
.badge.sandbox, .badge.QUEUED, .badge.PROCESSING, .badge.VALIDATING, .badge.RECEIVED { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge.REJECTED, .badge.ERROR { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 8px; font-size: 14px; color: var(--text-muted); }
.pagination a { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--text); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination a.disabled { opacity: .4; pointer-events: none; }

.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 14px; font-weight: 500; color: var(--text-muted); }
.back-link:hover { color: var(--primary); text-decoration: none; }

.detail-list { display: grid; grid-template-columns: 180px 1fr; gap: 0; margin: 0 0 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.detail-list dt, .detail-list dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.detail-list dt { font-size: 13px; font-weight: 600; color: var(--text-muted); background: var(--surface-2); }
.detail-list dt:nth-last-of-type(1), .detail-list dd:last-of-type { border-bottom: 0; }

.timeline { list-style: none; margin: 0 0 24px; padding: 0 0 0 22px; border-left: 2px solid var(--border-strong); }
.timeline li { position: relative; padding: 0 0 18px 16px; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.timeline li:last-child { padding-bottom: 0; }
.timeline .ts { display: block; margin-top: 2px; font-size: 12px; color: var(--text-muted); }

code.key-value { display: block; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--border-strong); font-family: var(--font-mono); font-size: 13px; word-break: break-all; }

.impersonation-banner { position: relative; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 24px; background: linear-gradient(90deg, #b45309, #f59e0b); color: #1c1200; font-size: 14px; font-weight: 500; }
.impersonation-banner form { margin: 0; }
.impersonation-banner button { padding: 6px 12px; border: 0; border-radius: 8px; background: #1c1200; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ---------- gaveta: primeiros passos ---------- */
.drawer-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(6, 12, 26, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.drawer-overlay.is-open { opacity: 1; }

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    width: min(448px, 100vw);
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(104%);
    visibility: hidden;
    transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s .32s;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.drawer:focus { outline: none; }

.drawer-head { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 24px 22px 20px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), var(--surface)); overflow: hidden; }
.drawer-head::before { content: ""; position: absolute; right: -90px; top: -110px; width: 280px; height: 280px; background: url("/assets/img/guilloche.svg") center / contain no-repeat; opacity: .1; pointer-events: none; }
.drawer-head > * { position: relative; }
.drawer-heading { flex: 1; min-width: 0; }
.drawer-heading h2 { font-family: var(--font-display); font-size: 25px; font-weight: 700; }
.drawer-sub { margin: 8px 0 0; font-size: 13.5px; color: var(--text-muted); }

.seal { position: relative; flex: none; width: 72px; height: 72px; }
.seal svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.seal circle { fill: none; }
.seal-teeth { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 1.2 3.1; opacity: .85; }
.seal-track { stroke: var(--border-strong); stroke-width: 6; }
.seal-bar { stroke: var(--primary); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray .6s cubic-bezier(.2, .8, .2, 1); }
.seal-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.seal-count strong { font-family: var(--font-display); font-size: 21px; color: var(--text); }
.seal-count { align-content: center; }

.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px 22px; }
.drawer-section { margin: 20px 0 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }

.steps { list-style: none; margin: 0; padding: 0; }
.step { position: relative; display: flex; gap: 14px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.step-marker { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); border: 1.5px solid var(--border-strong); color: var(--text-muted); }
.step-body { flex: 1; min-width: 0; }
.step-title { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.step-body p { margin: 4px 0 12px; font-size: 13px; color: var(--text-muted); }
.step.is-current { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 4px var(--ring); }
.step.is-current .step-marker { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.step.is-done { background: transparent; border-style: dashed; }
.step.is-done .step-marker { background: var(--success); border-color: var(--success); color: #fff; }
.step.is-done .step-title { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.step.is-done p { display: none; }
.step-status { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--success); text-transform: uppercase; letter-spacing: .06em; }

.drawer-foot { display: flex; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; color: var(--text-muted); }
.drawer-foot .icon { margin-top: 1px; color: var(--accent-ink); }

body.drawer-lock { overflow: hidden; }

/* ---------- login / cadastro ---------- */
.auth-body { min-height: 100vh; }
.auth-split { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); min-height: 100vh; }
.auth-theme-toggle { position: fixed; top: 18px; right: 18px; z-index: 10; }

.auth-hero { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 44px 56px; color: #fff; background: linear-gradient(150deg, #0d1832 0%, #16275c 52%, #2b41c9 100%); overflow: hidden; }
.auth-hero::before { content: ""; position: absolute; right: -220px; top: -180px; width: 760px; height: 760px; background: url("/assets/img/guilloche.svg") center / contain no-repeat; opacity: .3; filter: brightness(1.9) hue-rotate(15deg); pointer-events: none; }
.auth-hero::after { content: ""; position: absolute; left: -160px; bottom: -220px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 165, 36, .28), transparent 65%); pointer-events: none; }
.auth-hero > * { position: relative; z-index: 1; }
.hero-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.hero-brand .brand-name strong { color: var(--accent); font-family: var(--font-display); font-style: italic; }
.hero-copy { max-width: 520px; }
.auth-hero .eyebrow { color: #ffd27d; }
.auth-hero h2 { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; }
.hero-text { margin: 16px 0 0; font-size: 16px; color: #c8d2f2; }
.hero-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.hero-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: #dbe3fb; }
.hero-points .icon { width: 36px; height: 36px; padding: 8px; border-radius: 11px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: #ffd27d; }
.hero-foot { margin: 0; font-size: 12.5px; color: #93a3d4; }

.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; padding: 34px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-md); }
.auth-card h1 { font-family: var(--font-display); font-size: 28px; }
.auth-card .subtitle, .auth-card p.subtitle { margin: 8px 0 22px; color: var(--text-muted); font-size: 14.5px; }
.auth-card .btn { width: 100%; padding: 12px 18px; }
.auth-links { margin-top: 20px; text-align: center; font-size: 14px; color: var(--text-muted); }

/* ---------- area de plataforma: mesma estrutura, sidebar violeta ---------- */
.platform-shell .sidebar { --sb-bg: linear-gradient(180deg, #2a1650 0%, #170b33 100%); }
.platform-shell .nav-link.active { background: rgba(167, 139, 250, .22); }
.platform-shell .nav-link.active .icon { color: #c4b5fd; }

/* ---------- documentação da API ---------- */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; margin-top: 28px; align-items: start; }
.docs-toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; max-height: calc(100vh - 120px); overflow-y: auto; }
.docs-toc-title { margin: 0 0 8px 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.docs-toc a { padding: 7px 12px; border-left: 2px solid var(--border); font-size: 13.5px; font-weight: 500; color: var(--text-muted); transition: color .15s, border-color .15s, background .15s; }
.docs-toc a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.docs-toc a.is-current { color: var(--primary); border-left-color: var(--primary); background: var(--primary-soft); font-weight: 650; }

.docs-body { min-width: 0; max-width: 860px; }
.doc-section { padding-bottom: 12px; margin-bottom: 36px; border-bottom: 1px solid var(--border); scroll-margin-top: 92px; }
.doc-section:last-child { border-bottom: 0; }
.doc-section h2 { margin-bottom: 12px; font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.doc-section h3 { margin: 26px 0 10px; font-size: 14px; letter-spacing: .02em; }
.doc-section p { margin: 0 0 14px; }
.doc-section ul, .doc-section ol { margin: 0 0 14px; }

.doc-list { padding-left: 20px; }
.doc-list li { margin-bottom: 8px; }
.doc-steps { padding-left: 22px; }
.doc-steps li { margin-bottom: 10px; padding-left: 4px; }
.doc-steps li::marker { font-weight: 700; color: var(--primary); }

code.inline { padding: 2px 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-family: var(--font-mono); font-size: .86em; white-space: nowrap; }
.doc-table code.inline { white-space: normal; }

.endpoint { display: grid; grid-template-columns: 74px minmax(0, 270px) 1fr; gap: 14px; align-items: center; padding: 9px 14px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 14px; }
.endpoint code { font-family: var(--font-mono); font-size: 13px; color: var(--text); word-break: break-all; }
.endpoint span:last-child { color: var(--text-muted); }
.method { display: inline-block; padding: 3px 0; border-radius: 7px; text-align: center; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.m-get { background: var(--success-soft); color: var(--success); }
.m-post { background: var(--primary-soft); color: var(--primary); }
.m-put { background: var(--accent-soft); color: var(--accent-ink); }
.m-delete { background: var(--danger-soft); color: var(--danger); }

.codeblock { position: relative; margin: 0 0 16px; padding: 16px 18px; border-radius: var(--radius); background: #0b1326; color: #dbe5ff; border: 1px solid rgba(255, 255, 255, .06); font-family: var(--font-mono); font-size: 12.8px; line-height: 1.65; overflow-x: auto; box-shadow: var(--shadow-sm); }
.codeblock[hidden] { display: none; }
.codeblock code { font-family: inherit; white-space: pre; }
.copy-btn { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; background: rgba(255, 255, 255, .06); color: #b9c6ee; font-family: var(--font); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.copy-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.copy-btn.is-done { color: #6ee7b7; border-color: rgba(110, 231, 183, .45); }
.copy-btn .icon { width: 14px; height: 14px; }

.code-tabs { margin-bottom: 16px; }
.code-tabs .codeblock { margin-bottom: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.code-tab-list { display: flex; gap: 2px; padding: 6px 6px 0; border-radius: var(--radius) var(--radius) 0 0; background: #101a33; border: 1px solid rgba(255, 255, 255, .06); border-bottom: 0; overflow-x: auto; }
.code-tab-list button { padding: 8px 14px; border: 0; border-radius: 8px 8px 0 0; background: transparent; color: #8fa0cf; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: color .15s, background .15s; }
.code-tab-list button:hover { color: #fff; }
.code-tab-list button.is-active { background: #0b1326; color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }

.callout { display: flex; gap: 12px; padding: 14px 16px; margin: 0 0 16px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid transparent; }
.callout .icon { margin-top: 2px; }
.callout.info { background: var(--primary-soft); color: var(--text); border-color: rgba(61, 90, 254, .22); }
.callout.info > .icon { color: var(--primary); }
.callout.warn { background: var(--accent-soft); color: var(--text); border-color: rgba(245, 165, 36, .35); }
.callout.warn > .icon { color: var(--accent-ink); }

.doc-table { margin-bottom: 18px; }
.docs-hero { margin-bottom: 0; }

@media (max-width: 980px) {
    .docs-layout { grid-template-columns: 1fr; gap: 16px; }
    .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; max-height: none; }
    .docs-toc-title { display: none; }
    .docs-toc a { border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
    .docs-toc a.is-current { border-color: var(--primary); }
    .endpoint { grid-template-columns: 64px 1fr; }
    .endpoint span:last-child { grid-column: 1 / -1; }
}

.docs-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(110deg, var(--primary-soft), var(--surface) 70%); color: var(--text); transition: transform .15s, border-color .15s, box-shadow .15s; }
.docs-banner:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--primary); box-shadow: var(--shadow-md); }
.docs-banner-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: var(--primary-ink); flex: none; }
.docs-banner-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.docs-banner-text small { color: var(--text-muted); font-size: 13px; }
.docs-banner > .icon { color: var(--primary); }

.site-footer { position: relative; z-index: 1; padding: 20px 32px 26px; text-align: center; font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border); }
.site-footer p { margin: 0; }
.site-footer a { font-weight: 600; color: var(--text); }
.site-footer a:hover { color: var(--primary); }
.auth-panel { position: relative; padding-bottom: 76px; }
.auth-panel .site-footer { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 24px; border-top: 0; }

[hidden] { display: none !important; }

.install-btn { gap: 8px; }
.install-auth { margin-top: 18px; }

.pwa-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 120; max-width: min(420px, calc(100vw - 32px)); padding: 12px 18px; border-radius: var(--radius); background: #0f1b33; color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .12); transform: translate(-50%, 16px); opacity: 0; transition: transform .25s, opacity .25s; }
.pwa-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

.offline-page { position: relative; z-index: 1; display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.offline-card { width: 100%; max-width: 440px; padding: 36px 32px; text-align: center; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-md); }
.offline-logo { border-radius: 18px; margin-bottom: 18px; }
.offline-card h1 { font-family: var(--font-display); font-size: 28px; }
.offline-card p { margin: 10px 0 22px; color: var(--text-muted); }
.offline-card .offline-hint { margin: 22px 0 0; font-size: 12.5px; }

/* app instalado / telas com entalhe */
.topbar { padding-top: max(14px, env(safe-area-inset-top)); }
.site-footer { padding-bottom: max(26px, env(safe-area-inset-bottom)); }
@media (display-mode: standalone) {
    .install-btn { display: none !important; }
}
/* ---------- responsivo ---------- */
@media (max-width: 980px) {
    .icon-btn.menu-btn { display: inline-grid; }
    .icon-btn.sidebar-close { display: inline-grid; }
    .sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: auto; transform: translateX(-102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); z-index: 90; box-shadow: var(--shadow-lg); }
    .sidebar.is-open { transform: none; }
    .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 85; background: rgba(6, 12, 26, .55); opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
    .sidebar-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .25s; }
    .topbar { padding: 12px 18px; }
    .site-footer { padding: 18px; }
    .content { padding: 20px 18px 48px; }
    .env-pill { display: none; }
    .auth-split { grid-template-columns: 1fr; }
    .auth-hero { padding: 28px 24px 32px; gap: 18px; }
    .hero-points, .hero-foot { display: none; }
    .hero-card { padding: 24px; }
    .hero-card-art { opacity: .16; }
}

@media (max-width: 640px) {
    .launcher .launcher-count { display: none; }
    .launcher { font-size: 0; gap: 0; padding: 8px; }
    .launcher-ring { width: 18px; height: 18px; }
    .topbar-actions .btn-sm { padding: 7px 10px; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-list dt { border-bottom: 0; padding-bottom: 0; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
    .hero-card h2 { font-size: 24px; }
    .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .card { padding: 14px; }
    .card .value { font-size: 26px; }
    .card .value-money { font-size: 20px; }
    .stat-icon { margin-bottom: 10px; }
    .panel-form { padding: 18px; }
}

.history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.live-strip { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.live-strip:empty { display: none; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--success); animation: live-ping 1.6s ease-out infinite; }
.live-strip.is-paused .live-dot { background: var(--text-muted); }
.live-strip.is-paused .live-dot::after { display: none; }
@keyframes live-ping { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.timeline li.is-new { animation: tl-in .7s cubic-bezier(.2, .8, .2, 1) both; }
.timeline li.is-new::before { animation: tl-dot 1.4s ease-out 2; }
@keyframes tl-in { 0% { opacity: 0; transform: translateY(-14px); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes tl-dot { 0% { box-shadow: 0 0 0 0 var(--accent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.timeline li.is-pending::before { border-style: dashed; animation: tl-spin 1.2s linear infinite; }
@keyframes tl-spin { to { transform: rotate(360deg); } }

.live-flash { animation: live-flash 1.8s ease-out; }
@keyframes live-flash { 0% { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); } 100% { background: transparent; box-shadow: inset 3px 0 0 transparent; } }
.badge.live-pop { animation: badge-pop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes badge-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
