/* ==========================================================================
   Painel 24h: sistema de design
   Direção: sala de controle. Superfícies planas, linhas de 1 px, cor só quando significa estado.
   Sem degradê, brilho, vidro fosco nem animação decorativa. Claro e escuro com o mesmo conjunto de tokens.
   ========================================================================== */

/* ---------- Tokens ---------- */
/* Fontes guardadas no proprio projeto (sem depender de site externo) */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/manrope-latin-wght-normal.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+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-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); }
:root {
    color-scheme: dark;

    --bg: #0a0a0b;
    --surface: #111113;
    --raised: #1a1a1d;
    --input: #0e0e10;
    --line: #222226;
    --line-strong: #33333a;

    --text: #e9e9eb;
    --muted: #9b9ba3;
    --subtle: #6d6d75;

    --ink: #ededef;            /* botão primário: quase branco no escuro (o ciano fica só no foco e nos gráficos) */
    --on-ink: #0a0a0b;
    --accent: #4cc9e6;         /* foco, seleção e o item ativo */
    --accent-soft: rgba(76, 201, 230, 0.12);
    --accent-line: rgba(76, 201, 230, 0.4);

    --ok: #3ecf8e;
    --bad: #f26b6b;
    --warn: #e2a13a;
    --info: #6f9bff;
    --paused: #a98bf0;
    --shadow-st: #e8803f;
    --ok-bg: rgba(63, 183, 119, 0.12);
    --bad-bg: rgba(238, 106, 106, 0.12);
    --warn-bg: rgba(226, 161, 58, 0.12);
    --paused-bg: rgba(169, 139, 240, 0.13);

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --pop-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --scrim: rgba(0, 0, 0, 0.62);

    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
    --sidebar-w: 232px;

    /* Nomes antigos, para o HTML e o JS que ainda os usam */
    --bg-base: var(--bg);
    --bg-surface: var(--surface);
    --bg-surface-elevated: var(--raised);
    --bg-card: var(--surface);
    --bg-card-hover: var(--raised);
    --border-subtle: var(--line);
    --border: var(--line-strong);
    --border-focus: var(--accent);
    --primary: var(--accent);
    --primary-glow: var(--accent-soft);
    --primary-gradient: var(--ink);
    --success: var(--ok);
    --success-bg: var(--ok-bg);
    --success-glow: transparent;
    --danger: var(--bad);
    --danger-bg: var(--bad-bg);
    --danger-glow: transparent;
    --warning: var(--warn);
    --warning-bg: var(--warn-bg);
    --warning-glow: transparent;
    --purple: var(--paused);
    --purple-bg: var(--paused-bg);
    --cyan: var(--accent);
    --text-main: var(--text);
    --text-muted: var(--muted);
    --text-sub: var(--subtle);
    --transition: all 0.12s ease;
    --shadow-card: none;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f6f3;
    --surface: #ffffff;
    --raised: #f0f0ec;
    --input: #ffffff;
    --line: #e4e4de;
    --line-strong: #cfcfc7;
    --text: #17181a;
    --muted: #5b5e66;
    --subtle: #85888f;
    --ink: #17181a;
    --on-ink: #ffffff;
    --accent: #0b7a93;
    --accent-soft: rgba(11, 122, 147, 0.1);
    --accent-line: rgba(11, 122, 147, 0.4);
    --ok: #1d8a52;
    --bad: #cc3b3b;
    --warn: #b87608;
    --info: #2c5fd6;
    --paused: #7c53d6;
    --shadow-st: #c25a1a;
    --ok-bg: rgba(29, 138, 82, 0.1);
    --bad-bg: rgba(204, 59, 59, 0.09);
    --warn-bg: rgba(184, 118, 8, 0.11);
    --paused-bg: rgba(124, 83, 214, 0.1);
    --pop-shadow: 0 10px 30px rgba(20, 20, 20, 0.14);
    --scrim: rgba(20, 20, 20, 0.45);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        color-scheme: light;
        --bg: #f6f6f3;
        --surface: #ffffff;
        --raised: #f0f0ec;
        --input: #ffffff;
        --line: #e4e4de;
        --line-strong: #cfcfc7;
        --text: #17181a;
        --muted: #5b5e66;
        --subtle: #85888f;
        --ink: #17181a;
        --on-ink: #ffffff;
        --accent: #0b7a93;
        --accent-soft: rgba(11, 122, 147, 0.1);
        --accent-line: rgba(11, 122, 147, 0.4);
        --ok: #1d8a52;
        --bad: #cc3b3b;
        --warn: #b87608;
        --info: #2c5fd6;
        --paused: #7c53d6;
        --shadow-st: #c25a1a;
        --ok-bg: rgba(29, 138, 82, 0.1);
        --bad-bg: rgba(204, 59, 59, 0.09);
        --warn-bg: rgba(184, 118, 8, 0.11);
        --paused-bg: rgba(124, 83, 214, 0.1);
        --pop-shadow: 0 10px 30px rgba(20, 20, 20, 0.14);
        --scrim: rgba(20, 20, 20, 0.45);
    }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-family: var(--font); font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    font-feature-settings: 'cv11';
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
svg { flex-shrink: 0; }
svg [stroke-width] { stroke-width: 1.8; }
b, strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--subtle); background-clip: content-box; border: 3px solid transparent; }

/* ---------- Casca: barra lateral + conteúdo ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.app-main { min-width: 0; display: flex; flex-direction: column; }

.sidebar {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 22px;
    padding: 16px 12px 14px;
    background: var(--bg);
    border-right: 1px solid var(--line);
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand-logo-box {
    width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
    background: var(--ink); color: var(--on-ink);
    display: grid; place-items: center;
}
.brand-logo-svg { width: 14px; height: 14px; fill: currentColor; }
.brand-title-wrap h1 { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.brand-badge { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--subtle); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; line-height: 16px; }
.brand-sub, .header-brand { display: none; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-label { font-size: 11px; font-weight: 500; color: var(--subtle); padding: 0 10px 6px; letter-spacing: 0.02em; }
.tab-btn {
    display: flex; align-items: center; gap: 10px;
    height: 34px; padding: 0 10px; width: 100%;
    background: none; border: 0; border-radius: var(--radius-sm);
    color: var(--muted); font-size: 13.5px; font-weight: 450; text-align: left; white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}
.tab-btn svg { opacity: 0.85; }
.tab-btn:hover { background: var(--raised); color: var(--text); }
.tab-btn.active { background: var(--raised); color: var(--text); font-weight: 550; }
.tab-btn.active svg { opacity: 1; color: var(--accent); }
.tab-counter {
    margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 450;
    color: var(--subtle); font-variant-numeric: tabular-nums;
}
.tab-btn.active .tab-counter { color: var(--muted); }
.tabs-nav, .tabs-header-wrap { display: contents; }

.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.side-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.user-pill {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
    font-family: var(--mono); font-size: 11.5px; color: var(--muted);
    background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 3px 8px; cursor: pointer; transition: var(--transition);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-pill:hover { color: var(--text); border-color: var(--line-strong); }

header {
    position: sticky; top: 0; z-index: 50;
    height: 56px; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
}
.top-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: nowrap; }
.top-left .health-chips { flex-wrap: nowrap; }
.health-chip { white-space: nowrap; }
.page-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 24px 64px; flex: 1; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: view-in 0.16s ease-out; }
@keyframes view-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Estado e botões ---------- */
.status-badge {
    display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
    border-radius: 999px; font-size: 12.5px; font-weight: 500;
    border: 1px solid var(--line); background: var(--surface);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.status-running { color: var(--ok); }
.status-stopped { color: var(--muted); }
.status-stopped .status-dot { background: var(--bad); }
.status-running .status-text, .status-stopped .status-text { color: var(--text); }
#status-text { color: var(--text); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap;
    border: 1px solid transparent; text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s, opacity 0.12s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { opacity: 0.86; }
.btn-success { background: var(--ok); color: #fff; }
.btn-success:hover { opacity: 0.9; }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn-danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--raised); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 5px; }
.btn-icon { width: 34px; padding: 0; }

/* ---------- Dropdown ---------- */
.custom-dropdown { position: relative; display: inline-block; }
.dropdown-trigger {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500; color: var(--text); user-select: none;
    transition: background 0.12s;
}
.dropdown-trigger:hover, .custom-dropdown.open .dropdown-trigger { background: var(--raised); }
.dropdown-chevron { width: 14px; height: 14px; color: var(--muted); fill: currentColor; transition: transform 0.15s; }
.custom-dropdown.open .dropdown-chevron { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 2000; min-width: 280px;
    display: none; flex-direction: column; gap: 1px; padding: 4px;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
    box-shadow: var(--pop-shadow); animation: view-in 0.12s ease-out;
}
.custom-dropdown.open .dropdown-menu { display: flex; }
.dropdown-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 8px 10px; border-radius: 5px; cursor: pointer; color: var(--muted);
}
.dropdown-item:hover { background: var(--raised); color: var(--text); }
.dropdown-item.active { background: var(--raised); color: var(--text); }
.dropdown-item-left { display: flex; align-items: center; gap: 10px; }
.dropdown-item-title { font-size: 13px; font-weight: 500; color: inherit; }
.dropdown-item-desc { font-size: 11.5px; color: var(--subtle); margin-top: 1px; line-height: 1.35; }
.dropdown-item-risk { font-size: 10.5px; font-weight: 500; color: var(--subtle); margin-left: 4px; }
#dropdown-mode .dropdown-menu { min-width: 340px; max-width: 400px; }
.dropdown-item-check { width: 14px; height: 14px; stroke: var(--accent); opacity: 0; flex-shrink: 0; }
.dropdown-item.active .dropdown-item-check { opacity: 1; }

.select-custom-wrap { position: relative; width: 100%; display: flex; align-items: center; }
.select-custom, select.form-input, .hist-filters select {
    width: 100%; height: 36px; padding: 0 34px 0 12px; appearance: none; -webkit-appearance: none;
    background-color: var(--input); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    font-size: 13px; outline: none; transition: border-color 0.12s, box-shadow 0.12s;
}
.select-custom:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 14px !important; height: 14px !important; pointer-events: none; fill: var(--muted); }
option { background: var(--surface); color: var(--text); }

/* ---------- Superfícies ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.card-title-icon { display: flex; color: var(--muted); }
.card-header h2 { font-size: 15px !important; font-weight: 600 !important; letter-spacing: -0.01em; }
.card-header p { font-size: 13px !important; color: var(--muted) !important; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.note-line { display: flex; gap: 8px; align-items: flex-start; }
.note-line svg { margin-top: 2px; color: var(--muted); }

/* ---------- Cabeçalho de página e barra de ações ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.page-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.page-head p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; }
.seg .btn { border-radius: 0; }
.seg .btn:first-child { border-radius: 5px 0 0 5px; }
.seg .btn:last-child { border-radius: 0 5px 5px 0; margin-left: -1px; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { background: var(--raised); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 260px; padding: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--pop-shadow); }
.menu-pop button { display: block; width: 100%; padding: 7px 10px; background: none; border: 0; border-radius: 5px; text-align: left; font-size: 13px; color: var(--text); }
.menu-pop button:hover { background: var(--raised); }
.menu-group { padding: 6px 10px 3px; font-size: 11px; font-weight: 500; color: var(--subtle); }
.menu-sep { height: 1px; margin: 4px 0; background: var(--line); }

/* ---------- Formulários ---------- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.form-input, .form-textarea, .form-select {
    width: 100%; padding: 8px 12px; min-height: 36px;
    background: var(--input); color: var(--text);
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    font-size: 13.5px; outline: none; transition: border-color 0.12s, box-shadow 0.12s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--subtle); }
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-textarea { resize: vertical; min-height: 96px; line-height: 1.55; }

.slider-input { width: 100%; height: 4px; border-radius: 4px; background: var(--line-strong); outline: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.slider-input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.slider-input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }

/* ---------- Faixa do sistema (antigos cartões de estatística) ---------- */
/* Divisórias desenhadas por sombra interna de cada célula: linhas incompletas (3+2) ficam limpas, sem bloco vazio cinza */
.stats-ribbon {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; margin-bottom: 16px;
}
.stat-card { display: block; padding: 14px 18px; min-width: 0; box-shadow: 1px 0 0 0 var(--line), 0 1px 0 0 var(--line); }
.stat-card #stat-countdown { color: var(--text); }
#stat-card-countdown .stat-info span { color: var(--accent); }
.stat-icon-box { display: none; }
.stat-info span { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat-value {
    display: flex; align-items: baseline; gap: 6px; margin-top: 4px;
    font-family: var(--mono); font-size: 20px !important; font-weight: 500; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums; color: var(--text) !important;
}
.stat-subtext { font-size: 12px; color: var(--subtle); margin-top: 2px; }

/* ---------- Dashboard ---------- */
.dash-alert {
    display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding: 12px 16px;
    border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); background: var(--bad-bg);
    border-radius: var(--radius-lg);
}
.dash-alert svg { color: var(--bad); margin-top: 1px; }
.dash-alert strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--bad); }
.dash-alert span { font-size: 13px; color: var(--muted); }
.dash-alert-link { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--bad); text-decoration: none; }
.dash-alert-link:hover { text-decoration: underline; }

.dash-kpis {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; margin-bottom: 16px;
}
.dash-kpi { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; min-width: 0; box-shadow: 1px 0 0 0 var(--line), 0 1px 0 0 var(--line); }
.dash-kpi-label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.dash-kpi-value { font-family: var(--mono); font-size: 30px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.dash-kpi-sub { font-size: 12px; color: var(--subtle); margin-top: 6px; }
.dash-kpi-sub b { color: var(--muted); font-weight: 500; }
.dash-ring { color: var(--ok); }
.dash-ring circle:first-child { stroke: var(--line); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-grid.dash-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-card { padding: 18px 20px; min-width: 0; }
.dash-card h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; }
.dash-card h3 small { font-size: 12px; font-weight: 400; color: var(--subtle); }
.dash-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.dash-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: baseline; }
.dash-empty { padding: 18px 0 6px; text-align: center; font-size: 13px; color: var(--subtle); }
.dash-empty.good { color: var(--ok); }

.dash-bars text { fill: var(--subtle); font-size: 10px; font-family: var(--mono); }
.dash-bars line { stroke: var(--line); stroke-width: 1; }
.dash-bars .b-ok { fill: var(--ok); }
.dash-bars .b-fail { fill: var(--bad); }
.dash-bars .b-none { fill: var(--line); }
.dash-bars .empty-msg { fill: var(--muted); font-size: 13px; font-family: var(--font); }
.dash-bars .hit { fill: var(--text); fill-opacity: 0; cursor: crosshair; }
.dash-bars .hit:hover { fill-opacity: 0.07; }
.chart-tip {
    position: fixed; z-index: 3500; display: none; min-width: 170px; padding: 9px 11px; pointer-events: none;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--pop-shadow);
    font-size: 12.5px; color: var(--muted);
}
.chart-tip.open { display: block; }
.chart-tip > b { color: var(--text); font-weight: 600; }
.chart-tip .ct-day { margin-left: 8px; font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.chart-tip .ct-row { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.chart-tip .ct-row i { width: 8px; height: 8px; border-radius: 2px; }
.chart-tip .ct-row b { margin-left: auto; color: var(--text); font-family: var(--mono); font-weight: 500; }
.chart-tip .ct-sum { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 12px; }
.chart-tip .ct-sum b { color: var(--text); font-weight: 500; }

.donut-wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 14px; }
.donut-wrap .d-track { stroke: var(--line); }
.donut-wrap .d-num { fill: var(--text); font-size: 28px; font-weight: 500; font-family: var(--mono); }
.donut-wrap .d-cap { fill: var(--subtle); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; }
.donut-legend { display: grid; gap: 8px; min-width: 150px; font-size: 12.5px; color: var(--muted); }
.donut-legend div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.donut-legend b { color: var(--text); font-weight: 500; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.rank-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.rank-row { display: grid; gap: 5px; min-width: 0; }
.rank-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; font-size: 13px; }
.rank-top .name { flex: 1 1 auto; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-top .val { flex: 0 1 auto; max-width: 60%; color: var(--subtle); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.rank-bar { height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 2px; background: var(--ink); opacity: 0.55; }
.rank-bar i.good { background: var(--ok); opacity: 1; }
.rank-bar i.bad { background: var(--bad); opacity: 1; }
.rank-bar i.warn { background: var(--warn); opacity: 1; }

.timeline { margin-top: 10px; display: grid; max-height: 440px; overflow-y: auto; }
.tl-item { display: grid; grid-template-columns: 10px 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--line); font-size: 13px; }
.tl-item:first-child { border-top: 0; }
.tl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.tl-item.fail .tl-dot { background: var(--bad); }
.tl-time { font-family: var(--mono); font-size: 11.5px; color: var(--subtle); }
.tl-main { min-width: 0; }
.tl-main b { font-weight: 550; }
.tl-main span { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-item.fail .tl-main span { color: var(--bad); }
.tl-link { font-size: 12px; color: var(--muted); text-decoration: none; padding: 3px 6px; border-radius: 4px; }
.tl-link:hover { color: var(--text); background: var(--raised); }

.pill {
    display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px;
    font-size: 11.5px; font-weight: 500; border-radius: 4px; white-space: nowrap;
    color: var(--muted); background: var(--raised); border: 1px solid var(--line);
}
.pill.ok { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.pill.bad { color: var(--bad); background: var(--bad-bg); border-color: transparent; }
.pill.warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.pill.paused { color: var(--paused); background: var(--paused-bg); border-color: transparent; }

/* ---------- Menu de cada métrica (aberto por um popover flutuante, para não ser cortado pela faixa) ---------- */
.stat-card, .dash-kpi { position: relative; }
.metric-btn {
    position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; display: grid; place-items: center;
    background: none; border: 1px solid transparent; border-radius: 6px; color: var(--subtle); font-size: 17px; line-height: 1;
    opacity: 0; transition: opacity 0.12s, background 0.12s;
}
.stat-card:hover .metric-btn, .dash-kpi:hover .metric-btn, .metric-btn:focus-visible, .metric-btn[aria-expanded="true"] { opacity: 1; }
.metric-btn:hover { background: var(--raised); color: var(--text); border-color: var(--line); }
@media (hover: none), (max-width: 900px) { .metric-btn { opacity: 1; } }
.dash-kpi .dash-ring { margin-right: 22px; }
#metric-pop {
    position: fixed; z-index: 3000; min-width: 230px; max-width: 300px; padding: 4px; display: none;
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--pop-shadow);
}
#metric-pop.open { display: block; animation: view-in 0.12s ease-out; }
#metric-pop .mp-title { padding: 7px 10px 4px; font-size: 11.5px; font-weight: 500; color: var(--subtle); }
#metric-pop button { position: relative; display: block; width: 100%; padding: 7px 10px; background: none; border: 0; border-radius: 5px; text-align: left; font-size: 13px; color: var(--text); }
#metric-pop button:hover { background: var(--raised); }
#metric-pop button small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--subtle); }
#metric-pop button.danger { color: var(--bad); }
#metric-pop button.on::after { content: ''; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
#metric-pop .mp-sep { height: 1px; margin: 4px 0; background: var(--line); }

.since-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; padding: 8px 14px; font-size: 13px; color: var(--muted); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-md); }
.since-bar b { color: var(--text); font-weight: 500; }
.since-bar button { background: none; border: 0; padding: 0; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Faixa de licença ---------- */
.access-banner { margin-bottom: 14px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--raised); font-size: 13px; color: var(--muted); }
.access-banner b { color: var(--text); font-weight: 600; }
.access-banner code { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.access-banner.warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: var(--warn-bg); }
.access-banner.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: var(--bad-bg); }

/* ---------- Selo "ao vivo" e piscar de número que mudou ---------- */
.dash-top { display: flex; align-items: center; justify-content: flex-end; margin: -6px 0 10px; }
.live-stamp { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.live-stamp .live-dot { width: 8px; height: 8px; box-shadow: none; animation: blink 1.6s ease-in-out infinite; }
.live-stamp.stale { color: var(--warn); }
.live-stamp.stale .live-dot { background: var(--warn); animation: none; }
.flash { border-radius: 4px; animation: flash-bg 0.9s ease-out; }
@keyframes flash-bg { from { background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); } to { background: transparent; box-shadow: 0 0 0 3px transparent; } }

/* ---------- Histórico ---------- */
.hist-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.hist-filters select { width: auto; min-width: 150px; height: 34px; }
.hist-filters input { flex: 1 1 220px; height: 34px; padding: 0 12px; background: var(--input); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: none; }
.hist-filters input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hist-count { margin-left: auto; font-size: 12px; color: var(--subtle); font-family: var(--mono); }
.hist-scroll { max-height: 68vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.hist-row { display: grid; grid-template-columns: 116px 150px minmax(0, 1fr) 64px 70px; gap: 14px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.hist-row:hover { background: var(--raised); }
.hist-row.click { cursor: pointer; }
.hist-row.click:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hist-img-tag { margin-left: 6px; vertical-align: -2px; color: var(--muted); }
.hist-health { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.hist-filters .btn[hidden] { display: none; }
.hist-row.head { position: sticky; top: 0; z-index: 1; border-top: 0; background: var(--surface); font-size: 11.5px; font-weight: 500; color: var(--subtle); border-bottom: 1px solid var(--line); }
.hist-row.head:hover { background: var(--surface); }
.hist-row .t { font-family: var(--mono); font-size: 11.5px; color: var(--subtle); }
.hist-row .acc { font-weight: 500; }
.hist-row .x { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-row .x.err { color: var(--bad); }
.hist-row .v { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Contas ---------- */
.health-board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px 12px; }
.health-board-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.health-board-top h3 { font-size: 14px; font-weight: 600; }
.health-board-top p { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.health-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.health-chip { font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); font-variant-numeric: tabular-nums; }
.health-chip.on-active { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.health-chip.on-344 { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.health-chip.on-226, .health-chip.on-shadow { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.health-chip.on-proxy { color: var(--accent); border-color: var(--accent-line); }
.health-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.health-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); }
.health-row:hover { border-color: var(--line-strong); }
.acc-avatar-letter { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--raised); color: var(--muted); }
.health-row-meta { min-width: 0; flex: 1; }
.health-row-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.health-row-sub { font-size: 11.5px; color: var(--subtle); margin-top: 1px; }

.profile-sync-bar { display: none; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--radius-md); font-size: 13px; }
.profile-sync-bar.show { display: flex; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.account-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color 0.12s; }
.account-card:hover { border-color: var(--line-strong); }
.acc-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--raised); display: block; flex-shrink: 0; }
.acc-handle { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc2 { overflow: visible; }
.acc2-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acc2-title { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.acc2 .acc-avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--acc-tone, var(--line-strong)); }
.acc2.tone-ok { --acc-tone: var(--ok); }
.acc2.tone-paused { --acc-tone: var(--paused); }
.acc2.tone-warn { --acc-tone: var(--warn); }
.acc2.tone-bad { --acc-tone: var(--bad); }
.acc2-menu-btn { width: 30px; height: 30px; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--muted); font-size: 18px; line-height: 1; }
.acc2-menu-btn:hover { background: var(--raised); color: var(--text); border-color: var(--line); }
.acc2-menu { position: absolute; right: 12px; top: 52px; z-index: 30; min-width: 168px; padding: 4px; display: none; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--pop-shadow); }
.acc2-menu.open { display: block; animation: view-in 0.12s ease-out; }
.acc2-menu button, .acc2-menu a { display: block; width: 100%; padding: 7px 10px; background: none; border: 0; border-radius: 5px; text-align: left; font-size: 13px; color: var(--text); text-decoration: none; }
.acc2-menu button:hover, .acc2-menu a:hover { background: var(--raised); }
.acc2-menu .danger { color: var(--bad); }
.acc2-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.acc2-metric { background: var(--surface); padding: 8px 10px; }
.acc2-metric small { display: block; font-size: 11.5px; color: var(--subtle); }
.acc2-metric b { font-family: var(--mono); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.acc2-rate { height: 3px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.acc2-rate i { display: block; height: 100%; border-radius: 2px; background: var(--acc-tone, var(--ok)); }
.acc2-sub { min-height: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.acc2-actions { display: flex; gap: 8px; }
.acc2-actions .btn { flex: 1 1 0; }
.acc-status-indicator, .ind-active { display: none; }

/* ---------- Console ---------- */
.console-card { padding: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }

.console-hero { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.console-now { display: flex; align-items: center; gap: 14px; flex: 1 1 320px; min-width: 0; }
.console-now strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.console-now p { margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--subtle); flex-shrink: 0; }
.live-dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.live-dot.wait { background: var(--info); box-shadow: 0 0 0 4px var(--accent-soft); }
.console-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.console-actions .btn { height: 38px; padding: 0 16px; font-size: 13.5px; }

.console-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.c-tile { padding: 12px 18px; min-width: 0; box-shadow: 1px 0 0 0 var(--line); }
.c-tile small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.c-tile b { display: block; margin-top: 2px; font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.c-tile > span { display: block; font-size: 12px; color: var(--subtle); }
.c-tile b span { font-size: inherit; color: inherit; }
.c-tile.bad b { color: var(--bad); }

.console-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.console-search { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; min-width: 200px; height: 36px; padding: 0 10px; background: var(--input); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.console-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.console-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 13.5px; }
.console-search svg { color: var(--subtle); }
.console-search kbd { font-family: var(--mono); font-size: 11px; color: var(--subtle); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; line-height: 17px; }
.console-select { height: 36px; min-width: 150px; padding: 0 10px; background: var(--input); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 13px; outline: none; }
.console-select:focus { border-color: var(--accent); }
.console-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.console-tools .btn { height: 34px; }
.console-tools .btn.is-live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.console-tools .live-dot { width: 8px; height: 8px; box-shadow: none; }

.seg-tabs { display: inline-flex; padding: 2px; gap: 2px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; background: none; border: 0; border-radius: 5px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.filter-chip em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.filter-chip:hover { color: var(--text); }
.filter-chip.active { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.filter-chip.active em { color: var(--muted); }

.console-viewport { height: min(66vh, 760px); min-height: 380px; overflow-y: auto; display: flex; flex-direction: column; }
.console-empty { margin: auto; padding: 48px 16px; text-align: center; font-size: 13px; color: var(--subtle); }

.log-entry { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); box-shadow: inset 2px 0 0 var(--kind, transparent); }
.log-entry:hover { background: var(--raised); }
.log-entry.kind-post { --kind: var(--ok); }
.log-entry.kind-fail { --kind: var(--bad); }
.log-entry.kind-metrics { --kind: var(--paused); }
.log-entry.kind-system { --kind: var(--accent); }
.log-rail { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.log-time { font-family: var(--mono); font-size: 11.5px; color: var(--subtle); user-select: none; }
.log-tag { font-size: 10.5px; font-weight: 600; letter-spacing: 0.03em; padding: 1px 6px; border-radius: 4px; background: var(--raised); color: var(--muted); }
.tag-success { background: var(--ok-bg); color: var(--ok); }
.tag-error { background: var(--bad-bg); color: var(--bad); }
.tag-warning { background: var(--warn-bg); color: var(--warn); }
.tag-system { background: var(--accent-soft); color: var(--accent); }
.tag-metrics { background: var(--paused-bg); color: var(--paused); }
.log-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.log-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.log-headline { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.log-title { font-size: 13.5px; font-weight: 600; }
.log-account { font-size: 12.5px; font-weight: 500; color: var(--accent); }
.log-detail { font-size: 13px; color: var(--muted); line-height: 1.5; word-break: break-word; }
.log-quote { padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md); }
.log-quote-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 11px; font-weight: 500; color: var(--subtle); }
.log-quote p { font-size: 13px; line-height: 1.55; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.log-quote p.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.log-actions { display: flex; gap: 4px; flex-shrink: 0; }
.log-link-btn, .log-icon-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; background: none; border: 1px solid var(--line); border-radius: 5px; }
.log-link-btn:hover, .log-icon-btn:hover { color: var(--text); background: var(--raised); border-color: var(--line-strong); }
.log-profile { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); text-decoration: none; }
.log-profile img, .tweet-card img { border-radius: 50%; object-fit: cover; background: var(--raised); display: block; }
.log-profile img { width: 24px; height: 24px; }
.tweet-card { display: grid; grid-template-columns: 40px 1fr; gap: 10px; margin-top: 10px; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.tweet-card img { width: 40px; height: 40px; }
.tweet-name, .tweet-handle, .tweet-open { text-decoration: none; }
.tweet-name { font-size: 14px; font-weight: 600; color: var(--text); }
.tweet-handle { margin-left: 6px; font-size: 13px; color: var(--subtle); }
.tweet-card p { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--text); white-space: pre-wrap; }
.tweet-card p.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tweet-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.tweet-open { font-size: 12px; font-weight: 500; color: var(--accent); }

/* ---------- Textos, mídias, intervalos ---------- */
.text-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.text-card:hover { border-color: var(--line-strong); }
.text-index-tag { flex-shrink: 0; font-family: var(--mono); font-size: 11px; color: var(--subtle); padding-top: 2px; }
.text-content-body { flex: 1; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.highlight-tag { font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }

.media-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.media-box { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.media-box:hover { border-color: var(--line-strong); }
.media-preview-area { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--raised); cursor: pointer; }
.media-img { width: 100%; height: 100%; object-fit: cover; }
.media-zoom-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 0; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 12px; font-weight: 500; transition: opacity 0.12s; }
.media-box:hover .media-zoom-overlay { opacity: 1; }
.media-footer-controls { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-top: 1px solid var(--line); }
#media-drop-zone { border: 1px dashed var(--line-strong) !important; background: var(--bg) !important; }
#media-drop-zone:hover { border-color: var(--accent) !important; background: var(--accent-soft) !important; }

.delay-row { position: relative; display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.delay-row.active-mode { border-color: var(--ink); }
.delay-active-pill { display: none; margin-left: 8px; padding: 0 7px; line-height: 18px; font-size: 11px; font-weight: 500; border-radius: 4px; background: var(--ink); color: var(--on-ink); }
.delay-row.active-mode .delay-active-pill { display: inline-flex; align-items: center; }
.delay-row-header { display: flex; align-items: center; justify-content: space-between; }
.delay-row-title { font-size: 14px; font-weight: 600; }
.delay-badge { font-family: var(--mono); font-size: 12.5px; font-weight: 500; padding: 2px 9px; border-radius: 5px; background: var(--raised); border: 1px solid var(--line); }
.delay-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.notify-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 13px; color: var(--muted); cursor: pointer; line-height: 1.45; }
.login-alt { margin-top: 14px; display: grid; gap: 8px; text-align: center; } .login-alt .btn { width: 100%; justify-content: center; }
.login-or { font-size: 11.5px; color: var(--subtle); text-transform: uppercase; letter-spacing: .06em; }
.login-alt-msg { min-height: 1.2em; font-size: 12.5px; color: var(--muted); }
.notify-row input { margin-top: 3px; accent-color: var(--accent); flex: none; }
/* Toda caixinha de ligar/desligar vira interruptor (o mesmo do .switch). Escolha em lista (dias, contas para copiar) continua caixinha (.keep-box). */
.notify-row > input[type=checkbox], label.check:not(.keep-box) > input[type=checkbox] { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 34px; height: 20px; margin: 0 10px 0 0; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong, #3a3a42); cursor: pointer; vertical-align: middle; transition: background .18s; }
.notify-row > input[type=checkbox]::before, label.check:not(.keep-box) > input[type=checkbox]::before { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .18s; }
.notify-row > input[type=checkbox]:checked, label.check:not(.keep-box) > input[type=checkbox]:checked { background: var(--ok); }
.notify-row > input[type=checkbox]:checked::before, label.check:not(.keep-box) > input[type=checkbox]:checked::before { transform: translateX(14px); }
.notify-row > input[type=checkbox]:focus-visible, label.check:not(.keep-box) > input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notify-row > input[type=checkbox]:disabled, label.check:not(.keep-box) > input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
.notify-row > input[type=checkbox] { margin-top: 1px; }
.notify-row b { color: var(--text); font-weight: 600; margin-right: 4px; }
.delay-badge-edit { display: inline-flex; align-items: center; gap: 2px; padding: 0 9px 0 4px; }
.delay-badge-edit input { width: 54px; height: 26px; padding: 0 4px; text-align: right; font: inherit; color: var(--text); background: transparent; border: 0; outline: none; -moz-appearance: textfield; appearance: textfield; }
.delay-badge-edit input::-webkit-outer-spin-button, .delay-badge-edit input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.delay-badge-edit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.autosave-status { align-self: flex-start; flex: none; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; color: var(--subtle); background: var(--raised); border: 1px solid var(--line); white-space: nowrap; }
.autosave-status[data-state="pending"] { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.autosave-status[data-state="saving"] { color: var(--info); }
.autosave-status[data-state="saved"] { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.autosave-status[data-state="error"] { color: var(--bad); background: var(--bad-bg); border-color: transparent; }
.preset-btn { height: 26px; padding: 0 10px; font-size: 12px; font-weight: 500; color: var(--muted); background: none; border: 1px solid var(--line-strong); border-radius: 5px; }
.preset-btn:hover { color: var(--text); background: var(--raised); }

/* ---------- Modais, confirmação, toasts ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; background: var(--scrim); overscroll-behavior: contain; }
/* Janela aberta: a página de trás fica parada, e a rolagem da janela não "vaza" para o painel nem para a página que o embute (Meu spam do admin) */
body.modal-open { overflow: hidden; }
.modal-box { overscroll-behavior: contain; }
html { overscroll-behavior: contain; }
.modal-box { position: relative; width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto; padding: 24px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); box-shadow: var(--pop-shadow); animation: view-in 0.14s ease-out; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.modal-close-btn { width: 28px; height: 28px; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: 6px; color: var(--muted); }
.modal-close-btn:hover { background: var(--raised); color: var(--text); border-color: var(--line); }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 22px; }
#lightbox-modal .modal-box { max-width: 90vw; width: auto; padding: 0; background: transparent; border: 0; box-shadow: none; text-align: center; }
#lightbox-img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius-lg); border: 1px solid var(--line-strong); }

.confirm-layer { position: fixed; inset: 0; z-index: 4000; display: none; align-items: center; justify-content: center; padding: 20px; background: var(--scrim); }
.confirm-layer.open { display: flex; }
.confirm-card { width: 100%; max-width: 420px; padding: 22px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); box-shadow: var(--pop-shadow); }
.confirm-card h3 { font-size: 16px; font-weight: 600; }
.confirm-card p { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.confirm-input { width: 100%; margin-top: 12px; }
.confirm-input[hidden], .confirm-actions [hidden] { display: none; }

#toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 400px; padding: 12px 14px; pointer-events: auto; background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--muted); border-radius: var(--radius-md); box-shadow: var(--pop-shadow); animation: view-in 0.16s ease-out; }
.toast.toast-success { border-left-color: var(--ok); }
.toast.toast-error { border-left-color: var(--bad); }
.toast.toast-info { border-left-color: var(--accent); }
.toast.toast-warning { border-left-color: var(--warn); }
.toast-icon { display: flex; }
.toast-body { flex: 1; }
.toast-title { font-size: 13px; font-weight: 600; }
.toast-msg { margin-top: 1px; font-size: 12.5px; color: var(--muted); }

/* ---------- Navegação do celular ---------- */
.mobile-bottom-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.mobile-bottom-nav::-webkit-scrollbar { display: none; }
.mobile-nav-item { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 12px; background: none; border: 0; border-radius: 6px; font-size: 10.5px; font-weight: 500; color: var(--muted); }
.mobile-nav-item.active { color: var(--text); background: var(--raised); }
.mobile-nav-item.active svg { color: var(--accent); }

/* ---------- Responsivo ---------- */
@media (max-width: 1240px) {
    .top-left .health-chips { display: none; }
}
@media (max-width: 1100px) {
    .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-ribbon { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dash-grid, .dash-grid.dash-grid3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .mobile-bottom-nav { display: flex; }
    header { padding: 0 14px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
    .header-actions { flex-wrap: wrap; gap: 6px; }
    .container { padding: 16px 14px 96px; }
    #toast-container { left: 14px; right: 14px; bottom: 76px; }
    .toast { min-width: 0; max-width: none; }
    .dropdown-menu { right: auto; left: 0; min-width: min(280px, 86vw); }
}
@media (max-width: 640px) {
    .stats-ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-kpi { padding: 14px; }
    .dash-kpi-value { font-size: 24px; }
    .dash-ring { display: none; }
    .tl-item { grid-template-columns: 8px 44px minmax(0, 1fr); }
    .tl-link { display: none; }
    .hist-row { grid-template-columns: 76px minmax(0, 1fr) 54px; gap: 10px; }
    .hist-row .acc, .hist-row .v { display: none; }
    .hist-count { margin-left: 0; width: 100%; }
    .log-entry { grid-template-columns: 1fr; gap: 8px; }
    .console-search { min-width: 0; width: 100%; }
    .seg-tabs { width: 100%; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .seg-tabs::-webkit-scrollbar { display: none; }
    .console-select { flex: 1 1 100%; }
    .console-tools { margin-left: 0; width: 100%; }
    .console-tools .btn { flex: 1 1 auto; }
    .console-viewport { height: 60vh; min-height: 320px; }
    .card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

.dropdown-group { padding: 10px 12px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.dropdown-group:first-child { padding-top: 4px; }

.budget-cfg { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); align-items: end; }
.budget-cfg label, .budget-cfg-label { display: block; font-size: 11.5px; color: var(--subtle); margin-bottom: 6px; }
.budget-cfg input[type=number] { display: block; width: 100%; margin-top: 6px; padding: 8px 10px; background: var(--raised); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); font-size: 13px; }
.budget-seg { display: flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.budget-seg button { flex: 1; padding: 8px 10px; background: transparent; border: 0; border-right: 1px solid var(--line-strong); color: var(--subtle); font-size: 12.5px; cursor: pointer; }
.budget-seg button:last-child { border-right: 0; }
.budget-seg button:hover:not(:disabled) { color: var(--text); background: var(--raised); }
.budget-seg button.on { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.budget-seg button:disabled { opacity: .45; cursor: not-allowed; }
.budget-cfg-hint { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--subtle); line-height: 1.45; }

/* ---------- Progresso de importação de contas (verificação no X, uma por vez) ---------- */
.acc-progress { padding: 4px 0 8px; }
.acc-progress-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.acc-progress-row b { font-family: var(--mono); color: var(--text); font-weight: 600; }
.acc-progress-bar { height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.acc-progress-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .25s ease; }
.acc-progress-hint { margin: 10px 0 0; font-size: 12px; color: var(--subtle); line-height: 1.5; }

/* ---------- Seletor de tema ---------- */
.theme-wrap { position: relative; display: inline-flex; }
.theme-pop { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; min-width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--pop-shadow); }
.theme-pop.open { display: block; }
.theme-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: none; border: 0; border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.theme-pop button:hover { background: var(--raised); }
.theme-pop button.on { box-shadow: inset 0 0 0 1px var(--accent-line); }
.theme-pop .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-strong); flex: none; }

/* ==========================================================================
   Temas decorados. Cada um muda cores, fontes, formas e traz o seu desenho (morcego / gatinha).
   Os desenhos são SVG embutidos, então não dependem de arquivo nem de internet.
   ========================================================================== */

/* ---------- Tema Batman: o escuro dourado, mais quente e de cantos retos, com o morcego só na marca ----------
   Antes tinha prédios, sinal no céu, degradês, brilho, letras maiúsculas e borda dourada em todo cartão. Ficou só a cor e o logo. */
:root:root[data-theme="batman"] {
    color-scheme: dark;
    --bg: #09090b; --surface: #111114; --raised: #18181c; --input: #0c0c0e;
    --line: #25252b; --line-strong: #3a3a42;
    --text: #efeee6; --muted: #aeada3; --subtle: #77766d;
    --ink: #f5c518; --on-ink: #0a0a0a;
    --accent: #f5c518; --accent-soft: rgba(245, 197, 24, 0.12); --accent-line: rgba(245, 197, 24, 0.45);
    --radius-sm: 4px; --radius-md: 5px; --radius-lg: 6px; --radius-xl: 8px;
}
:root[data-theme="batman"] .brand-logo-box { border-radius: 50%; background: var(--accent); }
:root[data-theme="batman"] .brand-logo-svg { display: none; }
:root[data-theme="batman"] .brand-logo-box::after {
    content: ""; width: 20px; height: 10px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 50'><path fill='%23000' d='M43 11L45 2L50 8L55 2L57 11C64 8 74 8 82 12C90 16 96 24 98 34C90 30 85 30 80 33C76 36 73 42 70 48C67 41 62 36 56 34C53 33 52 34 50 37C48 34 47 33 44 34C38 36 33 41 30 48C27 42 24 36 20 33C15 30 10 30 2 34C4 24 10 16 18 12C26 8 36 8 43 11Z'/></svg>") no-repeat center / contain;
}
:root[data-theme="batman"] ::selection { background: rgba(245, 197, 24, 0.3); color: #fff; }

/* ---------- Tema Hello Kitty: rosa, bolinhas, laços e coração ---------- */
:root:root[data-theme="hellokitty"] {
    color-scheme: light;
    --bg: #ffeaf2; --surface: #ffffff; --raised: #ffe3ee; --input: #ffffff;
    --line: #f8cadc; --line-strong: #f0a9c4;
    --text: #4a2431; --muted: #7a4d5e; --subtle: #a67b8b;
    --ink: #e60f4d; --on-ink: #ffffff;
    --accent: #e60f4d; --accent-soft: rgba(230, 15, 77, 0.1); --accent-line: rgba(230, 15, 77, 0.42);
    --info: #d6336c;
    --ok: #1d8a52; --bad: #cc3b3b; --warn: #b87608; --paused: #7c53d6;
    --ok-bg: rgba(29, 138, 82, 0.1); --bad-bg: rgba(204, 59, 59, 0.09); --warn-bg: rgba(184, 118, 8, 0.11); --paused-bg: rgba(124, 83, 214, 0.1);
    --radius-sm: 10px; --radius-md: 14px; --radius-lg: 20px; --radius-xl: 26px;
    --pop-shadow: 0 12px 32px rgba(230, 15, 77, 0.18); --scrim: rgba(74, 36, 49, 0.4);
    --font: ui-rounded, 'Nunito', 'Quicksand', 'Segoe UI Variable Display', 'Trebuchet MS', system-ui, sans-serif;
}
:root[data-theme="hellokitty"] body {
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 11px 11px, rgba(255, 255, 255, 0.95) 3.5px, transparent 4px),
        radial-gradient(circle at 33px 33px, rgba(247, 168, 197, 0.55) 3px, transparent 3.5px);
    background-size: 44px 44px;
    background-attachment: fixed;
}
/* Corações e laço nos cantos da tela */
:root[data-theme="hellokitty"] body::before {
    content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; z-index: -1; opacity: 0.8;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40'><g fill='%23f7a8c5'><path d='M14 14c-5-7-14-1-9 6 3 4 9 8 9 8s6-4 9-8c5-7-4-13-9-6z' opacity='.7'/><path d='M62 22c-4-6-11-1-7 5 2 3 7 6 7 6s5-3 7-6c4-6-3-11-7-5z' opacity='.5'/><path d='M104 12c-4-6-11-1-7 5 2 3 7 6 7 6s5-3 7-6c4-6-3-11-7-5z' opacity='.7'/></g><g fill='%23e60f4d' opacity='.55'><circle cx='36' cy='8' r='1.6'/><circle cx='88' cy='30' r='1.6'/><circle cx='118' cy='34' r='1.6'/></g></svg>") repeat-x bottom / 340px 120px;
}
:root[data-theme="hellokitty"] body::after {
    content: ""; position: fixed; right: 18px; bottom: 14px; width: 150px; height: 135px; pointer-events: none; z-index: -1;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'><g stroke='%234a2431' stroke-width='2.5' stroke-linejoin='round'><path d='M16 34L12 8L38 20Z' fill='white'/><path d='M84 34L88 8L62 20Z' fill='white'/><ellipse cx='50' cy='52' rx='40' ry='31' fill='white'/><path d='M72 22Q58 8 57 23Q59 35 72 22Z' fill='%23e60f4d'/><path d='M72 22Q86 8 89 23Q85 35 72 22Z' fill='%23e60f4d'/><circle cx='72' cy='22' r='4.5' fill='%23ff5c8a'/></g><ellipse cx='33' cy='50' rx='3.5' ry='4.6' fill='%234a2431'/><ellipse cx='67' cy='50' rx='3.5' ry='4.6' fill='%234a2431'/><ellipse cx='50' cy='58' rx='6' ry='4' fill='%23ffc928' stroke='%234a2431' stroke-width='2'/><g stroke='%234a2431' stroke-width='2.5' stroke-linecap='round'><path d='M7 46L22 50M6 57L22 57M8 68L22 63M93 46L78 50M94 57L78 57M92 68L78 63'/></g></svg>") no-repeat center / contain;
    opacity: 0.55;
}
:root[data-theme="hellokitty"] .sidebar { background: linear-gradient(180deg, #ffd3e3, #ffe6ef); border-right: 3px dotted #f4a3c1; }
:root[data-theme="hellokitty"] .brand-logo-box { width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #f4a3c1; }
:root[data-theme="hellokitty"] .brand-logo-svg { display: none; }
:root[data-theme="hellokitty"] .brand-logo-box::after {
    content: ""; width: 30px; height: 27px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'><g stroke='%234a2431' stroke-width='3' stroke-linejoin='round'><path d='M16 34L12 8L38 20Z' fill='white'/><path d='M84 34L88 8L62 20Z' fill='white'/><ellipse cx='50' cy='52' rx='40' ry='31' fill='white'/><path d='M72 22Q58 8 57 23Q59 35 72 22Z' fill='%23e60f4d'/><path d='M72 22Q86 8 89 23Q85 35 72 22Z' fill='%23e60f4d'/><circle cx='72' cy='22' r='4.5' fill='%23ff5c8a'/></g><ellipse cx='33' cy='50' rx='4' ry='5' fill='%234a2431'/><ellipse cx='67' cy='50' rx='4' ry='5' fill='%234a2431'/><ellipse cx='50' cy='58' rx='6' ry='4' fill='%23ffc928' stroke='%234a2431' stroke-width='2'/></svg>") no-repeat center / contain;
}
:root[data-theme="hellokitty"] .brand-title-wrap h1 { font-size: 14px; font-weight: 800; color: var(--accent); white-space: nowrap; gap: 5px; }
:root[data-theme="hellokitty"] .brand-title-wrap h1::after { content: "🎀"; font-size: 15px; }
:root[data-theme="hellokitty"] .page-title { font-size: 18px; font-weight: 800; color: var(--accent); }
:root[data-theme="hellokitty"] .page-title::before { content: "🎀"; margin-right: 8px; }
:root[data-theme="hellokitty"] .page-title::after { content: " ♡"; opacity: 0.8; }
:root[data-theme="hellokitty"] .card-header h2, :root[data-theme="hellokitty"] .card-title { font-weight: 800 !important; color: var(--accent); }
:root[data-theme="hellokitty"] .side-label { color: #d6336c; font-weight: 800; letter-spacing: 0.04em; }
:root[data-theme="hellokitty"] .side-label::before { content: "♡ "; }
:root[data-theme="hellokitty"] .tab-btn { border-radius: 999px; font-weight: 700; color: #7a4d5e; height: 36px; }
:root[data-theme="hellokitty"] .tab-btn:hover { background: #fff; color: var(--accent); }
:root[data-theme="hellokitty"] .tab-btn.active { background: var(--accent); color: #fff; box-shadow: 0 3px 10px rgba(230, 15, 77, 0.3); }
:root[data-theme="hellokitty"] .tab-btn.active svg, :root[data-theme="hellokitty"] .tab-btn.active .tab-counter { color: #fff; }
:root[data-theme="hellokitty"] header { background: rgba(255, 234, 242, 0.92); backdrop-filter: blur(6px); border-bottom: 3px dotted #f4a3c1; }
:root[data-theme="hellokitty"] .card,
:root[data-theme="hellokitty"] .onboard,
:root[data-theme="hellokitty"] .delay-row { border: 2px solid #f8cadc; box-shadow: 0 4px 0 #f8cadc, 0 10px 24px rgba(230, 15, 77, 0.07); }
:root[data-theme="hellokitty"] .stat-card, :root[data-theme="hellokitty"] .dash-kpi { background: #fff; }
:root[data-theme="hellokitty"] .btn { border-radius: 999px; font-weight: 800; }
:root[data-theme="hellokitty"] .btn-primary { box-shadow: 0 3px 0 #a80a38; }
:root[data-theme="hellokitty"] .btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #a80a38; }
:root[data-theme="hellokitty"] .btn-success { box-shadow: 0 3px 0 #146a3e; }
:root[data-theme="hellokitty"] .status-badge, :root[data-theme="hellokitty"] .health-chip, :root[data-theme="hellokitty"] .preset-btn { border-radius: 999px; }
:root[data-theme="hellokitty"] .dropdown-trigger { border-radius: 999px; }
:root[data-theme="hellokitty"] ::-webkit-scrollbar-thumb { background: #f4a3c1; }
:root[data-theme="hellokitty"] ::selection { background: rgba(230, 15, 77, 0.22); }
/* Rodapé da barra lateral: a Hello Kitty de laço */
:root[data-theme="hellokitty"] .side-foot::before {
    content: ""; display: block; height: 96px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'><g stroke='%234a2431' stroke-width='2.5' stroke-linejoin='round'><path d='M16 34L12 8L38 20Z' fill='white'/><path d='M84 34L88 8L62 20Z' fill='white'/><ellipse cx='50' cy='52' rx='40' ry='31' fill='white'/><path d='M72 22Q58 8 57 23Q59 35 72 22Z' fill='%23e60f4d'/><path d='M72 22Q86 8 89 23Q85 35 72 22Z' fill='%23e60f4d'/><circle cx='72' cy='22' r='4.5' fill='%23ff5c8a'/></g><ellipse cx='33' cy='50' rx='3.5' ry='4.6' fill='%234a2431'/><ellipse cx='67' cy='50' rx='3.5' ry='4.6' fill='%234a2431'/><ellipse cx='50' cy='58' rx='6' ry='4' fill='%23ffc928' stroke='%234a2431' stroke-width='2'/><g stroke='%234a2431' stroke-width='2.5' stroke-linecap='round'><path d='M7 46L22 50M6 57L22 57M8 68L22 63M93 46L78 50M94 57L78 57M92 68L78 63'/></g></svg>") no-repeat center / contain;
}

/* ---------- Primeiros passos ---------- */
.onboard { margin-bottom: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--radius-lg); }
.ob-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ob-head h3 { font-size: 15px; font-weight: 600; margin: 0 0 2px; }
.ob-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.ob-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.ob-step { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-md); flex-wrap: wrap; }
.ob-step.done { opacity: 0.6; }
.ob-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.ob-step.done .ob-n { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.ob-txt { flex: 1 1 140px; min-width: 0; }
.ob-txt b { font-size: 13.5px; }
.ob-txt p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ---------- Janela de informação (teste de saúde, histórico, importar) ---------- */
.info-loading, .info-empty { padding: 22px 6px; text-align: center; font-size: 13px; color: var(--muted); }
.info-note { font-size: 12px; color: var(--subtle); line-height: 1.5; margin: 12px 0 0; }
.info-h { margin: 16px 0 6px; font-size: 12px; font-weight: 600; color: var(--subtle); text-transform: uppercase; letter-spacing: .05em; }
.hsum { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.hlist { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.hrow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; min-width: 0; }
.hrow:first-child { border-top: 0; }
.hrow b, .hrow .mono { flex: none; }
.hrow .mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hrow small { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.hdown { margin-bottom: 12px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); background: var(--bad-bg); border-radius: var(--radius-md); font-size: 13px; line-height: 1.5; }
.hbars { display: flex; align-items: flex-end; gap: 2px; height: 80px; margin-top: 6px; }
.hbars div { flex: 1; display: flex; flex-direction: column-reverse; min-width: 0; height: 100%; }
.hbars i { display: block; width: 100%; background: var(--accent); border-radius: 2px 2px 0 0; }
.hbars i.f { background: var(--bad); }
.hlabels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--subtle); margin-top: 4px; font-family: var(--mono); }
.radio-col { display: grid; gap: 8px; margin: 10px 0; font-size: 13px; }
.radio-col label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.cfg-backup { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.cfg-backup h4 { margin: 0 0 4px; font-size: 13.5px; }
.cfg-backup p { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.cfg-backup .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Aba Configurações ---------- */
.set-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; margin-top: 14px; align-items: start; }
.set-nav { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.set-nav button { text-align: left; padding: 9px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.set-nav button:hover { background: var(--raised); color: var(--text); }
.set-nav button.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.set-pane { min-width: 0; padding: 4px 4px 16px; }
.set-pane > section[hidden] { display: none; }
.set-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.set-group { margin-top: 14px; padding: 12px 16px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.set-group h4 { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--subtle); }
@media (max-width: 760px) {
    .set-layout { grid-template-columns: minmax(0, 1fr); }
    .set-nav { position: static; flex-direction: row; overflow-x: auto; }
    .set-nav button { white-space: nowrap; }
}
.set-body { padding: 4px 16px 16px; }
.set-hint { margin: 6px 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.set-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 18px; }
.set-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0; }
.set-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.set-field small { color: var(--subtle); }
.set-wh { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.set-wh .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.set-routes th, .set-routes td { text-align: center; padding: 6px 10px; font-size: 12.5px; }
.set-routes th:first-child, .set-routes td:first-child { text-align: left; }
.set-prev { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); max-width: 440px; }
.set-prev-msg { font-size: 13px; line-height: 1.5; margin-top: 4px; }
.set-prev-msg blockquote { margin: 4px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }
.set-prev-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.set-prev-btns span { font-size: 12px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2, var(--surface)); }
.set-hist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13px; }
.set-hist li { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
/* ==========================================================================
   Refino do estilo A: poucas caixas disputando atenção, números em destaque, dourado só no que importa.
   Dashboard: primeiro os 4 números que contam, depois o resumo do sistema numa faixa fina (sem caixa).
   ========================================================================== */
.container { padding: 22px 28px 64px; }
header { height: 52px; }
.page-title { font-size: 15px; }

#tab-dashboard.active { display: flex; flex-direction: column; }
#tab-dashboard > .dash-top, #tab-dashboard > .dash-alert, #tab-dashboard > .since-bar, #tab-dashboard > .onboard { order: 0; }
#tab-dashboard > .dash-kpis { order: 1; }
#tab-dashboard > .stats-ribbon { order: 2; }
#tab-dashboard > .dash-grid, #tab-dashboard > .card { order: 3; }

.dash-kpi { padding: 16px 20px; }
.dash-kpi-label { font-size: 12px; }
.dash-kpi-value { font-size: 26px; margin-top: 4px; }
.dash-kpi-sub { margin-top: 4px; }
.dash-kpi .dash-ring { width: 44px; height: 44px; margin-right: 18px; }

#tab-dashboard .stats-ribbon { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 28px; margin: 2px 0 18px; padding: 0 2px; background: transparent; border: 0; border-radius: 0; overflow: visible; }
#tab-dashboard .stat-card { padding: 2px 0 2px 12px; box-shadow: none; border-left: 2px solid var(--line); }
#tab-dashboard .stat-info span { font-size: 11.5px; }
#tab-dashboard .stat-value { margin-top: 1px; font-size: 15px !important; }
#tab-dashboard .stat-subtext { margin-top: 1px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#stat-card-countdown { border-left-color: var(--accent); }
#stat-card-countdown .stat-info span { color: var(--muted); }
#stat-card-countdown .stat-value { color: var(--accent) !important; }
#tab-dashboard .stat-card .metric-btn { top: 0; right: 0; }

.dash-grid { gap: 14px; margin-bottom: 14px; }
.dash-card { padding: 16px 18px; }
.dash-card h3 { font-size: 13px; }

@media (max-width: 900px) {
    .container { padding: 16px 14px 56px; }
    #tab-dashboard .stats-ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
}

/* ---------- Contas do X: o resumo da rotação não repete mais cada conta; cada lista é uma seção, não uma caixa dentro de outra ---------- */
.health-board { padding: 12px 16px; }
.health-board-top { align-items: center; margin-bottom: 0; }
.health-more { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.health-more > summary { cursor: pointer; list-style: none; font-size: 12.5px; color: var(--muted); }
.health-more > summary::-webkit-details-marker { display: none; }
.health-more > summary::before { content: '▸'; display: inline-block; width: 14px; }
.health-more[open] > summary::before { content: '▾'; }
.health-more .health-rows { margin-top: 10px; }

.acc-section { margin-bottom: 24px; }
.acc-section .card-header { margin-bottom: 10px; }
.acc-section .card-title { font-size: 13px; }
.acc-section .card-title-icon { display: none; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

.account-card { gap: 10px; padding: 14px 16px; }
.acc-avatar { width: 36px; height: 36px; }
.acc2-metrics { gap: 0; background: transparent; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
.acc2-metric { padding: 8px 0; background: transparent; }
.acc2-metric + .acc2-metric { padding-left: 12px; border-left: 1px solid var(--line); }
.acc2-rate { height: 2px; }

/* ---------- Histórico: página própria (sem caixa dentro de caixa), filtros numa linha, tabela como lista ---------- */
.hist-wrap { display: flex; flex-direction: column; gap: 12px; }
.hist-wrap > #hist-health:empty, .hist-wrap > #hist-captures:empty { display: none; }
.hist-wrap .hist-filters { margin-bottom: 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.hist-wrap .hist-scroll { border-radius: var(--radius-lg); }
.hist-row { padding: 10px 16px; }
.hist-row .t { white-space: nowrap; }

/* ---------- Console: botões do topo na mesma altura, citação do texto sem caixa dentro de caixa ---------- */
.console-actions .btn { height: 34px; padding: 0 14px; font-size: 13px; }
.console-hero { padding: 14px 18px; }
.c-tile { padding: 10px 18px; }
.c-tile b { font-size: 18px; }
.log-entry { grid-template-columns: 72px 1fr; padding: 11px 16px; }
.log-quote { padding: 2px 0 2px 12px; background: transparent; border: 0; border-left: 2px solid var(--line-strong); border-radius: 0; }
.log-quote-label { margin-bottom: 3px; }

/* ---------- Textos: uma lista só com linhas separadas por fio, em vez de um cartão por texto ---------- */
#texts-container:has(.text-card) { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
#texts-container .text-card { margin: 0; padding: 12px 16px; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; align-items: center; }
#texts-container .text-card:first-child { border-top: 0; }
#texts-container .text-card:hover { background: var(--raised); }
#texts-container .text-index-tag { padding-top: 0; min-width: 26px; }
#texts-container .text-content-body { font-size: 13.5px; }
#texts-container .text-card .btn { opacity: 0.75; }
#texts-container .text-card:hover .btn, #texts-container .text-card .btn:focus-visible { opacity: 1; }
@media (hover: none) { #texts-container .text-card .btn { opacity: 1; } }

/* ---------- Mídias: grade mais compacta, rodapé mais discreto ---------- */
.media-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.media-preview-area { height: 128px; }
.media-footer-controls { padding: 6px 8px 6px 10px; }
.media-footer-controls > span { font-family: var(--mono); font-size: 11px !important; font-weight: 500 !important; }

/* ---------- Intervalos: uma lista só; o modo em uso ganha uma barra dourada à esquerda ---------- */
.delays-wrap { max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.delays-wrap .delay-row { margin: 0; padding: 14px 18px; gap: 10px; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.delays-wrap .delay-row:first-child { border-top: 0; }
.delays-wrap .delay-row.active-mode { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--ink); }
.delays-wrap .cfg-backup { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.delay-row-title { font-size: 13.5px; }

/* ---------- Proxies: sem cartão em volta; os formatos aceitos ficam recolhidos ---------- */
.proxy-wrap { max-width: 820px; }
.proxy-wrap .form-group { margin-bottom: 12px; }
.proxy-formats { margin-bottom: 14px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.proxy-formats > summary { cursor: pointer; list-style: none; font-weight: 500; color: var(--text); }
.proxy-formats > summary::-webkit-details-marker { display: none; }
.proxy-formats > summary::before { content: '▸'; display: inline-block; width: 14px; color: var(--muted); }
.proxy-formats[open] > summary::before { content: '▾'; }
.proxy-formats .note-line { margin-top: 8px; }
.proxy-formats code { font-family: var(--mono); font-size: 12px; color: var(--text); }

/* ---------- Configurações ---------- */
#tab-settings #set-root { max-width: 1040px; }

/* ---------- Utilitários: no lugar dos style="" repetidos do index.html (!important para valer igual ao estilo inline) ---------- */
.u-row { display: flex !important; align-items: center !important; }
.u-between { display: flex !important; justify-content: space-between !important; align-items: center !important; margin-bottom: 8px !important; }
.u-mt14 { margin-top: 14px !important; }
.u-m0 { margin: 0 !important; }
.u-hint { font-size: 11px !important; color: var(--text-sub) !important; }

/* ---------- Modo TV: números grandes em tela cheia ---------- */
.tv-mode { position: fixed; inset: 0; z-index: 6000; display: flex; flex-direction: column; gap: 3vh; padding: 3vh 3vw; background: var(--bg); color: var(--text); overflow: hidden; }
.tv-mode[hidden] { display: none; }
body.tv-open { overflow: hidden; }
.tv-top { display: flex; align-items: center; gap: 2vw; }
.tv-status { display: inline-flex; align-items: center; gap: 1vw; font-size: clamp(16px, 2vw, 34px); font-weight: 500; }
.tv-status::before { content: ''; width: 0.9em; height: 0.9em; border-radius: 50%; background: var(--bad); }
.tv-status.on::before { background: var(--ok); animation: blink 1.6s ease-in-out infinite; }
.tv-clock { margin-left: auto; font-family: var(--mono); font-size: clamp(16px, 2vw, 34px); color: var(--muted); }
.tv-grid { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2vw; min-height: 0; }
.tv-card { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 2vh 2.4vw; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.tv-card small, .tv-mini small { font-size: clamp(14px, 1.7vw, 30px); color: var(--muted); font-weight: 500; }
.tv-card b { font-family: var(--mono); font-size: clamp(48px, 11vw, 220px); line-height: 1.02; font-weight: 500; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.tv-card span { font-size: clamp(12px, 1.5vw, 26px); color: var(--subtle); }
.tv-card.good b { color: var(--ok); }
.tv-card.bad b { color: var(--bad); }
.tv-card.tv-next b { color: var(--accent); }
.tv-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); gap: 2vw; align-items: stretch; }
.tv-mini { padding: 1.6vh 1.6vw; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.tv-mini b { display: block; font-family: var(--mono); font-size: clamp(24px, 3.6vw, 70px); font-weight: 500; font-variant-numeric: tabular-nums; }
.tv-mini span { font-size: clamp(11px, 1.2vw, 22px); color: var(--subtle); }
.tv-events { margin: 0; padding: 1.2vh 1.4vw; list-style: none; display: grid; align-content: start; gap: 0.5vh; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); font-size: clamp(12px, 1.3vw, 24px); overflow: hidden; }
.tv-events li { display: flex; gap: 1vw; min-width: 0; white-space: nowrap; }
.tv-events time { font-family: var(--mono); color: var(--subtle); }
.tv-events span { overflow: hidden; text-overflow: ellipsis; }
.tv-events li.kind-fail span { color: var(--bad); }
.tv-events li.kind-post span { color: var(--ok); }
@media (max-width: 760px) { .tv-grid { grid-template-columns: minmax(0, 1fr); } .tv-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tv-events { grid-column: 1 / -1; } }

/* ---------- Estados vazios com a próxima ação, aviso de conexão e botão em forma de link ---------- */
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 26px 16px; text-align: center; color: var(--muted); }
.empty-state b { font-size: 14px; font-weight: 600; color: var(--text); }
.empty-state p { max-width: 460px; margin: 0; font-size: 13px; line-height: 1.5; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
#net-banner[hidden] { display: none; }
#net-banner .btn { margin-left: 8px; }
.link-btn { padding: 0; background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ---------- Atalhos do teclado ---------- */
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; font-family: var(--mono); font-size: 12px; text-align: center; color: var(--text); background: var(--raised); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; }
.kb-list { display: grid; }
.kb-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.kb-row:first-child { border-top: 0; }

/* ---------- Tour guiado ---------- */
.tour-layer { position: fixed; inset: 0; z-index: 5500; }
.tour-layer[hidden] { display: none; }
.tour-spot { position: fixed; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.62), 0 0 0 2px var(--accent); transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease; pointer-events: none; }
.tour-pop { position: fixed; padding: 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--pop-shadow); }
.tour-pop h4 { margin: 2px 0 6px; font-size: 15px; font-weight: 600; }
.tour-pop p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.tour-count { font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.tour-actions > span { display: inline-flex; gap: 6px; }

/* ---------- Aparência escolhida em Configurações (letra via zoom no JS; aqui densidade e contraste) ---------- */
:root[data-density="compact"] .container { padding: 14px 20px 48px; }
:root[data-density="compact"] .card, :root[data-density="compact"] .dash-card { padding: 12px 14px; }
:root[data-density="compact"] .dash-kpi { padding: 10px 14px; }
:root[data-density="compact"] .dash-kpi-value { font-size: 22px; }
:root[data-density="compact"] .tab-btn { height: 30px; }
:root[data-density="compact"] .btn { height: 30px; }
:root[data-density="compact"] .btn-sm { height: 26px; }
:root[data-density="compact"] .account-card { padding: 10px 12px; gap: 8px; }
:root[data-density="compact"] .text-card, :root[data-density="compact"] #texts-container .text-card { padding: 8px 12px; }
:root[data-density="compact"] .hist-row { padding: 6px 12px; }
:root[data-density="compact"] .log-entry { padding: 8px 12px; }
:root[data-density="compact"] .delays-wrap .delay-row { padding: 10px 14px; }
:root[data-density="compact"] .page-head { margin-bottom: 10px; }
:root[data-contrast="high"] { --text: #ffffff; --muted: #dcdce2; --subtle: #bcbcc6; --line: #4c4c56; --line-strong: #7a7a86; --accent-line: rgba(76, 201, 230, 0.85); }
:root[data-contrast="high"][data-theme="light"] { --text: #000000; --muted: #20202a; --subtle: #3a3a44; --line: #8e8e86; --line-strong: #4a4a52; --accent: #7a5200; --accent-line: rgba(122, 82, 0, 0.8); }
:root[data-contrast="high"] :focus-visible { outline-width: 3px; }
:root[data-contrast="high"] .pill, :root[data-contrast="high"] .btn-secondary { border-color: var(--line-strong); }

/* ---------- Nota pessoal da conta ---------- */
.acc2-note { padding: 6px 8px; font-size: 12px; line-height: 1.4; color: var(--muted); background: var(--raised); border-left: 2px solid var(--line-strong); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------- Aparelhos que abriram o painel ---------- */
.dev-list { display: grid; margin: 4px 0 10px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.dev-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.dev-row:first-child { border-top: 0; }
.dev-row small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--subtle); }
.dev-row.me { background: var(--accent-soft); }

/* ---------- Lista virtual (console e histórico): só as linhas visíveis viram elementos ---------- */
.vl-head, .vl-top, .vl-rows, .vl-bottom { flex: none; }
.vl-head { position: sticky; top: 0; z-index: 1; }
.vl-item { flex: none; }

/* ---------- Melhores textos e horários (Dashboard) ---------- */
.dash-grid.dash-grid-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hour-bars { display: flex; align-items: flex-end; gap: 3px; height: 96px; margin-top: 14px; }
.hour-bars i { flex: 1; min-width: 0; border-radius: 2px 2px 0 0; background: var(--line-strong); }
.hour-bars i.best { background: var(--accent); }
.hour-labels { display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--mono); font-size: 10.5px; color: var(--subtle); }
@media (max-width: 900px) { .dash-grid.dash-grid-even { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Grupos de contas ---------- */
.acc-groups-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 12.5px; }
.acc-groups-bar[hidden] { display: none; }
.acc-groups-bar .tag-chip small { margin-left: 4px; font-family: var(--mono); font-size: 11px; opacity: 0.8; }
.acc-groups-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.acc-group { display: inline-block; margin-left: 4px; padding: 0 7px; font-size: 11px; font-weight: 500; color: var(--muted); background: var(--raised); border: 1px solid var(--line); border-radius: 999px; vertical-align: 1px; }

/* ---------- Textos: peso, etiquetas e chave de ativar/desativar ---------- */
.switch { position: relative; display: inline-flex; width: 34px; height: 20px; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background 0.12s; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform 0.12s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(14px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.text-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.tag-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--raised); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.tag-chip:hover { color: var(--text); border-color: var(--line-strong); }
.tag-chip.on { color: var(--on-ink); background: var(--ink); border-color: var(--ink); }
.tag-chip.clear { background: none; border-style: dashed; }
#texts-container .text-card.is-off .text-content-body { opacity: 0.5; }
.texts-tagbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 12px; }
.texts-tagbar[hidden], .texts-warn[hidden] { display: none; }
.texts-warn { margin: 0 0 12px; padding: 9px 14px; font-size: 13px; color: var(--warn); background: var(--warn-bg); border-radius: var(--radius-md); }
.text-meta-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.text-meta-row label { display: grid; gap: 4px; }
.text-meta-row label.grow { flex: 1 1 200px; }
.text-meta-row .form-input { min-height: 34px; }
.text-meta-row input[type=number] { width: 76px; }
.text-meta-row label.text-meta-check { display: inline-flex; align-items: center; gap: 6px; height: 34px; }

/* ---------- Primeiros passos: barra de progresso e versão compacta (quando o usuário esconde) ---------- */
.ob-progress { height: 4px; margin: 0 0 12px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.ob-progress i { display: block; height: 100%; border-radius: 2px; background: var(--accent); transition: width 0.25s ease; }
.onboard.ob-mini { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; font-size: 13px; color: var(--muted); }
.onboard.ob-mini b { color: var(--text); font-family: var(--mono); font-weight: 500; }

/* ---------- Prévia do texto no editor ---------- */
.text-preview { margin-top: 12px; padding: 10px 12px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
.text-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 12.5px; }
.text-preview-body { display: grid; gap: 6px; }
.text-preview-sample { padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.text-preview-count { font-family: var(--mono); font-size: 11.5px; color: var(--subtle); text-align: right; }
.text-preview-count.over { color: var(--bad); }
.text-preview-warn { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: var(--warn); line-height: 1.5; }
.text-preview-warn:empty { display: none; }

/* ===== Camada v3 (antes em panel-v3.css; juntada aqui na mesma ordem em que os dois arquivos carregavam: nada muda no visual) ===== */
/* ==========================================================================
   Visual novo (v3): carregado depois do panel.css e só refina o que já existe.
   Linguagem: cinza neutro e quase preto, bordas de 1 px, cantos grandes, números grandes em sans,
   mono só para legendas e variações, ciano só no foco e nos gráficos, sem emoji, brilho nem degradê.
   Nada aqui muda id, função ou ordem de elemento: só aparência.
   ========================================================================== */

:root { --sidebar-w: 252px; --ease: 140ms ease; }
body { letter-spacing: -0.003em; }

/* ---------- Barra lateral ---------- */
.sidebar { padding: 18px 14px 14px; gap: 20px; background: var(--bg); }
.side-brand { padding: 2px 6px; gap: 12px; }
.brand-logo-box { width: 32px; height: 32px; border-radius: 10px; background: var(--raised); color: var(--text); border: 1px solid var(--line); }
.brand-logo-svg { width: 15px; height: 15px; }
.brand-title-wrap h1 { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; }
.brand-badge { border-radius: 6px; }
.side-label { padding: 0 10px 8px; font-size: 11.5px; font-weight: 600; color: var(--subtle); letter-spacing: 0.01em; }
.side-nav { gap: 3px; }
.tab-btn { height: 38px; padding: 0 12px; gap: 12px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; transition: background var(--ease), color var(--ease); }
.tab-btn svg { width: 17px; height: 17px; opacity: 0.8; }
.tab-btn:hover { background: color-mix(in srgb, var(--raised) 70%, transparent); }
.tab-btn.active { background: var(--raised); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.tab-btn.active svg { color: var(--text); }
.tab-counter { font-size: 11.5px; }
.side-foot { padding-top: 14px; }

/* Busca da barra lateral (abre a busca geral) */
.side-search {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px 0 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
    color: var(--subtle); font-size: 13.5px; text-align: left; transition: border-color var(--ease), color var(--ease);
}
.side-search:hover { border-color: var(--line-strong); color: var(--muted); }
.side-search svg { width: 16px; height: 16px; }
.side-search span { flex: 1; }
.side-search kbd { margin: 0; }

/* ---------- Cabeçalho da página ---------- */
header { height: auto; min-height: 68px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.page-title { font-size: 21px; font-weight: 650; letter-spacing: -0.03em; }
.container { max-width: 1320px; padding: 28px 28px 72px; }

/* ---------- Superfícies e botões ---------- */
.card, .dash-kpis, .stats-ribbon { border-radius: var(--radius-lg); }
.card { padding: 22px; }
.btn { height: 36px; padding: 0 16px; border-radius: var(--radius-md); font-weight: 600; }
.btn-sm { height: 30px; border-radius: var(--radius-sm); }
.btn-secondary { background: transparent; border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--raised); border-color: var(--line-strong); }
.form-input, .form-textarea, .form-select, .select-custom, select.form-input { border-radius: var(--radius-md); }
.dropdown-trigger { border-radius: var(--radius-md); height: 36px; background: transparent; }
.status-badge { height: 32px; background: transparent; }

/* ---------- Números grandes ---------- */
.dash-kpis { background: var(--surface); }
.dash-kpi { padding: 22px 24px; }
.dash-kpi-label, .stat-info span { font-size: 13px; font-weight: 500; color: var(--muted); }
.dash-kpi-value { font-family: var(--font); font-size: 36px; font-weight: 600; letter-spacing: -0.04em; margin-top: 10px; }
.dash-kpi-sub { font-family: var(--mono); font-size: 12px; letter-spacing: -0.01em; }
.stat-card { padding: 18px 22px; }
.stat-value { font-family: var(--font); font-size: 24px !important; font-weight: 600; letter-spacing: -0.035em; }
.stat-subtext { font-family: var(--mono); font-size: 11.5px; }
.dash-card { padding: 22px 24px; }
.dash-card h3 { font-size: 14px; font-weight: 600; }

/* O título grande já está no cabeçalho: o da página fica só para leitores de tela, a descrição continua visível */
.page-head > div > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-head > div > p { margin-top: 0; }

/* ---------- Gráfico de posts por hora: linha fina com área suave ---------- */
.dash-bars .area { fill: var(--accent); fill-opacity: 0.1; stroke: none; }
.dash-bars .line { fill: none; stroke: var(--accent); stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; }
.dash-bars line { stroke-dasharray: 2 4; }

.cause-line { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.cause-line b { font-family: var(--mono); font-weight: 500; color: var(--text); }

/* ---------- Admin, página Site: prévia do cartão de link no estilo do Discord ---------- */
.dc-wrap { margin: 6px 0 8px; padding: 12px; border-radius: 10px; background: #313338; max-width: 460px; }
.dc-card { border-left: 4px solid #4cc9e6; border-radius: 4px; background: #2b2d31; padding: 10px 12px 12px; color: #dbdee1; }
.dc-site { font-size: 12px; color: #b5bac1; margin-bottom: 4px; }
.dc-title { font-size: 15px; font-weight: 600; color: #00a8fc; margin-bottom: 4px; word-break: break-word; }
.dc-desc { font-size: 13.5px; line-height: 1.4; color: #dbdee1; white-space: pre-wrap; word-break: break-word; }
.dc-img { display: block; width: 100%; max-height: 240px; object-fit: cover; margin-top: 10px; border-radius: 6px; }

/* ---------- Rodapé e links do site (definidos no admin) ---------- */
.site-footer { font-size: 11.5px; color: var(--subtle); line-height: 1.5; }
.site-links { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.site-links a { color: var(--muted); text-decoration: none; }
.site-links a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Textos e imagens: variações, horário, prévia em lote, A/B e álbuns ---------- */
.text-more { margin: 4px 0 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.text-more > summary { cursor: pointer; padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--muted); list-style: none; }
.text-more > summary::-webkit-details-marker { display: none; }
.text-more[open] > summary { color: var(--text); border-bottom: 1px solid var(--line); }
.text-more-body { padding: 12px; }
.text-more code, .batch-list code { font-family: var(--mono); font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--raised); }
.days-row { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.days-row label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.batch-list { max-height: 55vh; overflow-y: auto; display: grid; gap: 6px; }
.batch-row { display: flex; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.batch-n { font-family: var(--mono); font-size: 11.5px; color: var(--subtle); padding-top: 2px; }
.batch-text { font-size: 13.5px; line-height: 1.45; word-break: break-word; min-width: 0; }
.batch-txt { white-space: pre-wrap; }
.batch-meta { margin-top: 4px; font-size: 11.5px; color: var(--subtle); }
.ab-card { padding: 16px 18px; margin-bottom: 14px; }
.ab-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.ab-card h3 small { font-weight: 400; color: var(--subtle); margin-left: 6px; }
.ab-group + .ab-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ab-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.ab-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: var(--radius-sm); font-size: 13px; }
.ab-row.win { background: var(--ok-bg); }
.ab-num { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.media-footer-controls { flex-wrap: wrap; gap: 6px; }
.media-footer-controls > span { flex: 1 1 100%; }
.media-footer-controls > div { flex-wrap: wrap; }
.media-plan { display: grid; gap: 6px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); font-size: 13px; }
.media-plan .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* ---------- Admin: tabelas simples das ferramentas do dono ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { padding: 6px 10px; text-align: left; font-size: 11.5px; font-weight: 600; color: var(--subtle); border-bottom: 1px solid var(--line); }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }

/* ---------- Admin: mesmos números grandes em sans ---------- */
.mcard .mv { font-family: var(--font); font-size: 30px; letter-spacing: -0.035em; margin-top: 10px; }
.mcard { border-radius: var(--radius-lg); }

/* ---------- Busca geral (Ctrl+K) ---------- */
.search-layer { position: fixed; inset: 0; z-index: 4000; display: flex; justify-content: center; align-items: flex-start; padding: 14vh 16px 16px; background: var(--scrim); animation: view-in 0.12s ease-out; }
.search-box { width: 100%; max-width: 620px; max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); box-shadow: var(--pop-shadow); overflow: hidden; }
.search-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-head input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 15.5px; color: var(--text); }
.search-head input::placeholder { color: var(--subtle); }
.search-list { overflow-y: auto; padding: 6px; }
.search-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: none; border: 0; border-radius: var(--radius-md); text-align: left; font-size: 14px; color: var(--text); }
.search-row.sel, .search-row:hover { background: var(--raised); }
.search-kind { flex: 0 0 52px; font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.search-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hint { font-family: var(--mono); font-size: 11px; color: var(--subtle); }
.search-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.search-empty span { color: var(--subtle); font-size: 12.5px; }
.search-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--subtle); }
.search-flash { animation: search-flash 1.8s ease-out; }
@keyframes search-flash { 0%, 40% { box-shadow: 0 0 0 2px var(--accent); } 100% { box-shadow: 0 0 0 2px transparent; } }

/* ---------- Telas pequenas ---------- */
@media (max-width: 900px) {
    :root { --sidebar-w: 0px; }
    header { min-height: 60px; padding: 10px 16px; flex-wrap: wrap; }
    .container { padding: 18px 16px 64px; }
    .page-title { font-size: 18px; }
    .dash-kpi-value { font-size: 28px; }
}

/* Movimento reduzido: o painel inteiro respeita a escolha do sistema */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---------- Visuais: barra lateral recolhível, cabeçalho que encolhe e tamanho dos cartões das contas ---------- */
.side-collapse { margin-left: auto; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); border: 0; background: none; color: var(--subtle); cursor: pointer; }
.side-collapse:hover { background: var(--raised); color: var(--text); }
@media (min-width: 901px) {
    :root[data-side="closed"] { --sidebar-w: 64px; }
    :root[data-side="closed"] .sidebar { padding-left: 8px; padding-right: 8px; align-items: stretch; }
    :root[data-side="closed"] .side-brand { flex-direction: column; gap: 8px; padding: 2px 0; }
    :root[data-side="closed"] .brand-title-wrap, :root[data-side="closed"] .side-label, :root[data-side="closed"] .side-foot,
    :root[data-side="closed"] .side-search span, :root[data-side="closed"] .side-search kbd, :root[data-side="closed"] .tab-counter { display: none; }
    :root[data-side="closed"] .side-collapse { margin-left: 0; }
    :root[data-side="closed"] .tab-btn { font-size: 0; justify-content: center; padding: 0; gap: 0; }
    :root[data-side="closed"] .side-search { justify-content: center; padding: 0; }
}
@media (max-width: 900px) { .side-collapse { display: none; } }
header { transition: min-height .18s ease, padding .18s ease; }
:root.scrolled header { min-height: 44px; padding-top: 0; padding-bottom: 0; }
:root.scrolled header .health-chips { display: none; }
:root[data-accsize="small"] .grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
:root[data-accsize="small"] .account-card { padding: 10px 12px; gap: 6px; }
:root[data-accsize="large"] .grid-3 { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
:root[data-accsize="large"] .account-card { padding: 20px 22px; gap: 14px; }
.row-new { animation: row-new 2.4s ease-out; }
@keyframes row-new { 0%, 30% { background: var(--accent-soft, rgba(76,201,230,.14)); } 100% { background: transparent; } }
/* Falhas com listras além da cor vermelha (quem não distingue as cores ainda separa o que deu certo do que falhou) */
.dash-bars .b-fail { fill: url(#hatch-fail); stroke: var(--bad); stroke-width: 0.8; }
.dash-bars .line { stroke-dasharray: none; }

/* ---------- Imagens: cartões maiores, com informação e ações bem separadas ---------- */
.media-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.media-box { border-radius: var(--radius-lg, 12px); }
.media-preview-area { height: auto; aspect-ratio: 4 / 3; }
.media-info { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 4px; font-size: 14px; }
.media-info b { font-weight: 650; }
.media-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 10px 14px 14px; }
.media-actions .btn { width: 100%; justify-content: center; gap: 6px; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.media-add-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; border: 2px dashed var(--line-strong, #333); border-radius: var(--radius-lg, 12px); background: none; color: var(--muted); cursor: pointer; transition: border-color .12s, color .12s, background .12s; font: inherit; }
.media-add-tile b { color: var(--text); font-size: 15px; }
.media-add-tile span { font-size: 12.5px; }
.media-add-tile:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft, transparent); }
@media (max-width: 560px) { .media-gallery-grid { grid-template-columns: 1fr; } .media-actions { grid-template-columns: 1fr 1fr; } .media-actions .btn-danger { grid-column: 1 / -1; } }

/* ---------- Aparelhos: tabela com menu por linha ---------- */
.dev-table td small { display: block; color: var(--subtle); font-size: 12px; }
.dev-table td.act { width: 44px; text-align: right; }
.dev-table tr.dev-ended td { opacity: .6; }
.dev-menu { position: relative; display: inline-block; }
.dev-menu summary { list-style: none; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--muted); font-size: 18px; }
.dev-menu summary::-webkit-details-marker { display: none; }
.dev-menu summary:hover, .dev-menu[open] summary { background: var(--raised); color: var(--text); }
.dev-wrap { overflow: visible; }
.dev-menu-pop { position: absolute; right: 0; top: 34px; z-index: 30; min-width: 170px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong, var(--line)); border-radius: var(--radius-md); box-shadow: 0 10px 30px rgba(0,0,0,.35); display: grid; gap: 2px; text-align: left; }
.dev-menu-pop button { background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.dev-menu-pop button:hover { background: var(--raised); }
.dev-menu-pop button.danger { color: var(--bad, #ef4444); }

/* ---------- Contas: Latest e Trending em cartões separados e bem distintos ---------- */
.acc-section { padding: 18px 20px 20px; margin-bottom: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg, 12px); border-top: 3px solid var(--sec-color, var(--accent)); }
.acc-section.acc-latest { --sec-color: var(--accent); }
.acc-section.acc-trending { --sec-color: var(--warning, #f59e0b); }
.acc-sec-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.acc-sec-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--sec-color) 16%, transparent); color: var(--sec-color); }
.acc-sec-title { flex: 1 1 280px; min-width: 0; }
.acc-sec-title h3 { margin: 0; font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acc-sec-title p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.acc-sec-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-section .card-header { display: none; }
.acc-empty { grid-column: 1 / -1; display: grid; gap: 8px; justify-items: center; text-align: center; padding: 26px 16px; border: 2px dashed var(--line-strong, var(--line)); border-radius: var(--radius-md); color: var(--muted); font-size: 13px; }
.acc-empty b { color: var(--text); font-size: 14.5px; }
@media (max-width: 560px) { .acc-section { padding: 14px; } .acc-sec-actions { width: 100%; } .acc-sec-actions .btn { flex: 1; } }

/* Histórico em páginas */
.pager-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 12px 8px 2px; font-size: 13px; }
.pager-bar b { color: var(--text); }

/* ---------- Hall da fama ---------- */
.hall-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hall-tiles > div { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); display: grid; gap: 2px; }
.hall-tiles b { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; text-transform: capitalize; } .hall-tiles span { font-size: 12.5px; color: var(--muted); }
.hall-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; align-items: end; }
.hall-pod { padding: 16px 12px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg, 12px); display: grid; gap: 4px; }
.hall-pod.p1 { border-color: #d4a72c; box-shadow: 0 0 0 1px #d4a72c55 inset; padding-top: 26px; }
.hall-pod.p2 { border-color: #aab2bd; } .hall-pod.p3 { border-color: #b87333; }
.hall-pod.me { background: var(--accent-soft); }
.hall-medal { font-size: 30px; line-height: 1; }
.hall-pod b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hall-pod span { font-weight: 600; } .hall-pod small { color: var(--muted); }
.hall-table td, .hall-table th { white-space: nowrap; } .hall-table tr.hall-me td { background: var(--accent-soft); }
@media (max-width: 560px) { .hall-podium { grid-template-columns: 1fr; } }

.hall-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hall-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.hall-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.hall-table .num { text-align: right; font-variant-numeric: tabular-nums; }
#tab-hall .toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
#tab-hall .cfg-backup { margin: 0 0 12px; }

.hall-podium { align-items: end; }
.hall-pod.p1 { padding-top: 14px; transform: translateY(-8px); background: linear-gradient(180deg, #d4a72c22, transparent); }
.hall-pod.p2, .hall-pod.p3 { padding-top: 24px; }
.hall-crown { font-size: 26px; line-height: 1; animation: hall-bob 2.4s ease-in-out infinite; }
@keyframes hall-bob { 50% { transform: translateY(-4px) rotate(-6deg); } }
.hall-medal { font-size: 34px; }
.hall-hls { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 0 0 14px; }
.hall-hl { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto auto; column-gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.hall-hl i { grid-row: 1 / 4; font-style: normal; font-size: 28px; align-self: center; }
.hall-hl span { font-size: 12px; color: var(--muted); } .hall-hl small { color: var(--muted); }
.hall-rk { font-size: 18px; width: 48px; } .hall-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .hall-crown { animation: none; } }
@media (max-width: 560px) { .hall-pod.p1 { transform: none; } }

/* ---------- Ajuda por aba ---------- */
.help-btn { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong, var(--line)); background: none; color: var(--muted); font: 600 13px/1 var(--font, inherit); cursor: pointer; flex: none; }
.help-btn:hover { color: var(--accent); border-color: var(--accent); }
.help-shot { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: 12px; display: block; }
.help-intro { margin: 0 0 8px; line-height: 1.55; }
#info-body h4 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.help-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: hs; display: grid; gap: 8px; }
.help-steps li { counter-increment: hs; position: relative; padding-left: 34px; line-height: 1.5; }
.help-steps li::before { content: counter(hs); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: #e5484d; color: #fff; font: 700 12px/24px system-ui; text-align: center; }
.help-tips { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.5; }
.help-q { border-top: 1px solid var(--line); padding: 8px 0; } .help-q summary { cursor: pointer; font-weight: 550; } .help-q p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
#info-body kbd, #info-body code { font-family: var(--mono, monospace); font-size: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }

/* ---------- Avisos no canto (toast) e confirmação de "salvo" ---------- */
.toast { position: relative; overflow: hidden; padding-right: 34px; }
.toast-x { position: absolute; top: 6px; right: 8px; border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.toast-x:hover { color: var(--text); background: var(--surface-2, rgba(255,255,255,.06)); }
.toast-act { flex: none; border: 1px solid var(--line-strong); background: transparent; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.toast-act:hover { background: var(--surface-2, rgba(255,255,255,.06)); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .55; transform-origin: left; animation: toast-bar linear forwards; }
.toast-success .toast-bar { color: var(--ok); } .toast-error .toast-bar { color: var(--bad); } .toast-info .toast-bar { color: var(--accent); } .toast-warning .toast-bar { color: var(--warn); }
.toast.paused .toast-bar { animation-play-state: paused; }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.toast-success { background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.toast-error { background: color-mix(in srgb, var(--bad) 9%, var(--surface)); }
@media (prefers-reduced-motion: reduce) { .toast-bar { animation: none; display: none; } }

/* Configurações: o que aconteceu com a última mudança, num lugar que dá para ver */
.save-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s; }
.save-chip:empty { display: none; }
.save-chip svg { flex: none; }
.save-chip.saving { color: var(--muted); border-color: var(--line); }
.save-chip.saved { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.save-chip.failed { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.set-flash { animation: set-flash 1.4s ease-out; border-radius: 8px; }
@keyframes set-flash { 0% { background: color-mix(in srgb, var(--ok) 28%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); } 100% { background: transparent; box-shadow: 0 0 0 0 transparent; } }
.set-tick { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--ok); animation: set-tick 1.8s ease-out forwards; vertical-align: middle; }
@keyframes set-tick { 0% { opacity: 0; transform: translateX(-4px); } 12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
.hall-note { display: flex; gap: 10px; align-items: flex-start; } .hall-note > svg { flex: none; margin-top: 2px; color: var(--accent); }
.hall-ico { flex: none; vertical-align: -3px; } .hall-tiles b { display: flex; align-items: center; gap: 8px; text-transform: none; } .hall-tiles b .hall-ico { color: var(--muted); }
.hall-val { text-transform: capitalize; }
.hall-chg { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; } .hall-chg.up { color: var(--ok); } .hall-chg.down { color: var(--bad); }
.hall-prev { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; } .hall-emo { font-size: 1.1em; }
/* selos de lugar: círculo metálico com o número, sem emoji */
.rk { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; border: 1.5px solid; color: #1a1405; }
.rk1 { background: linear-gradient(145deg, #f2d77a, #c99a1d); border-color: #e8c35a; } .rk2 { background: linear-gradient(145deg, #e4e8ee, #9aa4b1); border-color: #c4ccd6; } .rk3 { background: linear-gradient(145deg, #e0a36a, #a5622b); border-color: #cf8a4f; color: #1f1005; }
.hall-medal .rk { width: 40px; height: 40px; font-size: 17px; }
.hall-crown { display: grid; place-items: center; color: #d4a72c; animation: none; font-size: inherit; }
.hall-hl i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 18px; align-self: center; }
.hall-tiles b .hall-val { font-size: 20px; font-weight: 650; color: var(--text); }

/* Aparelhos no celular: cada um vira um cart�o (a tabela larga obrigava a rolar de lado e ningu�m achava o bot�o) */
@media (max-width: 700px) {
  .dev-table, .dev-table tbody { display: block; }
  .dev-table thead { display: none; }
  .dev-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); position: relative; }
  .dev-table td { display: block; padding: 0; border: 0; min-width: 0; font-size: 13px; }
  .dev-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--subtle); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1px; }
  .dev-table td.dev-name { grid-column: 1 / -1; padding-right: 40px; font-size: 14px; }
  .dev-table td.act { position: absolute; top: 8px; right: 8px; width: auto; }
  .dev-menu-pop { right: 0; }
  .set-nav { position: sticky; top: 0; z-index: 5; }
}
.set-wh { scroll-margin-top: 150px; }

/* �cones por modo: linhas de intervalo e risco com ponto colorido (sem emoji) */
.mode-ico { flex: none; vertical-align: -3px; margin-right: 2px; }
.delay-row-title { display: inline-flex; align-items: center; gap: 6px; }
.dropdown-item-risk { display: inline-flex; align-items: center; gap: 4px; }
.dropdown-item-risk i { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); display: inline-block; }
.dropdown-item-risk.risk-low i { background: var(--ok); } .dropdown-item-risk.risk-medium i { background: var(--warn); } .dropdown-item-risk.risk-high i { background: var(--bad); }

/* Sem pulo ao abrir: o espa�o dos cart�es do dashboard j� est� reservado quando os n�meros ainda est�o chegando */
#tab-dashboard .dash-grid:first-of-type .dash-card { min-height: 402px; }
#tab-dashboard .dash-grid.dash-grid3 .dash-card, #tab-dashboard .dash-grid.dash-grid-even .dash-card { min-height: 150px; }
#dash-hourly { min-height: 290px; } #dash-donut { min-height: 300px; }
.acc-avatar { background: var(--raised, #1a1b1e); }
@media (max-width: 900px) { #tab-dashboard .dash-grid:first-of-type .dash-card { min-height: 0; } #dash-hourly { min-height: 180px; } }
.dash-kpis { min-height: 109px; } .dash-kpi-sub { min-height: 2.6em; }
#live-stamp { display: inline-block; min-height: 18px; } .dash-kpis { align-items: stretch; }
#tab-dashboard .dash-grid.dash-grid3:has(.rank-list:empty) .dash-card { min-height: 0; }

/* ===== Painel: estilos que estavam escritos no HTML (style=""), movidos para cá sem mudar o visual ===== */
.sx-0988515 { max-width: 420px !important; text-align: center !important; }
.sx-c44dcd7 { margin: 0 auto 16px !important; width: 52px !important; height: 52px !important; }
.sx-57fe2f6 { width: 26px !important; height: 26px !important; }
.sx-ae452c5 { font-size: 20px !important; font-weight: 800 !important; margin-bottom: 8px !important; }
.sx-ca73ad7 { font-size: 13px !important; line-height: 1.5 !important; margin-bottom: 22px !important; }
.sx-736cb48 { text-align: left !important; }
.sx-6f84d8a { width: 100% !important; padding: 12px !important; }
.sx-5750ff6 { font-size: 11px !important; color: var(--text-sub) !important; margin-top: 16px !important; }
.sx-03f5572 { align-items: center !important; gap: 6px !important; }
.sx-5085cda { font-size: 11px !important; }
.sx-2edd170 { color: var(--primary) !important; background: var(--accent-soft) !important; border-color: var(--accent-line) !important; }
.sx-3ca6c53 { background:var(--accent) !important; }
.sx-0748642 { background:var(--bad) !important; }
.sx-302ab1d { margin-bottom: 16px !important; }
.sx-5657a10 { gap:8px !important; }
.sx-2293cb1 { color:var(--accent) !important; }
.sx-8b49693 { padding:12px !important; }
.sx-14e03f2 { align-items: center !important; gap: 10px !important; }
.sx-db1d427 { font-size: 11px !important; padding: 0 10px !important; }
.sx-d563cf9 { padding: 12px 16px !important; margin-bottom: 16px !important; font-size: 13px !important; }
.sx-e393b3d { font-family: 'JetBrains Mono', monospace !important; font-size: 11px !important; }
.sx-433c876 { min-height: 150px !important; font-family: 'JetBrains Mono', monospace !important; font-size: 12px !important; }
.sx-2bdb017 { width: 100% !important; }
.sx-bcfc668 { min-height: 120px !important; }
.sx-9ca8476 { max-width: 620px !important; }
.sx-9713b41 { min-height: 220px !important; font-family: 'JetBrains Mono', monospace !important; font-size: 12px !important; }
.sx-e3dd267 { font-size: 11px !important; color: var(--text-sub) !important; margin-top: 6px !important; line-height: 1.5 !important; }
.sx-50c00e4 { justify-content: space-between !important; }
.sx-79509a3 { gap: 8px !important; }
.sx-ecb7547 { max-width: 580px !important; }
.sx-209420a { font-size: 13px !important; color: var(--text-muted) !important; line-height: 1.5 !important; margin-bottom: 18px !important; }
.sx-39910d1 { min-height: 90px !important; }
.sx-2bf1101 { gap: 6px !important; flex-wrap: wrap !important; margin-bottom: 12px !important; }
.sx-99e827c { min-height: 140px !important; }
.sx-73ee160 { margin:0 0 8px !important; }
.sx-12fb64d { gap:6px !important; flex-wrap:wrap !important; margin-bottom:10px !important; }
.sx-c3bdfae { margin-top:8px !important; }
.sx-4e779f4 { font-size: 12px !important; color: var(--text-muted) !important; justify-content: space-between !important; }
.sx-1b45b60 { font-family: 'JetBrains Mono', monospace !important; }
.sx-3266591 { max-width: 640px !important; }
.sx-90819a7 { margin:0 0 10px !important; }
.sx-9b98383 { max-width: 540px !important; }
.sx-9424ff0 { padding: 24px !important; text-align: center !important; margin-bottom: 18px !important; cursor: pointer !important; transition: var(--transition) !important; }
.sx-5307e86 { margin-bottom: 8px !important; }
.sx-c09ef02 { font-size: 14px !important; font-weight: 700 !important; color: #fff !important; }
.sx-caabe32 { font-size: 12px !important; color: var(--text-muted) !important; margin-top: 4px !important; }
.sx-6629d0f { margin-top: 14px !important; }
.sx-a92d140 { max-height: 120px !important; }
.sx-e878628 { align-items: center !important; gap: 12px !important; margin-bottom: 18px !important; }
.sx-aa3f4fd { flex: 1 !important; height: 1px !important; background: var(--border-subtle) !important; }
.sx-c068e78 { font-size: 11px !important; font-weight: 700 !important; color: var(--text-sub) !important; text-transform: uppercase !important; }
.sx-7c426e0 { max-width: 500px !important; text-align: center !important; border: 2px solid var(--danger) !important; box-shadow: 0 0 50px rgba(244, 63, 94, 0.4) !important; }
.sx-bc5a28c { width: 60px !important; height: 60px !important; border-radius: 50% !important; background: var(--danger-bg) !important; border: 2px solid var(--danger) !important; align-items: center !important; justify-content: center !important; margin: 0 auto 16px !important; }
.sx-2263463 { font-size: 20px !important; font-weight: 800 !important; color: #fff !important; margin-bottom: 8px !important; }
.sx-a9f8fdf { font-size: 13px !important; line-height: 1.6 !important; margin-bottom: 24px !important; }
.sx-545fca3 { gap: 10px !important; justify-content: center !important; }

/* perfis, por que não postou, prévia no X, arrastar .txt */
.prof-list { display: grid; gap: 6px; margin: 10px 0 14px; }
.prof-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.prof-new { border-top: 1px solid var(--line); padding-top: 12px; }
.why-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.why-top small { display: block; color: var(--muted); font-size: 12px; } .why-top b { font-size: 16px; }
.why-list { display: grid; gap: 8px; }
.why-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.why-row i { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; }
.why-row span { display: block; font-size: 12.5px; margin-top: 2px; }
.xp-card { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; background: var(--surface); }
.xp-av { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--surface-2, rgba(127,127,127,.2)); }
.xp-av img { width: 100%; height: 100%; object-fit: cover; }
.xp-body { min-width: 0; flex: 1; } .xp-head { font-size: 14px; }
.xp-text { font-size: 15px; line-height: 1.45; margin-top: 2px; word-wrap: break-word; }
.xp-link { color: #1d9bf0; }
.xp-media { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 14px; margin-top: 8px; border: 1px solid var(--line); }
.xp-bar { display: flex; justify-content: space-between; max-width: 320px; margin-top: 8px; color: var(--muted); font-size: 13px; }
#tab-texts.drop-on { outline: 2px dashed var(--accent); outline-offset: -6px; border-radius: 12px; }
/* compacto de verdade nas listas grandes */
:root[data-density="compact"] #latest-accounts-grid, :root[data-density="compact"] #trending-accounts-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
:root[data-density="compact"] .acc2-rate, :root[data-density="compact"] .acc2-note { display: none; }
:root[data-density="compact"] .acc2-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-density="compact"] .acc2-metric small { font-size: 10.5px; }
:root[data-density="compact"] .acc2-metric b { font-size: 14px; }
:root[data-density="compact"] .text-content-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:root[data-density="compact"] .text-card:hover .text-content-body { -webkit-line-clamp: unset; }
:root[data-density="compact"] .text-meta { display: none; }
.density-toggle.is-on { border-color: var(--accent); color: var(--accent); }
/* exemplos na lista vazia */
.ex-box { margin-top: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; }
.ex-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ex-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.ex-row:first-of-type { border-top: 0; }
.ex-row code { font-size: 12.5px; white-space: normal; background: none; color: var(--text); }
/* posts por hora no cartão da conta */
.acc-hours { display: flex; align-items: flex-end; gap: 2px; height: 26px; margin: 2px 0; }
.acc-hours i { flex: 1; background: var(--accent); opacity: .65; border-radius: 2px 2px 0 0; min-height: 1px; }
.acc-hours i:last-child { opacity: 1; }
.acc-hours.empty { height: 4px; background: var(--line); border-radius: 4px; }
:root[data-density="compact"] .acc-hours { height: 16px; }
/* "Salvo" no canto */
.saved-pill { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); font-size: 12.5px; font-weight: 500; padding: 6px 14px; border-radius: 999px; box-shadow: var(--pop-shadow); transition: opacity .18s ease, transform .18s ease; }
.saved-pill span { color: var(--ok); font-weight: 700; margin-right: 4px; }
.saved-pill.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .saved-pill { transition: none; } }
/* histórico de mudanças */
.chg-list { display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.chg-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.chg-diff { font-family: var(--mono, monospace); font-size: 12px; margin-top: 3px; word-break: break-word; }
.chg-old { color: var(--bad); text-decoration: line-through; opacity: .8; } .chg-new { color: var(--ok); }
/* V2: primeiros passos */
.first-steps { border: 1px solid var(--line-strong); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface)); }
.fs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fs-head b { display: block; font-size: 15.5px; } .fs-head span { font-size: 12.5px; color: var(--muted); }
.fs-x { border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.fs-bar { height: 5px; border-radius: 5px; background: var(--line); margin: 12px 0; overflow: hidden; } .fs-bar i { display: block; height: 100%; background: var(--accent); }
.fs-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fs-step { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fs-step b { display: block; font-size: 13.5px; } .fs-step span { font-size: 12.5px; color: var(--muted); }
.fs-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2, rgba(127,127,127,.15)); }
.fs-step.done { opacity: .65; } .fs-step.done .fs-n { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.fs-step .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 760px) { .fs-steps { grid-template-columns: 1fr; } }

/* Até a entrada valer (token, senha ou link), a moldura do painel fica escondida: só a tela de entrada aparece */
body.locked .app { visibility: hidden; }

/* ---------- extras do painel: saúde, tudo certo hoje, dica, ferramentas ---------- */
.plus-root { display: grid; gap: 8px; margin: 0 0 14px; }
.plus-root:empty { display: none; }
.plus-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--border, #2a2a30); border-radius: var(--radius-md, 10px); background: var(--card, #17171a); }
.plus-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.plus-msg { flex: 1 1 200px; font-weight: 600; }
.plus-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.plus-tip { padding: 8px 14px; border-radius: var(--radius-md, 10px); background: color-mix(in srgb, var(--primary, #4f8cff) 10%, transparent); font-size: 13px; }
.plus-health { border: 1px solid var(--border, #2a2a30); border-radius: var(--radius-md, 10px); background: var(--card, #17171a); }
.plus-health > summary, .plus-sec > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; }
.plus-rows { display: grid; gap: 1px; padding: 0 8px 8px; }
.plus-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; flex-wrap: wrap; }
.plus-score { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--c, var(--ok)); display: grid; place-items: center; flex: none; }
.plus-main { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.plus-main .subtle { font-size: 12.5px; }
.plus-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.plus-btns .btn { min-height: 36px; }
.plus-chip { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--border, #2a2a30); font-size: 11.5px; }
.plus-color { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.plus-colors { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.plus-swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.plus-swatch.on { border-color: var(--text, #fff); }
.plus-hours { display: grid; gap: 8px; margin: 10px 0; }
.plus-hours > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border, #2a2a30); border-radius: 8px; }
.plus-sec { border: 1px solid var(--border, #2a2a30); border-radius: 10px; margin-bottom: 8px; padding: 0 0 10px; }
.plus-sec > :not(summary) { margin-left: 14px; margin-right: 14px; }
.plus-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.plus-copy-to { display: grid; gap: 4px; margin: 8px 0; max-height: 160px; overflow: auto; }
.plus-answer { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--primary, #4f8cff) 10%, transparent); min-height: 1.4em; }
@media (max-width: 640px) { .plus-btns { width: 100%; } .plus-btns .btn { flex: 1 1 45%; } }

/* ---------- visual ---------- */
/* Escala única de tamanhos e espaços para o que é novo: use estas variáveis em vez de números soltos */
:root { --fs-xs: 11.5px; --fs-sm: 12.5px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; }
.skeleton-box { display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--border, #2a2a30) 25%, color-mix(in srgb, var(--border, #2a2a30) 55%, #fff 12%) 50%, var(--border, #2a2a30) 75%); background-size: 200% 100%; animation: skel 1.3s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }
.panel-footer { display: flex; gap: var(--sp-4); flex-wrap: wrap; justify-content: center; padding: var(--sp-3) var(--sp-4) var(--sp-5); font-size: var(--fs-xs); color: var(--muted, #9b9ba3); }
.panel-footer .ok::before, .panel-footer .bad::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--ok, #2ecc71); }
.panel-footer .bad { color: var(--bad, #e74c3c); }
.panel-footer .bad::before { background: var(--bad, #e74c3c); }
.log-rep { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--border, #2a2a30); font-size: var(--fs-xs); font-weight: 700; }
abbr.term { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.vis-hidden { display: none !important; }
.vis-line { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-1) 0; }
.vis-cards { display: grid; gap: var(--sp-1); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.vis-art { display: grid; place-items: center; padding: var(--sp-3) 0 var(--sp-1); opacity: .85; }
.plus-empty { text-align: center; padding: var(--sp-3); color: var(--muted, #9b9ba3); }
.plus-viewbar { padding: 0 var(--sp-3) var(--sp-2); }
.plus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp-2); padding: 0 var(--sp-3) var(--sp-3); }
.plus-tile { display: grid; gap: 2px; text-align: left; padding: var(--sp-2) var(--sp-3); border-radius: 10px; border: 1px solid var(--border, #2a2a30); border-left-width: 5px; background: var(--card, #17171a); color: inherit; cursor: pointer; min-height: 44px; }
.plus-tile.plus-ok { border-left-color: var(--ok, #2ecc71); } .plus-tile.plus-warn { border-left-color: var(--warn, #f1c40f); } .plus-tile.plus-bad { border-left-color: var(--bad, #e74c3c); }
.plus-spark { flex: none; }
/* Foco: tira o que é secundário */
body.focus-mode .plus-tip, body.focus-mode #first-steps, body.focus-mode #dash-since, body.focus-mode #onboard, body.focus-mode .panel-footer { display: none; }
/* Pulso opcional num erro */
body.vis-pulse::after { content: ''; position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 4px var(--bad, #e74c3c); animation: vispulse 1.2s ease-out forwards; z-index: 9999; }
@keyframes vispulse { from { opacity: 1; } to { opacity: 0; } }
/* Troca de aba suave */
.tab-content.active { animation: tabin .18s ease-out; }
@keyframes tabin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* Modo TV: rodízio e alerta piscando */
.tv-mode.tv-view-events .tv-grid { display: none; }
.tv-mode.tv-view-events .tv-events { font-size: 1.6em; }
.tv-blink { animation: tvblink 1s steps(2, start) infinite; }
@keyframes tvblink { to { visibility: hidden; } }
/* Alvos de toque e foco visível */
@media (pointer: coarse) { .btn, select.form-input, input.form-input, .plus-swatch { min-height: 44px; } .btn-sm { min-height: 40px; padding-left: 12px; padding-right: 12px; } }
:focus-visible { outline: 2px solid var(--primary, #4f8cff); outline-offset: 2px; }
/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) { .plus-btns { flex: 1 1 100%; } .dash-grid, .dash-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .plus-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
/* Celular: tabelas viram cartões */
@media (max-width: 640px) {
    table.cardify, table.cardify tbody, table.cardify tr, table.cardify td { display: block; width: 100%; }
    table.cardify thead { position: absolute; left: -9999px; }
    table.cardify tr { margin-bottom: var(--sp-3); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border, #2a2a30); border-radius: 10px; }
    table.cardify td { display: flex; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-1) 0; border: 0; text-align: right; }
    table.cardify td::before { content: attr(data-label); font-weight: 600; color: var(--muted, #9b9ba3); text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .tab-content.active, .skeleton, .tv-blink, body.vis-pulse::after { animation: none; } }

/* Dashboard mais limpo: uma linha de status/dica/atalhos, aviso de contagem discreto, sem blocos repetidos */
.plus-bar { padding: 8px 12px; gap: 10px; }
.plus-bar.plus-slim { background: transparent; border-color: transparent; padding-left: 2px; padding-right: 2px; }
.plus-tipline { flex: 1 1 220px; min-width: 0; font-size: var(--fs-sm, 12.5px); color: var(--muted, #9b9ba3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plus-tipline b { color: var(--text, #fff); font-weight: 600; }
.plus-msg { flex: 0 1 auto; font-weight: 600; font-size: var(--fs-md, 14px); }
.since-bar { padding: 6px 12px !important; font-size: var(--fs-sm, 12.5px) !important; border-radius: 8px !important; opacity: .85; }
#first-steps.vis-hidden, #onboard:empty { display: none !important; }

/* Intervalos: cabeçalho limpo (estado de salvo, um Desfazer e um menu) */
.dl-head { align-items: center; }
.dl-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.dl-tools .autosave-status { align-self: center; }
.dl-tools .btn[disabled] { opacity: .45; cursor: not-allowed; }
.dl-menu { position: relative; }
.dl-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 260px; display: grid; padding: 6px; border: 1px solid var(--border, #2a2a30); border-radius: 10px; background: var(--card, #17171a); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.dl-menu-list[hidden] { display: none; }
.dl-menu-list button { text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.dl-menu-list button:hover, .dl-menu-list button:focus-visible { background: color-mix(in srgb, var(--primary, #4f8cff) 14%, transparent); }
.chg-tag { display: inline-block; padding: 0 8px; border-radius: 999px; background: color-mix(in srgb, var(--primary, #4f8cff) 18%, transparent); font-size: 11px; font-weight: 600; }
@media (max-width: 640px) { .dl-tools { width: 100%; justify-content: flex-start; margin-left: 0; } }

/* Ferramentas: grade de atalhos (cada um abre a sua tela) e modo foco com saída visível */
.plus-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.plus-tool { position: relative; display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 14px; border: 1px solid var(--border, #2a2a30); border-radius: 14px; background: color-mix(in srgb, var(--card, #17171a) 88%, var(--primary, #4f8cff) 4%); color: inherit; cursor: pointer; font: inherit; transition: border-color .15s, transform .15s, background .15s; }
.plus-tool:hover, .plus-tool:focus-visible { border-color: var(--primary, #4f8cff); transform: translateY(-1px); }
.plus-tool-ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary, #4f8cff) 16%, transparent); color: var(--primary, #4f8cff); }
.plus-tool-main { display: grid; gap: 3px; min-width: 0; }
.plus-tool-main b { font-size: 14px; }
.plus-tool-main span { font-size: 12.5px; color: var(--muted, #9b9ba3); line-height: 1.4; }
.plus-tool-badge { position: absolute; top: 10px; right: 10px; min-width: 20px; padding: 0 7px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: var(--primary, #4f8cff); color: #111; font-size: 11.5px; font-weight: 700; }
.plus-back { border: 0; background: transparent; color: var(--primary, #4f8cff); cursor: pointer; font: inherit; font-size: 13px; padding: 0 0 8px; }
.plus-view-desc { margin: 0 0 14px; color: var(--muted, #9b9ba3); font-size: 13px; line-height: 1.5; }
.plus-actions .btn.on { background: color-mix(in srgb, var(--primary, #4f8cff) 22%, transparent); border-color: var(--primary, #4f8cff); }
/* Linha de cima do Dashboard: relógio "ao vivo" à esquerda, atalhos (Vídeo, Foco, Ferramentas) à direita como pílulas com ícone */
.dash-top { justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.dash-actions { gap: var(--sp-1); margin-left: auto; }
.dash-actions:empty { display: none; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; border-radius: 999px; border: 1px solid var(--line-strong, #2a2a30); background: transparent; color: var(--muted, #9b9ba3); font: inherit; font-size: var(--fs-sm, 12.5px); font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s, color .12s; }
.pill-btn svg { width: 15px; height: 15px; }
.pill-btn:hover, .pill-btn:focus-visible { color: var(--text, #fff); background: var(--raised, #202026); border-color: var(--line-strong, #2a2a30); }
.pill-btn.on { color: var(--primary, #4f8cff); border-color: color-mix(in srgb, var(--primary, #4f8cff) 60%, transparent); background: color-mix(in srgb, var(--primary, #4f8cff) 14%, transparent); }
@media (max-width: 640px) { .pill-btn span { display: none; } .pill-btn { padding: 0 9px; } }
/* Telas das ferramentas: campo e botão na mesma linha, resposta só quando existe */
.plus-form { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.plus-form .form-input { flex: 1 1 200px; min-width: 0; }
.plus-form .btn-sm { height: 36px; }
.plus-answer:empty { display: none; }
.plus-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px; padding: 0; }
.plus-back:hover { text-decoration: underline; }
.focus-exit { position: fixed; top: 12px; right: 12px; z-index: 8000; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--primary, #4f8cff); background: color-mix(in srgb, var(--card, #17171a) 90%, transparent); color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.focus-exit:hover { background: var(--primary, #4f8cff); color: #111; }
body.focus-mode .dash-grid, body.focus-mode .dash-grid3, body.focus-mode .dash-grid-even, body.focus-mode .plus-health, body.focus-mode .plus-tipline, body.focus-mode #announce-banner { display: none; }

/* Contas vinculadas (Configurações): uma linha por plataforma, estado à vista e um botão só */
.link-card { display: grid; border: 1px solid var(--line-strong, #2a2a30); border-radius: var(--radius-lg, 14px); background: var(--surface, #17171a); overflow: hidden; }
.link-row { display: flex; align-items: center; gap: var(--sp-3); padding: 14px 16px; }
.link-row + .link-row { border-top: 1px solid var(--line, #26262c); }
.link-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--muted, #6b6b75); }
.link-telegram .link-ico { background: #2aabee; }
.link-discord .link-ico { background: #5865f2; }
.link-row:not(.is-on) .link-ico { opacity: .55; }
.link-main { flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; }
.link-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-title b { font-size: var(--fs-lg, 15px); }
.link-detail { font-size: var(--fs-sm, 12.5px); color: var(--muted, #9b9ba3); overflow: hidden; text-overflow: ellipsis; }
.link-act { flex: none; }
.link-flow { margin-top: 12px; padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--accent, #4f8cff) 60%, transparent); border-radius: var(--radius-lg, 14px); background: color-mix(in srgb, var(--accent, #4f8cff) 7%, transparent); }
.link-flow[hidden] { display: none; }
.link-flow-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.link-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--fs-md, 14px); }
.link-steps li { line-height: 1.6; }
.link-code { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; padding: 2px 8px; border-radius: 6px; background: var(--raised, #202026); }
.link-wait { display: inline-flex; align-items: center; gap: 6px; color: var(--muted, #9b9ba3); font-size: var(--fs-sm, 12.5px); }
.link-wait i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #4f8cff); animation: blink 1.4s ease-in-out infinite; }
.link-more { margin-top: 12px; }
.link-more > summary { cursor: pointer; color: var(--muted, #9b9ba3); font-size: var(--fs-sm, 12.5px); }
@media (max-width: 640px) { .link-row { flex-wrap: wrap; } .link-act { width: 100%; } .link-act .btn { width: 100%; } }


/* erro do cabeçalho do console com botão; cartão como no X; nota por post */
.console-err { color: var(--bad, #e74c3c); }
.link-btn { border: 0; background: none; color: var(--accent, #4f8cff); font: inherit; font-size: inherit; cursor: pointer; padding: 0 2px; text-decoration: underline; text-underline-offset: 2px; }
.x-card { border: 1px solid var(--line-strong, #2a2a30); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; background: var(--surface, #17171a); font-size: 14px; }
.x-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.x-head > div { display: grid; line-height: 1.25; }
.x-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--raised, #202026); flex: none; }
.x-text { white-space: pre-wrap; line-height: 1.45; }
.x-link { color: #1d9bf0; }
.x-foot { margin-top: 8px; font-size: 12px; letter-spacing: 2px; }
.hist-note { font-size: 12px; margin-right: 4px; }
.hist-note-box .pill-btn.on { color: var(--accent, #4f8cff); border-color: color-mix(in srgb, var(--accent, #4f8cff) 60%, transparent); background: color-mix(in srgb, var(--accent, #4f8cff) 14%, transparent); }


/* indicador único de salvamento e esqueleto do primeiro carregamento */
.save-chip { position: fixed; top: 10px; right: 12px; z-index: 7000; padding: 5px 10px; border-radius: 999px; font-size: var(--fs-xs, 11.5px); background: var(--surface, #17171a); border: 1px solid var(--line-strong, #2a2a30); color: var(--muted, #9b9ba3); opacity: 0; transform: translateY(-6px); transition: opacity .15s, transform .15s; pointer-events: none; }
.save-chip.show { opacity: 1; transform: none; pointer-events: auto; }
.save-chip.saving { color: var(--text, #fff); }
.save-chip.saved { color: var(--ok, #2ecc71); border-color: color-mix(in srgb, var(--ok, #2ecc71) 40%, transparent); }
.save-chip.failed { color: var(--bad, #e74c3c); border-color: color-mix(in srgb, var(--bad, #e74c3c) 50%, transparent); }
@media (min-width: 900px) { .save-chip { display: none; } }   /* no computador o rodapé já mostra; o selo é para o celular */
body.first-load .stat-value, body.first-load .stat-subtext { color: transparent !important; border-radius: 6px; background: linear-gradient(90deg, var(--border, #2a2a30) 25%, color-mix(in srgb, var(--border, #2a2a30) 55%, #fff 12%) 50%, var(--border, #2a2a30) 75%); background-size: 200% 100%; animation: skel 1.3s linear infinite; }
body.first-load .stat-value { min-width: 60px; }


/* exemplos do webhook */
.uh-sample { margin: 4px 0; padding: 8px 10px; border-radius: 8px; background: var(--raised, #202026); font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; word-break: break-word; }
