/* ==========================================================================
   STEAM SHELF — SteamDevHQ design system
   A dark, dense SteamOS-derived operations console.
   Tokens derive from the Steam client's own dark palette: deep #171a21 ground,
   navy panels, low-saturation text, and a high-lumen accent blue reserved for
   the active path.
   ========================================================================== */

:root {
    /* Deixa os widgets nativos (popup de <select>, scrollbar, date picker) no tema escuro */
    color-scheme: dark;

    /* ==== Color tokens: ground + panels ==== */
    --bg: #0b0d10;
    --bg-panel: #14181c;
    --bg-raised: #1b2027;
    --bg-hover: #222933;
    --bg-inset: #0e1115;
    --bg-accent-soft: #1f3340;

    /* ==== Chrome: borders + shadows ==== */
    --border: #232a34;
    --border-strong: #32404f;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
    --shadow-md: 0 6px 20px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.4);

    /* ==== Text: steam low-lumen ==== */
    --text: #c7d5e0;
    --text-dim: #8ea2b8;
    --text-faint: #7b8fa5;
    --text-invert: #0b0d10;

    /* ==== Brand accent (Steam high-lumen blue) ==== */
    --accent: #5ba9cf;
    --accent-bright: #7bc3eb;
    --accent-ink: #06121a;

    /* ==== Platform accents — one per storefront integration ==== */
    --platform-apple: #0071e3;
    --platform-steam: #10b981;
    --platform-switch: #e60012;
    --platform-googleplay: #01875f;

    /* ==== Signal colors — each tracks one of the four signals ==== */
    --signal-review: #7fc76b;   /* positive sentiment green  */
    --signal-review-alt: #d3ff8f;
    --signal-forum: #5eb9e0;    /* community blue            */
    --signal-wishlist: #e8c255;   /* wishlist amber (alias)      */
    --signal-sales: #4fd1c5;    /* revenue teal               */

    /* ==== Semantic state ==== */
    --good: #6fdc74;
    --warn: #f0b232;
    --bad: #f26d6d;
    --info: #5eb9e0;

    /* ==== Type ==== */
    --font-ui: "Inter", "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: var(--font-ui);
    --font-mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Roboto Mono", monospace;
    --font-data: var(--font-mono);

    /* ==== Radius & rhythm ==== */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;

    /* Layout metrics */
    --sidebar-w: 248px;
    --sidebar-w-collapsed: 64px;
    --topbar-h: 60px;

    /* ==== Icones (regime de opacidade unificado) ==== */
    --ico-op: .92;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(94,182,207,.06), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 14.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: #a5d8f2; text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 650;
    letter-spacing: -0.015em;
    color: #eef3f7;
    margin: 0 0 var(--sp-3);
    line-height: 1.2;
}
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); font-weight: 600; }
h5 { font-size: 14px; }

code {
    font-family: var(--font-data);
    font-size: .86em;
    background: var(--bg-inset);
    color: var(--accent-bright);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: var(--sp-4) 0;
}

.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: var(--text-dim) !important; }
.text-success { color: var(--good) !important; }
.text-danger { color: var(--bad) !important; }
.text-warning { color: var(--warn) !important; }
.text-primary, .text-info { color: var(--accent-bright) !important; }
.small { font-size: .83em; }
.fw-bold, .fw-semibold { font-weight: 650; }

/* ==========================================================================
   Shell — sidebar + topbar + content
   ========================================================================== */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    grid-template-areas: "sidebar topbar" "sidebar content";
    height: 100vh;
    overflow: hidden;
}

.app-sidebar {
    grid-area: sidebar;
    background: linear-gradient(180deg, #12161c 0%, #0f1318 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 var(--sp-4);
    height: var(--topbar-h);
    border-bottom: 1px solid var(--border);
    flex: 0 0 auto;
}

.brand-mark {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: grid; place-items: center;
    background: radial-gradient(circle at 35% 30%, #2c4a5a, #16232e 70%);
    border: 1px solid var(--border-strong);
    box-shadow: inset 0 0 8px rgba(94,182,207,.25);
    font-size: 15px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.brand-word {
    font-weight: 700;
    letter-spacing: .01em;
    color: #e8f1f7;
    font-size: 15px;
    line-height: 1.1;
}
.brand-sub {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--sp-3) var(--sp-2);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
    padding: var(--sp-3) var(--sp-2) var(--sp-1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    color: var(--text);
    font-weight: 500;
    font-size: 13.5px;
    transition: background .12s ease, color .12s ease;
    position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: #fff; text-decoration: none; }
.nav-item.active {
    background: var(--bg-accent-soft);
    color: var(--accent-bright);
}
.nav-item.active::before {
    content: "";
    position: absolute; left: calc(-1 * var(--sp-2)); top: 8px; bottom: 8px;
    width: 3px; border-radius: 2px;
    background: var(--accent-bright);
    box-shadow: 0 0 8px rgba(123,195,235,.6);
}
.nav-item .nav-ico {
    width: 18px; height: 18px;
    flex: 0 0 18px;
    opacity: var(--ico-op, .92);
}
.nav-count {
    margin-left: auto;
    font-size: 11px;
    font-family: var(--font-data);
    color: var(--text-dim);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 7px;
}

.sidebar-footer {
    flex: 0 0 auto;
    border-top: 1px solid var(--border);
    padding: var(--sp-3) var(--sp-4);
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;
}
.footer-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    color: var(--accent-bright);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
}
.footer-id {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}
.footer-user {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.footer-sub {
    font-size: 11px;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.footer-signout {
    width: 32px; height: 32px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    color: var(--text-dim);
    cursor: pointer;
    transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.footer-signout:hover {
    color: var(--bad);
    border-color: rgba(242,109,109,.6);
    background: rgba(242,109,109,.08);
}

/* Rail colapsavel no desktop (alternancia via .app-shell.sidebar-collapsed) */
.app-shell.sidebar-collapsed {
    grid-template-columns: var(--sidebar-w-collapsed) 1fr;
}
.app-shell.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }
.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .nav-section-label,
.app-shell.sidebar-collapsed .footer-id { display: none; }
.app-shell.sidebar-collapsed .sidebar-nav { padding: var(--sp-3) var(--sp-1); align-items: center; }
.app-shell.sidebar-collapsed .nav-item { justify-content: center; padding: 10px; font-size: 0; }
.app-shell.sidebar-collapsed .nav-item.active::before { display: none; }
.app-shell.sidebar-collapsed .nav-item.active {
    background: var(--bg-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(94,182,207,.35);
}
.app-shell.sidebar-collapsed .sidebar-footer { grid-template-columns: 1fr; justify-items: center; padding: var(--sp-3) var(--sp-1); }
.app-shell.sidebar-collapsed .footer-avatar { display: none; }

.app-topbar {
    grid-area: topbar;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: 0 var(--sp-5);
    position: relative;
    z-index: 5;
}
.topbar-toggle {
    flex: 0 0 auto;
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: transparent;
}
.topbar-toggle:hover { color: var(--accent-bright); background: var(--bg-raised); border-color: var(--border-strong); }
.topbar-title { font-size: 15px; font-weight: 650; color: var(--text); }
.topbar-breadcrumb { font-size: 12.5px; color: var(--text-faint); }
.topbar-spacer { flex: 1 1 auto; }

.app-content {
    grid-area: content;
    overflow-y: auto;
    padding: var(--sp-5) var(--sp-6) var(--sp-6);
}

/* Bare surface (Login / Home) — no sidebar chrome */
.app-bare {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--sp-5);
}

/* ==========================================================================
   Studio sub-navigation (persistent across all studio pages)
   ========================================================================== */
.studio-nav {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-6);
    margin: calc(-1 * var(--sp-5)) calc(-1 * var(--sp-6)) var(--sp-5);
    background: var(--bg-panel);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.02), 0 4px 12px rgba(0,0,0,.18);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: calc(-1 * var(--sp-5));
    z-index: 15;
}
.studio-nav-top {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.studio-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--text-dim);
    padding: 5px 10px 5px 6px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
}
.studio-nav-back:hover { color: var(--accent-bright); background: var(--bg-raised); text-decoration: none; border-color: var(--border); }
.studio-nav-id {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex: 1 1 auto;
    min-width: 0;
}
.studio-id {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.studio-nav-name {
    font-size: 14px;
    font-weight: 650;
    color: var(--text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.studio-nav-slug {
    font-size: 11.5px;
    color: var(--text-faint);
    font-weight: 500;
    letter-spacing: .02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.studio-nav-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-left: auto;
    min-width: 0;
}
.studio-signals {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: var(--sp-1);
}
.signal-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    box-shadow: inset 0 0 2px rgba(0,0,0,.45);
}
.signal-review { background: var(--signal-review); }
.signal-forum { background: var(--signal-forum); }
.signal-wishlist { background: var(--signal-wishlist); }
.signal-sales { background: var(--signal-sales); }
.signal-sales.signal-off { background: var(--bg-inset); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tenant-switch-wrap { display: inline-flex; flex: 0 0 auto; }
.tenant-switch {
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-dim);
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    padding: 5px 8px;
    max-width: 180px;
    cursor: pointer;
}
.tenant-switch:hover { color: var(--text); border-color: #3d4d5f; }
.tenant-switch option { color: var(--text); background: var(--bg-raised); }

.topbar-lang-wrap { display: inline-flex; flex: 0 0 auto; }
.topbar-lang {
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-dim);
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    padding: 5px 8px;
    cursor: pointer;
}
.topbar-lang:hover { color: var(--text); border-color: #3d4d5f; }
.topbar-lang option { color: var(--text); background: var(--bg-raised); }
.studio-nav-id .badge-sync {
    align-self: center;
    flex: 0 0 auto;
    min-width: 0;
}
.studio-nav-groups {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.studio-group {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}
.studio-group + .studio-group {
    padding-left: var(--sp-5);
    border-left: 1px solid var(--border);
}
.studio-group-label {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
}
.studio-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}
.studio-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dim);
    white-space: nowrap;
}
.studio-tab svg { opacity: var(--ico-op, .92); }
.studio-menu { position: relative; }
.studio-menu > summary { cursor: pointer; list-style: none; }
.studio-menu > summary::-webkit-details-marker { display: none; }
.studio-menu[open] > summary,
.studio-menu:has(.studio-tab.active) > summary {
    color: var(--accent-bright);
    background: var(--bg-accent-soft);
}
.studio-menu-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 20;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    background: var(--bg-panel);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.studio-menu-list .studio-tab { width: 100%; }
.studio-menu-end .studio-menu-list { right: 0; left: auto; }
.studio-menu summary:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.studio-tab-badge {
    margin-left: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(242, 109, 109, .16);
    border: 1px solid rgba(242, 109, 109, .45);
    color: var(--bad);
    font-family: var(--font-data);
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.studio-tab-count {
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-faint);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 5px;
    line-height: 1.6;
}
.studio-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding-top: var(--sp-2);
    border-top: 1px dashed var(--border);
    min-width: 0;
}
.studio-strip-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11.5px;
    color: var(--text-dim);
    white-space: nowrap;
}
a.studio-strip-item:hover { color: var(--text); background: var(--bg-raised); border-color: var(--border); text-decoration: none; }
.studio-strip-item strong { font-family: var(--font-data); font-weight: 700; }
.studio-strip-item.is-bad { color: var(--bad); background: rgba(242, 109, 109, .07); border-color: rgba(242, 109, 109, .28); }
.studio-strip-item.is-warn { color: var(--warn); background: rgba(210, 178, 50, .06); border-color: rgba(210, 178, 50, .26); }
.studio-strip-item.is-ok { color: var(--text-dim); }
.studio-strip-item.is-ok .status-dot.ok { background: var(--good); }
.studio-strip-item.is-muted { color: var(--text-faint); }
.studio-strip-item.is-info { color: var(--accent-bright); }
.studio-strip-item .strip-detail { color: var(--text-faint); font-size: .92em; }
.studio-tab:hover { color: var(--text); background: var(--bg-raised); text-decoration: none; }
.studio-tab.active {
    color: var(--accent-bright);
    background: var(--bg-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(94,182,207,.35);
}
.studio-body { min-width: 0; }

/* Sub-navegacao segmentada (ex.: views Financeiras/Mensal/Promocoes) */
.subnav {
    display: flex;
    gap: 2px;
    padding: 3px;
    margin-bottom: var(--sp-4);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}
.subnav-link {
    padding: 6px 14px;
    border-radius: calc(var(--r-md) - 2px);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dim);
    white-space: nowrap;
}
.subnav-link:hover { color: var(--text); background: var(--bg-raised); text-decoration: none; }
.subnav-link.active { color: var(--accent-bright); background: var(--bg-raised); box-shadow: inset 0 0 0 1px rgba(94,182,207,.4); }

@media (max-width: 900px) {
    .studio-nav { padding: var(--sp-3) var(--sp-4); margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) var(--sp-4); top: calc(-1 * var(--sp-4)); }
    .studio-nav-top { flex-wrap: wrap; row-gap: var(--sp-2); }
    .studio-nav-meta { margin-left: 0; width: 100%; justify-content: space-between; }
    .studio-nav-groups { gap: var(--sp-2) var(--sp-3); }
    .studio-group { flex: 1 1 auto; flex-wrap: wrap; }
    .studio-group + .studio-group { padding-left: var(--sp-2); border-left: 0; }
    .studio-group:not(:first-child)::before { content: ""; width: 1px; align-self: stretch; background: var(--border); margin-right: var(--sp-2); }
    .studio-tab { padding: 6px 9px; }
}

/* ==========================================================================
   Page header with actions
   ========================================================================== */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
    flex-wrap: wrap;
}
.page-head h1 { margin-bottom: 4px; }
/* O h1 recebe foco programatico (FocusOnNavigate) apos cada navegacao: sem o anel cinza do browser. */
h1:focus { outline: none; }
.page-head .page-sub { color: var(--text-dim); font-size: 13.5px; margin: 0; }
.page-head-actions { display: flex; gap: var(--sp-2); flex: 0 0 auto; flex-wrap: wrap; align-items: center; }
.updated-badge { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--font-ui);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    padding: 9px 15px;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-strong);
    background: var(--bg-raised);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s ease, border-color .12s ease, color .12s ease, transform .05s ease;
    user-select: none;
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-strong); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(180deg, #6fb9dd, #3e8ab3);
    border-color: #4d9cc4;
    color: var(--accent-ink);
    text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { background: linear-gradient(180deg, #84c3e2, #4b9cc6); color: var(--accent-ink); }

.btn-success {
    background: linear-gradient(180deg, #4f9e57, #2e7d3a);
    border-color: #3c8a47;
    color: #eaffef;
}
.btn-success:hover { background: linear-gradient(180deg, #5cb264, #3a9450); color: #fff; }

.btn-danger {
    background: linear-gradient(180deg, #b84b4b, #933434);
    border-color: #b04d4d;
    color: #ffecec;
}
.btn-danger:hover { background: linear-gradient(180deg, #cf5a5a, #a83a3a); color: #fff; }

.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text-dim); }
.btn-outline:hover { background: var(--bg-raised); color: #fff; }

.btn-secondary { background: var(--bg-raised); border-color: var(--border-strong); color: #fff; }
.btn-secondary:hover { background: var(--bg-hover); }

.btn-sm { font-size: 12px; padding: 6px 10px; border-radius: 5px; }
.btn-xs { font-size: 12px; padding: 3px 7px; border-radius: 4px; line-height: 1; }
.btn-lg { font-size: 15px; padding: 12px 20px; }

.icon-btn {
    width: 32px; height: 32px; padding: 0;
    display: inline-grid; place-items: center;
}

/* ==========================================================================
   Period selector (shared) + console bands
   ========================================================================== */
.period-seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 9px;
}
.period-seg-item {
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-dim);
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.period-seg-item:hover { color: var(--text); background: var(--bg-raised); }
.period-seg-item.is-active {
    color: #fff;
    background: var(--bg-raised);
    box-shadow: inset 0 0 0 1px var(--border-strong), 0 1px 2px rgba(0, 0, 0, .35);
}
.period-seg-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.period-seg-scroll::-webkit-scrollbar { display: none; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.status-dot.ok { background: var(--good); }
.status-dot.bad { background: var(--bad); }

/* Campos rotulados da barra de filtros dos resumos */
.filter-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.filter-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-faint);
    white-space: nowrap;
}
.filter-field select {
    height: 32px;
    padding: 4px 28px 4px 9px;
    font-size: 12.5px;
    max-width: 220px;
}
/* Dentro de um campo rotulado o deck-search nao deve usar flex-basis (viraria altura). */
.filter-field .deck-search {
    flex: 0 0 auto;
    width: 100%;
    max-width: 260px;
    height: 32px;
}
.filter-range {
    font-family: var(--font-data);
    font-size: 11.5px;
    color: var(--text-dim);
    white-space: nowrap;
}

.console-band { margin-bottom: var(--sp-4); }
.console-band-head { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: 8px; padding-left: 2px; }
.console-band-head .band-note { font-size: 10.5px; color: var(--text-faint); font-family: var(--font-data); }
.console-band .stat-row { margin-bottom: 0; }
.stat.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .12s ease; }
.stat.stat-link:hover { border-color: var(--border-strong); text-decoration: none; color: inherit; }

.sync-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-panel);
    color: var(--text-dim);
    font-family: var(--font-data);
    font-size: 11.5px;
    white-space: nowrap;
}
.sync-chip:hover { color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.sync-chip .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.sync-chip.is-ok .dot { background: var(--good); box-shadow: 0 0 6px rgba(111, 220, 116, .55); }
.sync-chip.is-stale { color: var(--warn); border-color: rgba(210, 178, 50, .35); background: rgba(210, 178, 50, .06); }
.sync-chip.is-stale .dot { background: var(--warn); box-shadow: 0 0 6px rgba(240, 178, 50, .55); }

/* Dashboard skeleton */
.dash-skeleton { display: flex; flex-direction: column; gap: var(--sp-3); }
.sk-head { height: 46px; width: 320px; max-width: 100%; }
.dash-skeleton-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--sp-3); }
.sk-stat { height: 108px; }
.sk-chart { height: 260px; }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card + .card, .row > .card { }

.card-header {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.card-header h5 { margin: 0; font-size: 13.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.card-body { padding: var(--sp-4); }
.card-footer { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); }

.row { display: flex; flex-wrap: wrap; margin: 0 calc(var(--sp-3) * -1); }
.row > .col, .row > [class*="col-"] { padding: 0 var(--sp-3); margin-bottom: var(--sp-4); flex: 1 1 auto; width: 100%; }
.row.g-0 > .col, .row.g-0 > [class*="col-"] { padding: 0; margin-bottom: 0; }

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }

@media (min-width: 576px) {
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
    .col-sm-6  { flex: 0 0 50%; max-width: 50%; }
    .col-sm-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-sm-3  { flex: 0 0 25%; max-width: 25%; }
}

@media (min-width: 768px) {
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    .col-md-11 { flex: 0 0 91.6666%; max-width: 91.6666%; }
    .col-md-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
    .col-md-9  { flex: 0 0 75%; max-width: 75%; }
    .col-md-8  { flex: 0 0 66.6666%; max-width: 66.6666%; }
    .col-md-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
    .col-md-6  { flex: 0 0 50%; max-width: 50%; }
    .col-md-5  { flex: 0 0 41.6666%; max-width: 41.6666%; }
    .col-md-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-md-3  { flex: 0 0 25%; max-width: 25%; }
    .col-md-2  { flex: 0 0 16.6666%; max-width: 16.6666%; }
}

@media (min-width: 992px) {
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
    .col-lg-6  { flex: 0 0 50%; max-width: 50%; }
    .col-lg-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .col-lg-3  { flex: 0 0 25%; max-width: 25%; }
}

.row.g-0 { margin: 0; }
.row.g-0 > .col, .row.g-0 > [class*="col-"] { padding: 0; margin-bottom: 0; }

.row.g-1 { margin: 0 calc(var(--sp-1) * -0.5); }
.row.g-1 > .col, .row.g-1 > [class*="col-"] { padding: 0 calc(var(--sp-1) * 0.5); margin-bottom: var(--sp-1); }

.row.g-2 { margin: 0 calc(var(--sp-2) * -0.5); }
.row.g-2 > .col, .row.g-2 > [class*="col-"] { padding: 0 calc(var(--sp-2) * 0.5); margin-bottom: var(--sp-2); }

.row.g-3 { margin: 0 calc(var(--sp-3) * -0.5); }
.row.g-3 > .col, .row.g-3 > [class*="col-"] { padding: 0 calc(var(--sp-3) * 0.5); margin-bottom: var(--sp-3); }

.row.g-4 { margin: 0 calc(var(--sp-4) * -0.5); }
.row.g-4 > .col, .row.g-4 > [class*="col-"] { padding: 0 calc(var(--sp-4) * 0.5); margin-bottom: var(--sp-4); }

.row.g-5 { margin: 0 calc(var(--sp-5) * -0.5); }
.row.g-5 > .col, .row.g-5 > [class*="col-"] { padding: 0 calc(var(--sp-5) * 0.5); margin-bottom: var(--sp-5); }

.form-control, input, select, textarea {
    background: var(--bg-base);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--r-sm);
    padding: 8px 11px;
    transition: border-color .12s ease, box-shadow .12s ease;
    outline: none;
    font-family: inherit;
    font-size: 13.5px;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(94,182,207,.18);
}
.form-control::placeholder, input::placeholder { color: var(--text-faint); }
.form-control:disabled { opacity: .55; cursor: not-allowed; }

/* Popup dos <select> no tema escuro: color-scheme so resolve no Chromium com pages
   "dark-aware"; pintar option/optgroup explicitamente garante o popup escuro em
   todos os browsers (senao o dropdown abre com fundo branco e letra clara). */
select, select:hover, select:focus {
    background-color: var(--bg-panel);
    color: var(--text);
}
select option, select optgroup {
    background-color: var(--bg-panel);
    color: var(--text);
}
select option:checked, select option:hover {
    background-color: var(--bg-hover);
    color: var(--text);
}

.form-switch { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.form-switch input[type=checkbox] {
    appearance: none;
    width: 36px; height: 20px;
    border-radius: 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border-strong);
    position: relative;
    cursor: pointer;
    transition: background .15s ease;
    margin: 0; flex: 0 0 auto;
}
.form-switch input[type=checkbox]::after {
    content: "";
    position: absolute; top: 2px; left: 2px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: transform .15s ease, background .15s ease;
}
.form-switch input[type=checkbox]:checked { background: var(--accent); }
.form-switch input[type=checkbox]:checked::after { transform: translateX(16px); background: #fff; }
.form-switch input[type=checkbox]:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.form-check-label { font-size: 13.5px; color: var(--text); }

.form-text { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
.form-group { margin-bottom: var(--sp-4); }

.input-group { display: flex; align-items: stretch; }
.input-group .form-control { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-group-text {
    display: flex; align-items: center;
    padding: 0 11px;
    font-size: 13.5px;
    background: var(--bg-hover);
    border: 1px solid var(--border-strong);
    border-right: 0;
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    white-space: nowrap;
}

.validation-message { color: var(--bad); font-size: 12px; margin-top: 4px; display: block; }
.input-validation-error, .invalid { border-color: var(--bad) !important; }
.valid.modified { border-color: var(--good) !important; }

.form-floating { position: relative; }
.form-floating > .form-control { }

/* ==========================================================================
   Alerts / callouts
   ========================================================================== */
.alert {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    font-size: 13.5px;
    margin-bottom: var(--sp-4);
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
}
.alert-success { background: rgba(111,220,116,.08); border-color: rgba(111,220,116,.35); color: var(--good); }
.alert-danger  { background: rgba(242,109,109,.08); border-color: rgba(242,109,109,.35); color: var(--bad); }
.alert-warning { background: rgba(210,178,50,.08);  border-color: rgba(210,178,50,.35);  color: var(--warn); }
.alert-info    { background: rgba(94,185,224,.08);  border-color: rgba(94,185,224,.35);  color: var(--info); }
.alert-dismissible { position: relative; padding-right: 44px; }
.btn-close, .alert .dismiss {
    position: absolute; right: 10px; top: 10px;
    width: 22px; height: 22px;
    border: 0; background: transparent;
    color: inherit; opacity: .6;
    font-size: 16px; cursor: pointer; line-height: 1;
}
.btn-close:hover { opacity: 1; }

/* ==========================================================================
   Tables
   ========================================================================== */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left;
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-faint);
    padding: var(--sp-2) var(--sp-3);
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
}
/* .table th's "text-align: left" (class+element, specificity 0-1-1) beats a lone
   ".text-end" (specificity 0-1-0) on <th class="text-end">, so right-aligned header
   labels rendered left-aligned while their <td> data below correctly right-aligned -
   the header/data misalignment seen across every table with numeric columns. */
.table th.text-end { text-align: right; }
.table th.text-center { text-align: center; }
.table td {
    padding: var(--sp-2) var(--sp-3);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg-hover); }
.table-sm th, .table-sm td { padding: 5px 8px; font-size: 12.5px; }

.inbox-row-attention td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table-striped tbody tr:nth-child(odd) td { background: rgba(255,255,255,.015); }
.table-hover tbody tr:hover td { background: var(--bg-hover); }
.table-dark { background: var(--bg-raised); }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Inbox control deck
   Three labelled bands, each answering one question:
     Tipo   -> what kind of item (segmented, the primary axis)
     Status -> what stage of triage (underline tabs, secondary)
     Filtros-> which game / text / language (toolbar)
   The visible group labels are the point: previously every chip row looked
   identical, so the operator could not tell which row filtered what.
   -------------------------------------------------------------------------- */
.inbox-deck,
.games-deck {
    margin-bottom: var(--sp-4);
    background: linear-gradient(180deg, #171c23 0%, #13181f 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}

.deck-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--sp-3);
    padding: 9px var(--sp-4);
}
.deck-row + .deck-row { border-top: 1px solid rgba(255, 255, 255, .045); }
.deck-row.deck-row-tools { grid-template-columns: 74px minmax(0, 1fr); }

.deck-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
}

.deck-row-end { display: flex; align-items: center; gap: var(--sp-3); justify-content: flex-end; min-width: 0; flex-wrap: wrap; }

.deck-result {
    font-family: var(--font-data);
    font-size: 11.5px;
    color: var(--text-dim);
    white-space: nowrap;
}
.deck-result b { color: var(--text); font-weight: 600; }

/* --- Tipo: segmented control (primary) --- */
.deck-seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 9px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    justify-self: start;
}
.deck-seg::-webkit-scrollbar { display: none; }
.deck-seg-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-dim);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.deck-seg-item:hover { color: var(--text); background: var(--bg-raised); }
.deck-seg-item.is-active {
    color: #fff;
    background: var(--bg-raised);
    box-shadow: inset 0 0 0 1px var(--border-strong), 0 1px 2px rgba(0, 0, 0, .35);
}
.deck-seg-item .seg-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--text-faint); }
.deck-seg-item.is-review .seg-dot { background: var(--signal-review); box-shadow: 0 0 6px rgba(127, 199, 107, .6); }
.deck-seg-item.is-forum  .seg-dot { background: var(--signal-forum);  box-shadow: 0 0 6px rgba(94, 185, 224, .6); }
.seg-count {
    font-family: var(--font-data);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 7px;
}
.deck-seg-item.is-active .seg-count { color: var(--text); border-color: var(--border-strong); background: rgba(0, 0, 0, .25); }
.deck-seg-item.is-review.is-active .seg-count { color: var(--signal-review); border-color: rgba(127, 199, 107, .4); }
.deck-seg-item.is-forum.is-active  .seg-count { color: var(--signal-forum);  border-color: rgba(94, 185, 224, .4); }

/* --- Status: underline tabs (secondary) --- */
.deck-tabs {
    display: flex;
    align-items: stretch;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
    justify-self: start;
}
.deck-tabs::-webkit-scrollbar { display: none; }
.deck-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px 8px;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-dim);
    font-family: var(--font-ui);
    font-size: 12.5px;
    font-weight: 550;
    white-space: nowrap;
    cursor: pointer;
    transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.deck-tab:hover { color: var(--text); background: rgba(255, 255, 255, .025); }
.deck-tab.is-active { color: #fff; border-bottom-color: var(--text-dim); }
.deck-tab .tab-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--text-faint); }
.deck-tab .tab-count { font-family: var(--font-data); font-size: 11px; font-weight: 600; color: var(--text-dim); }
.deck-tab.is-active .tab-count { color: var(--text); }
.deck-tab .tab-count.is-zero { opacity: .7; }
.deck-tab.tone-new .tab-dot { background: var(--accent); }
.deck-tab.tone-needs .tab-dot { background: var(--bad); box-shadow: 0 0 6px rgba(242, 109, 109, .55); }
.deck-tab.tone-seen .tab-dot { background: var(--text-dim); }
.deck-tab.tone-responded .tab-dot { background: var(--good); }
.deck-tab.tone-ignored .tab-dot { background: var(--text-faint); }
.deck-tab.tone-all .tab-dot { background: linear-gradient(135deg, var(--signal-review), var(--signal-forum)); }
.deck-tab.tone-needs.is-active { border-bottom-color: var(--bad); }
.deck-tab.tone-responded.is-active { border-bottom-color: var(--good); }
.deck-tab.tone-new.is-active { border-bottom-color: var(--accent); }

/* --- Filtros: toolbar --- */
.deck-tools { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; min-width: 0; }

.game-picker { position: relative; flex: 0 1 auto; min-width: 0; }
.game-picker-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    min-width: 226px;
    max-width: 300px;
    padding: 0 10px 0 7px;
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 12.5px;
    cursor: pointer;
    text-align: left;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.game-picker-trigger:hover { border-color: var(--accent); }
.game-picker-trigger:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 182, 207, .18); }
.game-picker.is-open .game-picker-trigger { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 182, 207, .18); }
.game-picker-cover { width: 42px; height: 20px; object-fit: cover; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .09); flex: 0 0 auto; }
.game-picker-glyph { width: 30px; height: 20px; display: grid; place-items: center; border-radius: 3px; background: var(--bg-inset); border: 1px solid var(--border); color: var(--text-faint); flex: 0 0 auto; }
.game-picker-name { flex: 1 1 auto; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-picker-count { font-family: var(--font-data); font-size: 11px; color: var(--text-dim); flex: 0 0 auto; }
.game-picker-chevron { color: var(--text-faint); flex: 0 0 auto; transition: transform .15s ease; }
.game-picker.is-open .game-picker-chevron { transform: rotate(180deg); }

.game-picker-backdrop { position: fixed; inset: 0; z-index: 40; }
.game-picker-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 41;
    width: 330px;
    max-width: calc(100vw - 40px);
    background: var(--bg-panel);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.game-picker-search { display: flex; align-items: center; gap: 7px; padding: 8px 10px; background: var(--bg-inset); border-bottom: 1px solid var(--border); color: var(--text-faint); }
.game-picker-search input {
    flex: 1 1 auto; min-width: 0; padding: 2px 0;
    background: transparent; border: 0; border-radius: 0;
    color: var(--text); font-size: 12.5px;
}
.game-picker-search input:focus { box-shadow: none; border: 0; }
.game-picker-list { max-height: 320px; overflow-y: auto; padding: 5px; }
.game-option {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 6px 8px; border: 0; border-radius: 6px;
    background: transparent; color: var(--text-dim);
    font-family: var(--font-ui); font-size: 12.5px; text-align: left;
    cursor: pointer;
}
.game-option:hover { background: var(--bg-hover); color: #fff; }
.game-option.is-active { background: var(--bg-accent-soft); color: var(--accent-bright); box-shadow: inset 0 0 0 1px rgba(94, 182, 207, .35); }
.game-option img, .game-option .game-option-cover { width: 46px; height: 22px; object-fit: cover; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .08); flex: 0 0 auto; }
.game-option .game-option-cover { display: grid; place-items: center; background: var(--bg-inset); color: var(--text-faint); }
.game-option-name { flex: 1 1 auto; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-option-count { font-family: var(--font-data); font-size: 11px; color: var(--text-dim); }
.game-option.is-active .game-option-count { color: var(--accent-bright); }
.game-option-check { color: var(--accent-bright); opacity: 0; flex: 0 0 auto; }
.game-option.is-active .game-option-check { opacity: 1; }
.game-picker-empty { padding: 14px 10px; text-align: center; font-size: 12px; color: var(--text-dim); }

.deck-search {
    display: flex; align-items: center; gap: 8px;
    flex: 1 1 240px; min-width: 180px; max-width: 420px;
    height: 36px; padding: 0 9px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-faint);
}
.deck-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 182, 207, .18); }
.deck-search input {
    flex: 1 1 auto; min-width: 0; padding: 0;
    background: transparent; border: 0; border-radius: 0;
    color: var(--text); font-size: 12.5px;
}
.deck-search input:focus { border: 0; box-shadow: none; }
.deck-search input[type="search"]::-webkit-search-cancel-button,
.deck-search input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.deck-search .search-clear {
    display: grid; place-items: center;
    width: 18px; height: 18px; padding: 0;
    border: 0; border-radius: 50%;
    background: var(--bg-hover); color: var(--text-dim);
    font-size: 12px; line-height: 1; cursor: pointer;
    flex: 0 0 auto;
}
.deck-search .search-clear:hover { background: var(--bg-raised); color: #fff; }

.deck-select { height: 36px; padding: 0 30px 0 10px; font-size: 12.5px; max-width: 190px; }

/* --- Active filter tokens --- */
.deck-active {
    display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
    padding: 9px var(--sp-4);
    border-top: 1px solid rgba(255, 255, 255, .045);
    background: rgba(94, 182, 207, .035);
}
.deck-active .deck-label { color: var(--text-dim); }
.deck-tokens { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; }
.deck-token {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 3px 6px 3px 9px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--bg-raised);
    color: var(--text);
    font-family: var(--font-ui); font-size: 11.5px; font-weight: 600;
    cursor: pointer;
    transition: border-color .12s ease, color .12s ease;
}
.deck-token:hover { border-color: rgba(242, 109, 109, .55); color: #fff; }
.deck-token .deck-token-label { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.deck-token .deck-token-x { color: var(--text-faint); font-size: 13px; line-height: 1; }
.deck-token:hover .deck-token-x { color: var(--bad); }
.deck-clear { margin-left: auto; }

/* --- Game cell in the table --- */
.inbox-game-cell { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 210px; }
.inbox-game-cell img { width: 46px; height: 22px; object-fit: cover; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .07); flex: 0 0 auto; }
.inbox-game-cell .inbox-game-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 12.5px; color: var(--text); }
.inbox-author { color: var(--text-dim); font-size: 11.5px; }
.inbox-col-when { white-space: nowrap; }
.inbox-age {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-inset);
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.7;
    vertical-align: middle;
}
.inbox-age.is-new { color: var(--text-dim); }
.inbox-age.is-waiting { color: var(--warn); border-color: rgba(210, 178, 50, .35); background: rgba(210, 178, 50, .08); }
.inbox-age.is-late { color: #f0a259; border-color: rgba(240, 162, 89, .38); background: rgba(240, 162, 89, .08); }
.inbox-age.is-stale { color: var(--bad); border-color: rgba(242, 109, 109, .42); background: rgba(242, 109, 109, .09); }
.inbox-author-cell { display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 190px; }
.inbox-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-strong); flex: 0 0 auto; }
.inbox-author-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--text-dim); }

/* Meta compacta (tipo + data) que so aparece quando a tabela vira 2 colunas no mobile. */
.inbox-mobile-meta { display: none; }
.inbox-type-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--text-dim); }
.inbox-type-inline .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.inbox-type-inline.is-review .dot { background: var(--signal-review); box-shadow: 0 0 5px rgba(127, 199, 107, .6); }
.inbox-type-inline.is-forum .dot { background: var(--signal-forum); box-shadow: 0 0 5px rgba(94, 185, 224, .6); }

/* Sinais de triagem por item: sentimento, tempo de jogo, votos uteis, comentarios/respostas. */
.inbox-item-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 5px; }
.inbox-item-meta .lang-chip { margin-right: 0; }
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-inset);
    color: var(--text-dim);
    font-family: var(--font-data);
    font-size: 10.5px;
    line-height: 1.6;
    white-space: nowrap;
}
.meta-chip svg { opacity: .75; }
.meta-chip.is-positive { color: var(--good); background: rgba(111, 220, 116, .09); border-color: rgba(111, 220, 116, .28); }
.meta-chip.is-negative { color: var(--bad); background: rgba(242, 109, 109, .09); border-color: rgba(242, 109, 109, .28); }
.meta-chip.is-pinned { color: var(--warn); background: rgba(210, 178, 50, .09); border-color: rgba(210, 178, 50, .3); font-family: var(--font-ui); font-weight: 700; }

/* Ordenacao / sentimento / selecao em massa / linha em foco por teclado */
.deck-sort { min-width: 172px; max-width: 210px; }
.deck-select-active { border-color: rgba(94, 182, 207, .55); color: var(--accent-bright); }

.inbox-col-select { width: 28px; }
.inbox-col-select input { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }

.table tbody tr.is-keyboard-active td { background: var(--bg-hover); }
.table tbody tr.is-keyboard-active td:first-child { box-shadow: inset 3px 0 0 var(--accent-bright); }

.inbox-bulkbar {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 900;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 9px 12px;
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    font-size: 12.5px;
}
.inbox-bulkbar .bulk-count { font-family: var(--font-data); font-weight: 600; color: var(--text); white-space: nowrap; }
.inbox-bulkbar .bulk-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.inbox-shortcuts-hint {
    margin: -4px 0 var(--sp-3);
    text-align: right;
    font-family: var(--font-data);
    font-size: 10.5px;
    color: var(--text-faint);
}

/* Skeleton de carregamento (substitui o texto "Carregando") */
.inbox-skeleton { display: flex; flex-direction: column; gap: 8px; }
.skeleton {
    background: linear-gradient(90deg, var(--bg-panel) 25%, var(--bg-raised) 40%, var(--bg-panel) 60%);
    background-size: 300% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.skeleton-deck { height: 170px; margin-bottom: 6px; }
.skeleton-row { height: 64px; }
@keyframes skeleton-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; }
    .toast-item { animation: none; }
    .loading::before,
    .spinner-border,
    .icon-success-pulse,
    .icon-warning-pulse,
    .sync-chip.is-ok .dot,
    .badge-pulse,
    .reconnect-progress-bar,
    .radar-sweep,
    .radar-ring { animation: none !important; }
}

/* "Precisa de resposta" pesa mais que "Novo" na leitura da tabela */
.inbox-row-needs td { background: rgba(242, 109, 109, .028); }
.inbox-row-needs td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.inbox-row-needs:hover td { background: var(--bg-hover); }

.inbox-page-size { width: auto; height: 30px; padding: 3px 26px 3px 8px; font-size: 12px; }

.inbox-ellipsis {
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.inbox-status-actions { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; }
.inbox-more-toggle { border-style: dashed; }

/* Instant, always-consistent tooltip for icon-only controls — native `title` has an
   inconsistent OS delay/style, which is exactly why these icons read as unlabeled. */
.inbox-hint { position: relative; }
.inbox-hint::after {
    content: attr(data-inbox-hint);
    position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    background: var(--bg-inset, #10151b); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: 5px;
    padding: 3px 7px; font-size: 11px; font-weight: 500; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,.35);
    opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity .1s ease;
    z-index: 30;
}
.inbox-hint.inbox-hint-left::after { left: auto; right: 0; transform: none; }
.inbox-hint:hover::after, .inbox-hint:focus-visible::after {
    opacity: 1; visibility: visible;
    transition-delay: .15s;
}

.inbox-save-error { margin-top: 4px; font-size: 11px; color: var(--danger, #d66); }

.inbox-pagination {
    display: flex; align-items: center; gap: var(--sp-2);
    justify-content: center; padding: var(--sp-3) 0;
}

.inbox-undo-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
    display: flex; align-items: center; gap: var(--sp-3);
    background: var(--bg-raised); border: 1px solid var(--border-strong);
    border-radius: 8px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
    z-index: 1000; font-size: 13px;
}
.table > :not(caption) > * > * { }
.table-responsive { overflow-x: auto; }
.table-responsive.table-scroll-y { max-height: 420px; overflow-y: auto; }
.table-responsive.table-scroll-y thead th { position: sticky; top: 0; background: var(--bg-panel); z-index: 1; }

/* ==========================================================================
   Badges / pills / dots
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .02em;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1.4;
    border: 1px solid transparent;
    white-space: nowrap;
    font-family: var(--font-ui);
}
.badge-success { background: rgba(111,220,116,.12); color: var(--good); border-color: rgba(111,220,116,.35); }
.badge-danger  { background: rgba(242,109,109,.12); color: var(--bad); border-color: rgba(242,109,109,.35); }
.badge-warning { background: rgba(210,178,50,.12);  color: var(--warn); border-color: rgba(210,178,50,.3); }
.badge-info, .badge-primary { background: rgba(94,185,224,.12); color: var(--info); border-color: rgba(94,185,224,.35); }
.badge-secondary { background: var(--bg-raised); color: var(--text-dim); border-color: var(--border); }

/* badge de sync em andamento (topbar) */
.badge-sync {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(94,185,224,.12);
    color: var(--info);
    border-color: rgba(94,185,224,.35);
    max-width: 340px;
}
.badge-sync .spinner-border { width: 13px; height: 13px; border-width: 2px; flex: 0 0 auto; }
.badge-sync .sync-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.badge-sync .sync-count {
    color: var(--text-dim);
    font-size: 11px;
}

/* signal pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.pill-review  .dot { background: var(--signal-review); box-shadow: 0 0 6px rgba(127,199,107,.7); }
.pill-forum   .dot { background: var(--signal-forum); box-shadow: 0 0 6px rgba(97,185,232,.7); }
.pill-wish    .dot { background: var(--signal-wishlist); box-shadow: 0 0 6px rgba(232,194,85,.7); }
.pill-sales   .dot { background: var(--signal-sales); box-shadow: 0 0 6px rgba(79,209,197,.7); }
.pill-off     .dot { background: var(--text-faint); box-shadow: none; }
.pill-bad     .dot { background: var(--bad); box-shadow: 0 0 6px rgba(242,109,109,.6); }

/* fixed-window tag on KPI cards whose value ignores the page period selector */
.stat-label .stat-fixed-window {
    margin-left: auto;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .04em;
    color: var(--text-faint);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1px 6px;
    text-transform: none;
}

/* ==========================================================================
   Breadcrumb + tabs
   ========================================================================== */
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; margin: 0 0 var(--sp-3); color: var(--text-faint); list-style: none; }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent-bright); }
.breadcrumb .active { color: var(--text); font-weight: 600; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; color: var(--text-faint); margin-right: 7px; }

.nav-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); list-style: none; padding: 0; overflow-x: auto; }
.nav-tabs .nav-link {
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}
.nav-tabs .nav-link:hover { color: var(--text); text-decoration: none; }
.nav-tabs .nav-link.active { color: var(--accent-bright); border-bottom-color: var(--accent); }

/* ==========================================================================
   Spinners / loading
   ========================================================================== */
.spinner-border { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 13.5px;
    padding: var(--sp-4) var(--sp-2);
}
.loading::before {
    content: "";
    width: 15px; height: 15px;
    border: 2px solid var(--border-strong);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* empty state */
.empty {
    text-align: center;
    padding: var(--sp-6) var(--sp-4);
    color: var(--text-faint);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-md);
    font-size: 13.5px;
}
.empty .empty-title { color: var(--text-dim); font-weight: 600; margin-bottom: 4px; font-size: 14px; }
.empty.empty-sm { padding: var(--sp-4) var(--sp-3); }

/* ==========================================================================
   Sign-in (Login)
   ========================================================================== */
.signin { width: 100%; max-width: 400px; margin: 0 auto; }
.signin-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    padding: var(--sp-6);
    text-align: center;
}
.signin-mark { margin: 0 auto var(--sp-4); }
.signin-panel h3 { margin-bottom: 2px; }
.signin-sub { color: var(--text-faint); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 var(--sp-5); }
.signin-form { text-align: left; }
.signin-foot {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: var(--sp-5) 0 0;
    color: var(--text-faint); font-size: 12px;
}

/* ==========================================================================
   Landing (Home)
   ========================================================================== */
.landing {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
}
.landing-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: var(--sp-6);
    align-items: center;
}
.landing-mark { margin-bottom: var(--sp-4); }
.landing-h { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: var(--sp-3); }
.landing-sub { font-size: 16.5px; color: var(--text-dim); max-width: 46ch; margin: 0 0 var(--sp-5); line-height: 1.55; }
.landing-note { margin-top: var(--sp-3); color: var(--text-faint); font-size: 12.5px; }

.status-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.section-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(94,182,207,.8); display: inline-block; }
.dirty-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 6px rgba(240,178,50,.7); display: inline-block; }
.status-rows { padding: var(--sp-2) var(--sp-4); }
.status-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-4);
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}
.status-row:last-child { border-bottom: 0; }
.status-row > span:first-child { color: var(--text-faint); }
.status-row .mono { font-size: 12.5px; }

/* ==========================================================================
   Automation console (platform tab strip + detail panel)
   ========================================================================== */
.automation-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--sp-3);
    margin-bottom: var(--sp-4);
}
.automation-tab {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-top: 3px solid transparent;
    border-radius: var(--r-md);
    text-align: left;
    cursor: pointer;
    font-family: var(--font-ui);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.automation-tab:hover { background: var(--bg-hover); }
.automation-tab:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.automation-tab.active {
    background: var(--bg-raised);
    border-top-color: var(--tab-accent, var(--accent));
    box-shadow: var(--shadow-sm);
}
.automation-tab-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.automation-tab-name { font-size: 13.5px; font-weight: 700; letter-spacing: .01em; color: var(--text); }
.automation-tab-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); font-size: 11.5px; color: var(--text-faint); }
.automation-tab-meta .mono { font-family: var(--font-data); color: var(--text-dim); }

.automation-panel { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.automation-panel-head {
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2);
}
.automation-panel-desc { padding: var(--sp-4) var(--sp-4) 0; }
.automation-panel-body {
    padding: var(--sp-4);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-3);
    align-items: start;
}
@media (max-width: 1180px) {
    .automation-panel-body { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .automation-panel-body { grid-template-columns: 1fr; }
}
.automation-panel-footer {
    padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--border);
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3);
}

.setting-block { background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); display: flex; flex-direction: column; }
.setting-block .status-row {
    font-size: 11.5px;
    color: var(--text-faint);
    border-bottom: 0;
    border-top: 1px dashed var(--border);
    padding: var(--sp-2) 0 0;
}
.setting-block .status-row .mono { color: var(--text-dim); }

/* Native hour picker: the operator edits their own local time, never UTC math.
   The small UTC readout underneath is the only place UTC still appears. */
.hour-field-input {
    font-family: var(--font-data);
    font-size: 14px;
    max-width: 140px;
}
.hour-field-input::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
.hour-field .form-text { font-family: var(--font-data); }

.automation-savebar {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 8px 8px 8px 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
    z-index: 1000;
    font-size: 13.5px;
    animation: automation-savebar-in .18s ease-out;
}
@keyframes automation-savebar-in {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 640px) {
    .automation-tabs { grid-template-columns: 1fr; }
    .automation-savebar {
        left: var(--sp-4); right: var(--sp-4); transform: none;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        border-radius: 12px; flex-wrap: wrap;
    }
    @keyframes automation-savebar-in {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (max-width: 820px) {
    .landing-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
    .landing-h { font-size: 30px; }
}

/* ==========================================================================
   Studio grid (Tenants Index)
   ========================================================================== */
.studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: var(--sp-4);
}
.studio-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
    display: flex;
    flex-direction: column;
}
.studio-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.studio-eyebrow {
    padding: 10px var(--sp-4);
    display: flex; align-items: center; gap: var(--sp-2);
    border-bottom: 1px solid var(--border);
    background: var(--bg-raised);
    flex-wrap: wrap;
}
.studio-body { padding: var(--sp-4); flex: 1 1 auto; }
.studio-name-link { display: block; color: inherit; }
.studio-name-link:hover { text-decoration: none; }
.studio-name-link:hover .studio-name { color: var(--accent-bright); }
.studio-name { font-size: 16px; font-weight: 700; color: #f1f5f8; margin: 0 0 2px; transition: color .12s ease; }
.studio-slug { font-size: 12px; color: var(--accent-bright); font-family: var(--font-data); }
/* Card-local signal grid — deliberately distinct from .studio-signals (nav-bar dots in StudioLayout) */
.studio-card-signals { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); margin-top: var(--sp-3); }
.studio-card-signal { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); }
.studio-card-signal strong { color: var(--text); font-family: var(--font-data); font-weight: 600; }
.studio-attention-note {
    display: flex; align-items: center; gap: 6px;
    margin-top: var(--sp-3);
    padding: 6px 9px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
}
.studio-attention-note.warn { color: var(--warn); background: rgba(210,178,50,.08); border-color: rgba(210,178,50,.3); }
.studio-attention-note.bad { color: var(--bad); background: rgba(242,109,109,.08); border-color: rgba(242,109,109,.35); }
.studio-foot { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0 var(--sp-4) var(--sp-4); }
.studio-foot-primary { flex: 1 1 100%; }
.studio-foot-secondary { display: flex; flex-wrap: wrap; gap: var(--sp-2); flex: 1 1 100%; }

/* ==========================================================================
   Game shelf (Games page)
   ========================================================================== */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--sp-4); }
.game-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .15s ease;
}
.game-card:hover { border-color: var(--border-strong); }
.game-cover {
    position: relative;
    aspect-ratio: 460 / 215;
    background: var(--bg-inset);
    overflow: hidden;
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-cover .status-ribbon {
    position: absolute; top: 8px; left: 8px;
    font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 4px; backdrop-filter: blur(3px);
}
.game-cover .status-ribbon.on { background: rgba(13,28,18,.82); color: var(--good); border: 1px solid rgba(111,220,116,.4); }
.game-cover .status-ribbon.off { background: rgba(20,22,26,.82); color: var(--text-faint); border: 1px solid var(--border-strong); }
.game-info { padding: var(--sp-3); display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.game-info .g-name { font-weight: 650; font-size: 13.5px; line-height: 1.25; color: #f0f4f7; }
.game-info .g-meta { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-data); }
.game-signals { display: flex; gap: 8px; flex-wrap: wrap; }
.game-actions { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }

/* sync mini-state */
.sync-state { font-size: 11.5px; color: var(--text-faint); display: flex; align-items: center; gap: 6px; }
.sync-state b { color: var(--text-dim); font-weight: 600; }
.sync-state .ago { color: var(--good); }

/* ==========================================================================
   Stat / KPI blocks
   ========================================================================== */
.stat { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); min-width: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-5); }
.stat .stat-label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-width: 0; flex-wrap: wrap; }
.stat .stat-label > * { min-width: 0; }
.stat .stat-value { font-family: var(--font-data); font-size: 26px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; line-height: 1.1; overflow-wrap: anywhere; }
.stat .stat-value.tone-review { color: var(--signal-review); }
.stat .stat-value.tone-forum { color: var(--signal-forum); }
.stat .stat-value.tone-wish { color: var(--signal-wishlist); }
.stat .stat-value.tone-sales { color: var(--signal-sales); }
.stat .stat-foot { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; min-width: 0; }
.stat .stat-foot .delta { font-family: var(--font-data); font-weight: 600; }
.stat .stat-foot .delta.up { color: var(--good); }
.stat .stat-foot .delta.down { color: var(--bad); }
.stat .stat-value.stat-value-sm { font-size: 20px; }

.stat-value .trend-arrow { font-size: .7em; margin-right: 3px; }

/* ==========================================================================
   Sections / subsections
   ========================================================================== */
.section { margin-bottom: var(--sp-5); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.section-head h3 { margin: 0; }
.section-head .sub { font-size: 12px; color: var(--text-faint); }

/* small utility */
.divider { height: 1px; background: var(--border); margin: var(--sp-4) 0; border: 0; }
.muted { color: var(--text-faint); }
.mono { font-family: var(--font-data); }
.nowrap { white-space: nowrap; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-middle{ }

/* ==========================================================================
   Expandable text (reviews / forum previews com link original)
   ========================================================================== */
.expandable-text {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    max-width: 100%;
}
.expandable-text-trunc,
.expandable-text-full {
    display: inline;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-dim);
}
.expandable-text-link {
    flex: none;
    width: 26px; height: 26px;
}
.expandable-text-toggle {
    flex: none;
    padding: 0;
    font-size: 12px;
    color: var(--accent);
    white-space: nowrap;
}
.expandable-text-toggle:hover { color: var(--accent-bright); }

/* ==========================================================================
   Emails hub (recipients / preview / send log)
   ========================================================================== */
.hub-tabs {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
    margin-bottom: var(--sp-4);
}
.email-preview-frame {
    width: 100%;
    height: 520px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: #fff;
}

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a4a58; }

/* ==========================================================================
   Modal overlay (blazor inline, sem JS)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    background: rgba(8, 11, 15, .62);
    backdrop-filter: blur(2px);
}
.modal-panel {
    width: min(440px, calc(100vw - 32px));
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.modal-panel-lg {
    width: min(940px, calc(100vw - 32px));
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
}
.modal-panel h4 { margin: 0 0 var(--sp-1); }

/* Flexbox and layout utilities */
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-1 { flex: 1 1 0% !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.gap-1 { gap: var(--sp-1) !important; }
.gap-2 { gap: var(--sp-2) !important; }
.gap-3 { gap: var(--sp-3) !important; }
.gap-4 { gap: var(--sp-4) !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 var(--sp-2);
}
.modal-body {
    font-size: 13.5px;
    color: var(--text-dim);
    margin: 0 0 var(--sp-4);
    line-height: 1.5;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-2);
}

/* Elemento visivel apenas para leitores de tela */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Tabelas com linha de total no rodape
   ========================================================================== */
.table-total td {
    border-top: 2px solid var(--border-strong);
    border-bottom: 0;
    background: rgba(255, 255, 255, .02);
}
.table-total td:first-child { color: var(--text-dim); }

/* Daily series agrupada por mes */
.daily-series-table .month-row {
    cursor: pointer;
    background: rgba(255, 255, 255, .03);
}
.daily-series-table .month-row:hover { background: rgba(94, 185, 224, .08); }
.daily-series-table .month-row.expanded { background: rgba(94, 185, 224, .05); }
.daily-series-table .month-row td {
    border-top: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--border);
}
.daily-series-table .month-caret {
    display: inline-block;
    width: 14px;
    color: var(--text-dim);
    font-size: 11px;
}
.daily-series-table .day-row td {
    background: var(--bg);
}
.daily-series-table .day-cell {
    padding-left: calc(var(--sp-3) + 18px);
    color: var(--text-dim);
}

/* Painel de progresso ao vivo da tela Sync */
.sync-live {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.sync-live-line {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-wrap: wrap;
}
.sync-live-sub {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

/* ==========================================================================
   Dashboard melhorado (Marco 8): deltas, sentimento, health, backlog, charts
   ========================================================================== */

/* Delta badge (▲/▼) - usado no KPI rail, cards de studio e dashboard por tenant */
.delta-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font-data);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.3;
    white-space: nowrap;
}
.delta-badge.delta-up { color: var(--good); background: rgba(111,220,116,.1); border: 1px solid rgba(111,220,116,.3); }
.delta-badge.delta-down { color: var(--bad); background: rgba(242,109,109,.1); border: 1px solid rgba(242,109,109,.35); }
.delta-badge.delta-flat { color: var(--text-dim); background: var(--bg-raised); border: 1px solid var(--border-strong); }
.delta-badge.delta-na { color: var(--text-faint); background: var(--bg-raised); border: 1px solid var(--border); }
.delta-badge .db-arrow { font-size: .72em; }
.delta-badge .db-sign { font-size: .9em; }
.delta-badge .db-flat { color: var(--text-dim); }

/* Sync health strip (Index) */
.sync-health-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    align-items: center;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px var(--sp-4);
    margin-bottom: var(--sp-5);
    font-size: 13px;
}
.health-chip { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.health-chip strong { color: var(--text); font-family: var(--font-data); font-weight: 600; }
.health-chip .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.health-good .dot { background: var(--good); }
.health-warn .dot { background: var(--warn); }
.health-bad .dot { background: var(--bad); }

/* Deltas dentro do card de studio (Index) */
.studio-card-deltas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-3);
    padding-top: var(--sp-2);
    border-top: 1px dashed var(--border);
}
.studio-card-delta { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-faint); }
.studio-card-delta .delta-badge { font-size: 11px; }

/* Sentimento: barra pos/neg + bloco do dashboard */
.sentiment-bar {
    display: flex;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-inset);
    width: 100%;
    max-width: 220px;
}
.sentiment-bar .sb-pos { background: var(--good); }
.sentiment-bar .sb-neg { background: var(--bad); }
.sentiment-block { display: flex; flex-direction: column; gap: var(--sp-3); max-width: 520px; }
.sentiment-total { display: flex; align-items: baseline; gap: 7px; font-size: 14px; flex-wrap: wrap; }
.sentiment-big { font-family: var(--font-data); font-size: 24px; font-weight: 600; }

/* Idiomas dos reviews */
.lang-list { display: flex; flex-direction: column; gap: 8px; margin-top: var(--sp-4); max-width: 420px; }
.lang-row { display: flex; align-items: center; gap: var(--sp-3); font-size: 12.5px; }
.lang-name { width: 90px; color: var(--text-dim); text-align: right; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--bg-inset); overflow: hidden; }
.lang-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b6f8a, var(--accent)); }
.lang-count { width: 44px; text-align: right; font-family: var(--font-data); color: var(--text); }

/* Backlog do Inbox (dashboard por tenant) */
.backlog-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.backlog-item { font-size: 13px; color: var(--text-dim); }
.backlog-item strong { color: var(--text); font-family: var(--font-data); font-weight: 600; }

/* Freshness por fonte (dashboard por tenant) */
.freshness-cell { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.freshness-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.freshness-cell.fn-fresh .freshness-dot { background: var(--good); }
.freshness-cell.fn-warn .freshness-dot { background: var(--warn); }
.freshness-cell.fn-stale .freshness-dot { background: var(--bad); }
.freshness-cell.fn-none .freshness-dot { background: var(--text-faint); }

/* Graficos Chart.js */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
}
.chart-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    min-width: 0;
}
.chart-title { font-size: 13.5px; font-weight: 650; color: #eef3f7; }
.chart-sub { font-size: 11.5px; color: var(--text-faint); margin: 2px 0 0; }
.chart-box { position: relative; height: 240px; margin-top: var(--sp-3); }
.chart-box canvas { width: 100% !important; height: 100% !important; }

/* Topbar hamburger button & close button (hidden on desktop) */
.topbar-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    color: var(--text);
    cursor: pointer;
    flex: 0 0 auto;
}
.topbar-hamburger:hover {
    background: var(--bg-raised);
    color: var(--accent-bright);
}

.sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-dim);
    cursor: pointer;
    margin-left: auto;
}
.sidebar-close-btn:hover {
    color: #fff;
    border-color: var(--border-strong);
}

.sidebar-backdrop {
    display: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
.focus-ring:focus-visible,
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .app-shell {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas: "topbar" "content";
        height: 100dvh;
        overflow: hidden;
    }

    .topbar-toggle { display: none; }
    .topbar-hamburger { display: inline-flex; }
    .sidebar-close-btn { display: inline-flex; }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(5, 8, 12, 0.7);
        backdrop-filter: blur(3px);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: 280px;
        max-width: 86vw;
        height: 100vh;
        max-height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 30px rgba(0,0,0,.8);
        border-right: 1px solid var(--border-strong);
        display: flex;
        flex-direction: column;
    }

    .app-shell.mobile-nav-open .app-sidebar {
        transform: translateX(0);
    }

    .app-shell.mobile-nav-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-brand {
        height: 52px;
        padding: 0 var(--sp-4);
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .sidebar-brand .brand-text { display: flex; }

    .sidebar-nav {
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        padding: var(--sp-3) var(--sp-2);
        gap: 3px;
    }
    .nav-section-label { display: block; }
    .nav-item {
        white-space: normal;
        padding: 9px 12px;
        font-size: 14px;
    }
    .nav-item.active::before { display: block; }

    .sidebar-footer {
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr) 32px;
        align-items: center;
        gap: 10px;
        padding: var(--sp-3) var(--sp-4);
        border-top: 1px solid var(--border);
    }
    .sidebar-footer .footer-avatar,
    .sidebar-footer .footer-id { display: flex; }

    /* Topbar on mobile */
    .app-topbar {
        height: 52px;
        padding: 0 var(--sp-3);
        gap: var(--sp-2);
    }
    .topbar-title {
        font-size: 14px;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .topbar-breadcrumb { display: none; }
    .topbar-lang-wrap .topbar-lang {
        padding: 4px 6px;
        font-size: 11.5px;
    }
    .badge-sync {
        max-width: 130px;
        font-size: 11px;
        padding: 2px 6px;
    }
    .d-none-mobile { display: none !important; }

    .app-content {
        padding: var(--sp-3) var(--sp-3) var(--sp-5);
    }

    /* Studio navigation on mobile */
    .studio-nav {
        padding: 8px 10px;
        margin: calc(-1 * var(--sp-3)) calc(-1 * var(--sp-3)) var(--sp-3);
        top: calc(-1 * var(--sp-3));
        gap: 8px;
    }
    .studio-nav-top {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 6px;
    }
    .studio-nav-back {
        padding: 4px 6px;
        font-size: 11.5px;
    }
    .studio-nav-id {
        min-width: 0;
        gap: 6px;
    }
    .studio-nav-name {
        font-size: 13px;
        max-width: 110px;
    }
    .studio-nav-slug {
        display: none;
    }
    .studio-nav-meta {
        margin-left: 0;
        width: auto;
        justify-content: flex-end;
        gap: 6px;
    }
    .tenant-switch {
        max-width: 115px;
        font-size: 11.5px;
        padding: 4px 6px;
    }
    .studio-nav-groups {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        overflow: visible;
        gap: 4px;
        padding: 2px 0 4px;
    }
    .studio-nav-groups::-webkit-scrollbar { display: none; }
    .studio-menu-list {
        position: static;
        width: max-content;
        min-width: 0;
        max-width: 100%;
        margin-top: 4px;
    }
    .studio-group {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 4px;
    }
    .studio-primary { flex: 1 1 100%; min-width: 0; }
    .studio-primary .studio-tabs { flex-wrap: wrap; }
    .studio-group + .studio-group {
        padding-left: 4px;
        border-left: 1px solid var(--border);
        margin-left: 2px;
    }
    .studio-group:not(:first-child)::before { display: none; }
    .studio-group-label { display: none; }
    .studio-tabs {
        flex-wrap: nowrap;
        gap: 2px;
    }
    .studio-tab {
        padding: 6px 9px;
        font-size: 12px;
        min-height: 32px;
    }

    /* Page head on mobile */
    .page-head {
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-2);
        margin-bottom: var(--sp-4);
    }
    .page-head h1 {
        font-size: 20px;
        margin-bottom: 2px;
    }
    .page-head .page-sub {
        font-size: 12.5px;
    }
    .page-head-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: var(--sp-2);
        align-items: center;
    }
    .page-head-actions .d-flex {
        flex-wrap: wrap;
        width: 100%;
    }
    .page-head-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 36px;
    }
    .period-seg { width: 100%; }
    .period-seg-item { flex: 1 1 auto; text-align: center; }
    .period-seg-scroll { flex-wrap: wrap; overflow: visible; }
    .sync-chip { min-height: 32px; }

    /* Stats on mobile */
    .stat-row {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
        gap: var(--sp-2);
        margin-bottom: var(--sp-3);
    }
    .stat {
        padding: var(--sp-3);
    }
    .stat .stat-value {
        font-size: 21px;
    }

    /* Charts on mobile */
    .chart-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-3);
        margin-bottom: var(--sp-4);
    }
    .chart-card {
        padding: var(--sp-3);
    }
    .chart-box {
        height: 220px;
    }

    /* Games shelf on mobile */
    .shelf {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr));
        gap: var(--sp-2);
    }
    .game-info {
        padding: 8px 10px;
        gap: 6px;
    }

    /* Inbox on mobile: label above each band, controls full width */
    .deck-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 10px var(--sp-3);
    }
    .deck-row.deck-row-tools { grid-template-columns: minmax(0, 1fr); }
    .deck-row-end { justify-content: space-between; }
    .deck-seg { width: 100%; justify-self: stretch; }
    .deck-tabs { justify-self: stretch; flex-wrap: wrap; overflow: visible; }
    .deck-tab { margin-bottom: 0; }
    .deck-seg-item { flex: 1 1 auto; justify-content: center; padding: 8px 10px; }
    .deck-tools { width: 100%; }
    .game-picker { width: 100%; }
    .game-picker-trigger { width: 100%; max-width: 100%; }
    .game-picker-panel { width: calc(100vw - 48px); }
    .deck-search { max-width: 100%; flex-basis: 100%; }
    .deck-tools .deck-select { flex: 1 1 45%; max-width: 100%; width: auto; }
    .deck-sort { width: 100%; max-width: 100%; }
    .deck-active { padding: 9px var(--sp-3); }
    .deck-clear { margin-left: 0; }

    /* Inbox table on mobile: 2 colunas (jogo | conteudo) + acoes embaixo.
       Tipo, autor e data saem das colunas e viram uma meta compacta na celula
       de conteudo, em vez de espremer tudo e rolar na horizontal. */
    .inbox-table { display: block; width: 100%; }
    .inbox-table thead { display: none; }
    .inbox-table tbody { display: block; }
    .inbox-table tr {
        display: grid;
        grid-template-columns: 18px 132px minmax(0, 1fr);
        grid-template-areas: "select game content" "status status status";
        column-gap: 10px;
        row-gap: 8px;
        padding: 11px var(--sp-2);
        align-items: start;
    }
    .inbox-table tr + tr { border-top: 1px solid var(--border); }
    .inbox-table td { display: block; padding: 0; border-bottom: 0; }
    .inbox-table td.inbox-col-type,
    .inbox-table td.inbox-col-author,
    .inbox-table td.inbox-col-when { display: none; }
    .inbox-col-game { grid-area: game; }
    .inbox-col-content { grid-area: content; }
    .inbox-col-status { grid-area: status; }
    .inbox-col-select { grid-area: select; padding-top: 4px; }
    .inbox-table tbody tr:hover td { background: transparent; }
    .inbox-table .inbox-row-attention { box-shadow: inset 3px 0 0 var(--accent); }
    .inbox-table .inbox-row-attention td:first-child { box-shadow: none; }
    .inbox-table .inbox-row-needs { box-shadow: inset 3px 0 0 var(--bad); }
    .inbox-table .inbox-row-needs td:first-child { box-shadow: none; }
    .inbox-game-cell { max-width: none; align-items: flex-start; }
    .inbox-game-cell .inbox-game-name {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.3;
    }
    .inbox-mobile-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
    .inbox-when-inline { margin-left: auto; font-family: var(--font-data); font-size: 11px; color: var(--text-dim); }
    .inbox-status-actions { justify-content: flex-start; }
    .inbox-bulkbar {
        left: 16px;
        right: 16px;
        bottom: 16px;
        transform: none;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: var(--sp-2);
        font-size: 12px;
    }
    .inbox-shortcuts-hint { display: none; }
    .inbox-status-actions { gap: 5px; }
    .inbox-undo-toast {
        width: calc(100vw - 32px);
        left: 16px;
        transform: none;
        bottom: 16px;
        font-size: 12px;
        justify-content: space-between;
    }

    /* Tables on mobile */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    .table-sm th, .table-sm td {
        padding: 7px 8px;
        font-size: 12.5px;
    }

    /* Subnav on mobile */
    .subnav {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .subnav::-webkit-scrollbar { display: none; }

    /* Modals on mobile */
    .modal-overlay {
        padding-top: 5vh;
        padding-inline: 12px;
    }
    .modal-panel {
        width: 100%;
        max-width: 440px;
        padding: var(--sp-4);
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {
    /* Prevent iOS auto-zoom on field focus */
    .form-control, input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea {
        font-size: 16px !important;
    }
    .btn { min-height: 38px; }
    .btn-sm { min-height: 32px; }
    .btn-xs { min-height: 28px; min-width: 28px; }

    .signin-panel {
        padding: var(--sp-4);
        border-radius: var(--r-md);
    }
    .landing-h {
        font-size: clamp(26px, 7vw, 36px);
    }
    .landing-sub {
        font-size: 15px;
    }
    .landing-grid {
        grid-template-columns: 1fr;
        gap: var(--sp-4);
    }
    .status-rows {
        padding: var(--sp-1) var(--sp-3);
    }
}

/* ==========================================================================
   Global Utilities (Padding, Margin, Display, Alignments)
   ========================================================================== */
.p-0  { padding: 0 !important; }
.p-1  { padding: var(--sp-1) !important; }
.p-2  { padding: var(--sp-2) !important; }
.p-3  { padding: var(--sp-3) !important; }
.p-4  { padding: var(--sp-4) !important; }
.p-5  { padding: var(--sp-5) !important; }
.p-6  { padding: var(--sp-6) !important; }

.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: var(--sp-1) !important; padding-right: var(--sp-1) !important; }
.px-2 { padding-left: var(--sp-2) !important; padding-right: var(--sp-2) !important; }
.px-3 { padding-left: var(--sp-3) !important; padding-right: var(--sp-3) !important; }
.px-4 { padding-left: var(--sp-4) !important; padding-right: var(--sp-4) !important; }
.px-5 { padding-left: var(--sp-5) !important; padding-right: var(--sp-5) !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: var(--sp-1) !important; padding-bottom: var(--sp-1) !important; }
.py-2 { padding-top: var(--sp-2) !important; padding-bottom: var(--sp-2) !important; }
.py-3 { padding-top: var(--sp-3) !important; padding-bottom: var(--sp-3) !important; }
.py-4 { padding-top: var(--sp-4) !important; padding-bottom: var(--sp-4) !important; }
.py-5 { padding-top: var(--sp-5) !important; padding-bottom: var(--sp-5) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: var(--sp-1) !important; }
.pt-2 { padding-top: var(--sp-2) !important; }
.pt-3 { padding-top: var(--sp-3) !important; }
.pt-4 { padding-top: var(--sp-4) !important; }
.pt-5 { padding-top: var(--sp-5) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: var(--sp-1) !important; }
.pb-2 { padding-bottom: var(--sp-2) !important; }
.pb-3 { padding-bottom: var(--sp-3) !important; }
.pb-4 { padding-bottom: var(--sp-4) !important; }
.pb-5 { padding-bottom: var(--sp-5) !important; }

.ps-0 { padding-left: 0 !important; }
.ps-1 { padding-left: var(--sp-1) !important; }
.ps-2 { padding-left: var(--sp-2) !important; }
.ps-3 { padding-left: var(--sp-3) !important; }
.ps-4 { padding-left: var(--sp-4) !important; }

.pe-0 { padding-right: 0 !important; }
.pe-1 { padding-right: var(--sp-1) !important; }
.pe-2 { padding-right: var(--sp-2) !important; }
.pe-3 { padding-right: var(--sp-3) !important; }
.pe-4 { padding-right: var(--sp-4) !important; }

.m-0  { margin: 0 !important; }
.m-1  { margin: var(--sp-1) !important; }
.m-2  { margin: var(--sp-2) !important; }
.m-3  { margin: var(--sp-3) !important; }
.m-4  { margin: var(--sp-4) !important; }
.m-5  { margin: var(--sp-5) !important; }
.m-auto { margin: auto !important; }

.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.mx-1 { margin-left: var(--sp-1) !important; margin-right: var(--sp-1) !important; }
.mx-2 { margin-left: var(--sp-2) !important; margin-right: var(--sp-2) !important; }
.mx-3 { margin-left: var(--sp-3) !important; margin-right: var(--sp-3) !important; }
.mx-4 { margin-left: var(--sp-4) !important; margin-right: var(--sp-4) !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1 { margin-top: var(--sp-1) !important; margin-bottom: var(--sp-1) !important; }
.my-2 { margin-top: var(--sp-2) !important; margin-bottom: var(--sp-2) !important; }
.my-3 { margin-top: var(--sp-3) !important; margin-bottom: var(--sp-3) !important; }
.my-4 { margin-top: var(--sp-4) !important; margin-bottom: var(--sp-4) !important; }
.my-5 { margin-top: var(--sp-5) !important; margin-bottom: var(--sp-5) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--sp-1) !important; }
.mt-2 { margin-top: var(--sp-2) !important; }
.mt-3 { margin-top: var(--sp-3) !important; }
.mt-4 { margin-top: var(--sp-4) !important; }
.mt-5 { margin-top: var(--sp-5) !important; }
.mt-auto { margin-top: auto !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--sp-1) !important; }
.mb-2 { margin-bottom: var(--sp-2) !important; }
.mb-3 { margin-bottom: var(--sp-3) !important; }
.mb-4 { margin-bottom: var(--sp-4) !important; }
.mb-5 { margin-bottom: var(--sp-5) !important; }
.mb-auto { margin-bottom: auto !important; }

.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: var(--sp-1) !important; }
.ms-2 { margin-left: var(--sp-2) !important; }
.ms-3 { margin-left: var(--sp-3) !important; }
.ms-4 { margin-left: var(--sp-4) !important; }
.ms-auto { margin-left: auto !important; }

.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: var(--sp-1) !important; }
.me-2 { margin-right: var(--sp-2) !important; }
.me-3 { margin-right: var(--sp-3) !important; }
.me-4 { margin-right: var(--sp-4) !important; }
.me-auto { margin-right: auto !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: var(--sp-1) !important; }
.gap-2 { gap: var(--sp-2) !important; }
.gap-3 { gap: var(--sp-3) !important; }
.gap-4 { gap: var(--sp-4) !important; }
.gap-5 { gap: var(--sp-5) !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-baseline { align-items: baseline !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }

/* ==========================================================================
   Table & Grid Design System
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    font-size: 13.5px;
    color: var(--text);
    background: transparent;
}

table.table thead th {
    background: rgba(14, 20, 27, 0.85);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    border-top: none;
    white-space: nowrap;
    vertical-align: middle;
}

table.table tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
    background: transparent;
    font-size: 13.5px;
}

table.table tbody tr {
    transition: background 0.15s ease;
}

table.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.035);
}

table.table tbody tr:last-child td {
    border-bottom: none;
}

/* Freshness indicator pill */
.freshness-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 550;
    white-space: nowrap;
}

.freshness-cell .freshness-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.freshness-cell.fn-fresh { color: #34d399; }
.freshness-cell.fn-fresh .freshness-dot {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.freshness-cell.fn-warn { color: #fbbf24; }
.freshness-cell.fn-warn .freshness-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.freshness-cell.fn-stale { color: #94a3b8; }
.freshness-cell.fn-stale .freshness-dot {
    background: #64748b;
}

/* Pill badges with counts */
.count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
/* ---- Sidebar: lista de empresas com health dots (critique P0/P1) ---- */
.nav-tenant-list { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 10px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-tenant {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: 8px;
    color: var(--text-dim, #b8c4d0); font-size: 13px; text-decoration: none;
    border: 1px solid transparent;
}
.nav-tenant:hover { background: var(--bg-raised, rgba(255,255,255,.04)); color: var(--accent-bright); text-decoration: none; }
.nav-tenant.active { background: var(--bg-raised, rgba(255,255,255,.05)); color: var(--accent-bright); border-color: var(--border); }
.nav-tenant-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--text-faint, #5f748a); }
.nav-tenant-dot.t-ok { background: var(--good); box-shadow: 0 0 6px rgba(111,220,116,.5); }
.nav-tenant-dot.t-warn { background: var(--warn); }
.nav-tenant-dot.t-stale, .nav-tenant-dot.t-none { background: var(--bad); }
.nav-tenant { align-items: flex-start; }
.nav-tenant-dot { margin-top: 6px; }
.nav-tenant-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: 1px; }
.nav-tenant-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Contadores do estudio escritos por extenso: "12 a responder · 48 novas" */
.nav-tenant-meta { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 11px; line-height: 1.4; color: var(--text-faint, #5f748a); }
.nav-meta-reply { color: var(--bad); font-weight: 600; }
.nav-meta-new { color: var(--text-dim, #b8c4d0); }
.nav-meta-clear { color: var(--text-faint, #5f748a); }
.nav-tenant-flag { align-self: center; }
.app-shell.sidebar-collapsed .nav-tenant-meta { display: none; }
.nav-tenant-rail { display: none; }
.app-shell.sidebar-collapsed .nav-tenant-list { padding-left: 0; border-left: 0; align-items: center; }
.app-shell.sidebar-collapsed .nav-recents { display: none; }
.app-shell.sidebar-collapsed .nav-tenant { position: relative; padding: 6px; justify-content: center; }
.app-shell.sidebar-collapsed .nav-tenant-main,
.app-shell.sidebar-collapsed .nav-tenant-flag,
.app-shell.sidebar-collapsed .nav-tenant-dot { display: none; }
.app-shell.sidebar-collapsed .nav-tenant-rail {
    display: inline-flex; align-items: center; justify-content: center; position: relative;
    width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
    font-weight: 700; font-size: 13px; color: var(--text-dim);
}
.nav-tenant-rail-count {
    position: absolute; top: -6px; right: -8px; min-width: 16px; padding: 0 3px; border-radius: 999px;
    background: var(--bad); color: #fff; font-family: var(--font-data); font-size: 9.5px; font-weight: 700; line-height: 16px; text-align: center;
}
.nav-tenant-count {
    margin-left: auto; flex: 0 0 auto;
    min-width: 17px; padding: 0 4px; border-radius: 999px;
    background: rgba(242, 109, 109, .15); border: 1px solid rgba(242, 109, 109, .42);
    color: var(--bad); font-family: var(--font-data); font-size: 10px; font-weight: 700;
    line-height: 1.55; text-align: center;
}
.nav-tenant-count + .nav-tenant-flag { margin-left: 6px; }
.nav-recents { margin: 2px 0 8px; }
.nav-recent-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.nav-recent-chip {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-inset);
    color: var(--text-dim);
    font-size: 11px;
}
.nav-recent-chip:hover { color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.nav-recent-chip.active { color: var(--accent-bright); border-color: rgba(94, 182, 207, .45); background: var(--bg-accent-soft); }
.nav-tenant-flag {
    margin-left: auto; flex: 0 0 auto;
    font-family: var(--font-data, monospace); font-size: 10px; line-height: 1;
    color: var(--text-faint, #5f748a); border: 1px solid var(--border); border-radius: 4px; padding: 2px 4px;
}

/* ---- Cartao de studio: acoes secundarias como icones (1 CTA por cartao) ---- */
.studio-foot-secondary { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.icon-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 7px;
    color: var(--text-faint, #5f748a);
    border: 1px solid transparent;
}
.icon-link:hover { color: var(--accent-bright); background: var(--bg-raised, rgba(255,255,255,.05)); border-color: var(--border); text-decoration: none; }

/* ---- Tabela de comparacao entre studios ---- */
.th-sort {
    background: none; border: 0; padding: 0; width: 100%; text-align: inherit;
    color: inherit; font: inherit; cursor: pointer;
}
.th-sort:hover { color: var(--accent-bright); }
.compare-table .compare-studio { font-weight: 600; }

/* ---- Secoes colapsaveis do dashboard (progressive disclosure) ---- */
details.section-collapse > summary.section-head { cursor: pointer; list-style: none; user-select: none; }
details.section-collapse > summary.section-head::-webkit-details-marker { display: none; }
details.section-collapse > summary.section-head h3::after {
    content: "+"; margin-left: 8px; color: var(--text-faint, #5f748a); font-weight: 400;
}
details.section-collapse[open] > summary.section-head h3::after { content: "\2212"; }
.count-chip {
    display: inline-block; min-width: 20px; text-align: center;
    margin-left: 4px; padding: 1px 6px; border-radius: 999px;
    font-size: 11px; font-family: var(--font-data, monospace);
    color: var(--text-faint, #5f748a); border: 1px solid var(--border);
}

/* ---- Barra de fecho da sessao ---- */
.session-summary {
    display: flex; align-items: center; gap: 8px;
    margin-top: var(--sp-4, 20px); padding: 10px 14px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-raised, rgba(255,255,255,.03));
    font-size: 12.5px; color: var(--text-dim, #b8c4d0);
}
.session-summary-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.session-summary-dot.ok { background: var(--good); box-shadow: 0 0 6px rgba(111,220,116,.5); }
.session-summary-dot.warn { background: var(--warn); }
.session-summary-link { margin-left: auto; font-size: 12px; }

/* ---- Chip de idioma do review (Inbox) ---- */
.lang-chip {
    display: inline-block; margin-right: 6px; padding: 1px 7px;
    border-radius: 999px; border: 1px solid var(--border);
    background: var(--bg-raised, rgba(255,255,255,.04));
    font-size: 10.5px; font-family: var(--font-data, monospace);
    color: var(--text-faint, #5f748a); vertical-align: 1px; white-space: nowrap;
}

/* ==========================================================================
   Dark theme compatibility overrides for Bootstrap utility classes
   ========================================================================== */
.bg-white, .bg-light {
    background-color: var(--bg-panel) !important;
    color: var(--text) !important;
}

.text-dark, .text-black {
    color: var(--text) !important;
}

.border-light {
    border-color: var(--border) !important;
}

.card-header.bg-white, .card-header.bg-light {
    background-color: var(--bg-raised) !important;
    border-bottom: 1px solid var(--border) !important;
}

.btn-light {
    background-color: var(--bg-raised) !important;
    color: var(--text) !important;
    border-color: var(--border-strong) !important;
}
.btn-light:hover {
    background-color: var(--bg-hover) !important;
    color: #fff !important;
}

/* ==========================================================================
   Blazor Circuit Reconnect Modal — Cyberpunk / SteamOS Console Theme
   ========================================================================== */
#components-reconnect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#components-reconnect-modal.components-reconnect-hide {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
}

.reconnect-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 14, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.reconnect-dialog {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 440px;
    background: var(--bg-panel);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 25px rgba(91, 169, 207, 0.2);
    padding: 32px 28px;
    text-align: center;
    overflow: hidden;
    animation: reconnectSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.reconnect-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #5ba9cf, #0071e3);
}

@keyframes reconnectSlideIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.reconnect-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.reconnect-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reconnect-brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-bright);
    box-shadow: 0 0 8px var(--accent-bright);
}

.reconnect-brand-name {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-dim);
}

.reconnect-state-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(91, 169, 207, 0.12);
    border: 1px solid rgba(91, 169, 207, 0.25);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--accent-bright);
}

.badge-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-bright);
    animation: reconnectBlink 1.5s ease-in-out infinite;
}

@keyframes reconnectBlink {
    0%, 100% { opacity: 0.3; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* Visibilidade condicional dos 3 estados Blazor */
.reconnect-state {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .reconnect-state-trying {
    display: block;
}

#components-reconnect-modal.components-reconnect-failed .reconnect-state-failed {
    display: block;
}

#components-reconnect-modal.components-reconnect-rejected .reconnect-state-rejected {
    display: block;
}

/* Radar & Animacoes Visuais */
.reconnect-visual {
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-container {
    position: relative;
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(91, 169, 207, 0.2);
}

.radar-ring.ring-1 { width: 44px; height: 44px; }
.radar-ring.ring-2 { width: 64px; height: 64px; border-style: dashed; }
.radar-ring.ring-3 { width: 84px; height: 84px; animation: pulseRing 3s ease-out infinite; }

.radar-sweep {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(91, 169, 207, 0.35) 360deg);
    animation: radarSweep 2.2s linear infinite;
}

.radar-core {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-bright);
    box-shadow: 0 0 16px rgba(91, 169, 207, 0.3);
}

@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseRing {
    0% { transform: scale(0.7); opacity: 0.8; }
    100% { transform: scale(1.15); opacity: 0; }
}

.icon-warning-pulse, .icon-success-pulse {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.icon-warning-pulse {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.icon-success-pulse {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.reconnect-dialog h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.reconnect-desc {
    font-size: 13.5px;
    color: var(--text-dim);
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.reconnect-progress {
    height: 4px;
    background: var(--bg-inset);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
}

.reconnect-progress-bar {
    position: absolute;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
    animation: reconnectProgressSweep 1.8s ease-in-out infinite;
}

@keyframes reconnectProgressSweep {
    0% { left: -40%; }
    100% { left: 100%; }
}

.reconnect-subtext {
    font-size: 11.5px;
    color: var(--text-faint);
    line-height: 1.4;
}

.reconnect-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-reconnect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--accent);
    color: #0b0d10;
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn-reconnect:hover {
    background: var(--accent-bright);
    transform: translateY(-1px);
}

.btn-reconnect.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-reconnect.btn-success:hover {
    background: #059669;
}

.btn-reload {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-reload:hover {
    background: var(--bg-raised);
    color: #fff;
    border-color: var(--border);
}

/* Marcador de plataforma (Steam / Switch / Apple / futuras lojas) */
.plat-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, currentColor); margin-right: 6px; flex: none; }

/* Acessibilidade: pular direto para o conteudo */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 10px;
    z-index: 5000;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--accent);
    color: #0b0d10;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
}
.skip-link:focus { left: 14px; color: #0b0d10; text-decoration: none; }

/* 404 */
.notfound { max-width: 540px; margin: clamp(48px, 12vh, 140px) auto; text-align: center; padding: 0 var(--sp-4); }
.notfound-code {
    font-family: var(--font-data);
    font-size: 72px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    color: rgba(94, 182, 207, .35);
    margin-bottom: var(--sp-3);
}
.notfound h1 { margin: 0 0 8px; font-size: 24px; }
.notfound-body { color: var(--text-dim); font-size: 14px; margin: 0 0 var(--sp-4); }
.notfound-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Error boundary global */
.app-error {
    max-width: 560px;
    margin: clamp(48px, 12vh, 130px) auto;
    text-align: center;
    padding: var(--sp-5) var(--sp-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    background: var(--bg-panel);
    box-shadow: var(--shadow-md);
}
.app-error-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: var(--sp-3);
    border-radius: 50%;
    background: rgba(242, 109, 109, .12);
    border: 1px solid rgba(242, 109, 109, .42);
    color: var(--bad);
    font-family: var(--font-data);
    font-size: 22px;
    font-weight: 700;
}
.app-error h1 { margin: 0 0 8px; font-size: 22px; }
.app-error-body { color: var(--text-dim); font-size: 13.5px; margin: 0 0 var(--sp-4); }
.app-error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Tabelas largas: sombra lateral indica que ha mais colunas para rolar. */
.table-responsive {    background-image:
        linear-gradient(to right, var(--bg-panel) 30%, rgba(20, 24, 28, 0)),
        linear-gradient(to left, var(--bg-panel) 30%, rgba(20, 24, 28, 0)),
        radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0)),
        radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0));
    background-position: left center, right center, left center, right center;
    background-repeat: no-repeat;
    background-size: 30px 100%, 30px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

/* Toasts globais (sucesso/erro/info) */
.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(380px, calc(100vw - 36px));
    pointer-events: none;
}
.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    border: 1px solid var(--border-strong);
    background: var(--bg-raised);
    box-shadow: var(--shadow-md);
    font-size: 13px;
    color: var(--text);
    animation: toast-in .16s ease-out;
}
.toast-item.is-success { border-left: 3px solid var(--good); }
.toast-item.is-error { border-left: 3px solid var(--bad); }
.toast-item.is-info { border-left: 3px solid var(--accent); }
.toast-mark { flex: 0 0 auto; margin-top: 1px; color: var(--text-dim); }
.toast-item.is-success .toast-mark { color: var(--good); }
.toast-item.is-error .toast-mark { color: var(--bad); }
.toast-item.is-info .toast-mark { color: var(--accent-bright); }
.toast-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.toast-close {
    flex: 0 0 auto;
    padding: 2px;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--text-faint);
    cursor: pointer;
}
.toast-close:hover { color: var(--text); background: var(--bg-hover); }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
@media (max-width: 520px) {
    .toast-stack { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* Trilha contextual do estudio */
.studio-breadcrumb { margin: 0 0 var(--sp-3); }

/* Linha/cartao em foco pelos atalhos j/k (Apple Reviews, Google Play) */
.apple-review.is-keyboard-active,
.gp-review.is-keyboard-active {
    box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px rgba(94, 182, 207, .35);
}

/* Densidade compacta (preferencia global no topbar -> html.is-compact) */
html.is-compact .table td,
html.is-compact .table th { padding-top: .3rem; padding-bottom: .3rem; }
html.is-compact .card-body { padding: var(--sp-3); }
html.is-compact .stat { padding: var(--sp-3); }
html.is-compact .stat .stat-value { font-size: 22px; }
html.is-compact .section { margin-bottom: var(--sp-4); }
html.is-compact .page-head { margin-bottom: var(--sp-4); }
html.is-compact .brief-card { padding: var(--sp-2) var(--sp-3); }
html.is-compact .chart-box { height: 190px; }
html.is-compact .studio-nav { gap: var(--sp-2); }

/* ==========================================================================
   Command palette (Ctrl+K)
   ========================================================================== */
.cmdk-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    background: rgba(4, 7, 10, .62);
    backdrop-filter: blur(3px);
}
.cmdk-panel {
    width: 100%;
    max-width: 580px;
    overflow: hidden;
    background: var(--bg-panel);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}
.cmdk-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-faint);
}
.cmdk-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 15px;
}
.cmdk-input::placeholder { color: var(--text-faint); }
.cmdk-kbd {
    flex: 0 0 auto;
    padding: 1px 5px;
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    color: var(--text-faint);
    font-family: var(--font-data);
    font-size: 10px;
}
.cmdk-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.cmdk-group-label {
    padding: 10px 10px 4px;
    color: var(--text-faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.cmdk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text-dim);
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
}
.cmdk-item.is-active {
    background: var(--bg-accent-soft);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(94, 182, 207, .35);
}
.cmdk-item-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item-hint {
    margin-left: auto;
    color: var(--text-faint);
    font-family: var(--font-data);
    font-size: 10.5px;
    white-space: nowrap;
}
.cmdk-empty { padding: 22px 14px; text-align: center; color: var(--text-faint); font-size: 13px; }
.cmdk-foot {
    display: flex;
    gap: 14px;
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 10.5px;
}
@media (max-width: 520px) {
    .cmdk-overlay { padding: 8vh 10px 10px; }
    .cmdk-foot { display: none; }
}

/* ==========================================================================
   Game detail: hero, abas, graficos
   ========================================================================== */
.game-hero {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    align-items: flex-start;
    padding: var(--sp-4);
    background: var(--bg-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--sp-5);
}
.game-hero-cover {
    position: relative;
    width: 184px;
    aspect-ratio: 460 / 215;
    flex: 0 0 auto;
    border-radius: var(--r-md);
    overflow: hidden;
    background: linear-gradient(135deg, #1b2838, #2a475e);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.game-hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-hero-glyph { display: none; width: 100%; height: 100%; place-items: center; font-size: 28px; }
.game-hero-main { flex: 1 1 320px; min-width: 0; }
.game-hero-title { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); }
.game-hero-title h1 { margin: 0; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.game-hero-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.game-hero-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-3); }
.game-hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }

.chart-card-wide { grid-column: 1 / -1; }
.chart-card .chart-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chart-card .empty { margin-top: var(--sp-3); }
.section-head .sub { display: block; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: baseline; }
.legend-adds { background: #22c55e; }
.legend-removals { background: #ef4444; }

.deck-tab.tone-review .tab-dot { background: var(--signal-review); }
.deck-tab.tone-forum .tab-dot { background: var(--signal-forum); }
.deck-tab.tone-wish .tab-dot { background: var(--signal-wishlist); }
.deck-tab.tone-sales .tab-dot { background: var(--signal-sales); }
.deck-tab.tone-review.is-active { border-bottom-color: var(--signal-review); }
.deck-tab.tone-forum.is-active { border-bottom-color: var(--signal-forum); }
.deck-tab.tone-wish.is-active { border-bottom-color: var(--signal-wishlist); }
.deck-tab.tone-sales.is-active { border-bottom-color: var(--signal-sales); }

.deck-seg-item .seg-dot-bad { background: var(--bad); box-shadow: 0 0 6px rgba(242, 109, 109, .55); }
.breadcrumb .sep { color: var(--text-faint); }

.card-header h5 + .chart-sub { margin-top: 2px; }

@media (max-width: 720px) {
    .game-hero { padding: var(--sp-3); }
    .game-hero-cover { width: 100%; }
    .game-hero-actions { width: 100%; }
    .game-hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ==========================================================================
   Dashboard: briefing "resumo de hoje"
   ========================================================================== */
.briefing { margin-bottom: var(--sp-5); }
.briefing-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
    flex-wrap: wrap;
}
.briefing-title { margin: 0; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.briefing-sub { margin: 3px 0 0; font-size: 12px; color: var(--text-faint); }
.briefing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
    gap: var(--sp-3);
}
.brief-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: var(--sp-3) var(--sp-4);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-strong);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    min-width: 0;
    transition: background .12s ease, border-color .12s ease, transform .08s ease;
}
.brief-card:hover {
    background: var(--bg-raised);
    border-color: var(--border-strong);
    color: inherit;
    text-decoration: none;
    transform: translateY(-1px);
}
.brief-card.is-bad { border-left-color: var(--bad); }
.brief-card.is-warn { border-left-color: var(--warn); }
.brief-card.is-ok { border-left-color: var(--good); }
.brief-card.is-info { border-left-color: var(--accent); }
.brief-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.brief-value {
    font-family: var(--font-data);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.brief-value.is-text { font-size: 16px; font-weight: 650; }
.brief-card.is-bad .brief-value { color: var(--bad); }
.brief-card.is-warn .brief-value { color: var(--warn); }
.brief-card.is-ok .brief-value { color: var(--good); }
.brief-card.is-ok .brief-value.is-text { color: var(--good); }
.brief-card.is-info .brief-value { color: var(--accent-bright); }
.brief-note { font-size: 11.5px; color: var(--text-dim); }
.brief-cta {
    margin-top: auto;
    padding-top: 7px;
    font-size: 11.5px;
    font-weight: 650;
    color: var(--accent-bright);
}
.brief-card.is-bad .brief-cta { color: #ffb4b4; }
.brief-card.is-warn .brief-cta { color: #e9cd7e; }

/* Primeiros passos do estudio (setup incompleto) */
.onboarding {
    margin-bottom: var(--sp-5);
    padding: var(--sp-4);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-md);
    background: rgba(94, 182, 207, .03);
}
.onboarding-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-bottom: var(--sp-3);
}
.onboarding-head h2 {
    margin: 0;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.onboarding-sub { margin: 3px 0 0; font-size: 12px; color: var(--text-faint); }
.onboarding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: var(--sp-2);
}
.onboarding-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--bg-panel);
    color: var(--text-dim);
    font-size: 12.5px;
    text-decoration: none;
}
.onboarding-item:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }
.onboarding-check {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--good);
}
.onboarding-item.is-done { color: var(--text-faint); }
.onboarding-item.is-done .onboarding-check { border-color: rgba(111, 220, 116, .5); background: rgba(111, 220, 116, .12); }
.onboarding-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onboarding-go { margin-left: auto; color: var(--accent-bright); }
.briefing-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.briefing-pin { display: inline-flex; align-items: center; gap: 6px; color: var(--text-faint); }
.briefing-pin svg { flex: 0 0 auto; }
.briefing-pin .deck-select { height: 32px; max-width: 215px; font-size: 12px; }

@media (max-width: 720px) {
    .briefing-grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 85%;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .briefing-grid::-webkit-scrollbar { display: none; }
    .brief-card { scroll-snap-align: start; }
    .studio-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .studio-strip::-webkit-scrollbar { display: none; }
    .studio-strip-item { flex: 0 0 auto; }
}

/* ==========================================================================
   Studio dashboard - presenca nas lojas (banda de 4 + total)
   ========================================================================== */
.store-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: var(--sp-3);
    margin-bottom: var(--sp-5);
}
.store-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px 10px 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    text-decoration: none;
    color: inherit;
}
.store-chip::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--pc); }
.store-chip:hover { background: var(--bg-raised); text-decoration: none; }
.store-chip.is-off { opacity: .55; }
.store-chip-name { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); font-weight: 700; }
.store-chip-value { font-size: 19px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.store-chip-meta { font-size: 11px; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.store-chip-total { border-color: rgba(79,209,197,.35); }
.store-chip-total::before { background: var(--signal-sales); }

/* Dashboard do estudio - top jogos multi-loja */
.platform-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.stars-cell { color: var(--warn); letter-spacing: 1px; white-space: nowrap; }

/* ==========================================================================
   Auth (login / forgot / reset) - cabecalho publico e painel de formulario
   ========================================================================== */
.auth-shell {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: var(--sp-6);
    align-items: center;
}

.auth-story { padding-right: var(--sp-4); }
.auth-story-mark { display: inline-flex; margin-bottom: var(--sp-3); }
.auth-story-word { display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.auth-story-title { font-size: 30px; line-height: 1.18; letter-spacing: -.02em; margin: var(--sp-3) 0 var(--sp-3); }
.auth-story-text { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin: 0 0 var(--sp-4); max-width: 42ch; }
.auth-story-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.auth-story-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text-dim); line-height: 1.45; }
.auth-story-list svg { color: var(--ok, #46c07a); flex: 0 0 auto; margin-top: 2px; }

.signin-panel.auth-panel { text-align: left; padding: var(--sp-5) var(--sp-5) var(--sp-4); }
.auth-panel-mark { margin: 0 0 var(--sp-3); }
.auth-title { font-size: 21px; letter-spacing: -.015em; margin: 0; }
.signin-panel.auth-panel .signin-sub { margin-bottom: var(--sp-4); }

.auth-alert { display: flex; align-items: flex-start; gap: 8px; text-align: left; font-size: 13px; line-height: 1.45; }
.auth-alert svg { flex: 0 0 auto; margin-top: 1px; }
.auth-alert-ok { background: rgba(70, 192, 122, .1); border: 1px solid rgba(70, 192, 122, .38); color: #54d18b; }

.auth-field { margin-bottom: var(--sp-4); }
.auth-input { position: relative; display: block; }
.auth-input .form-control { width: 100%; padding-left: 34px; padding-top: 9px; padding-bottom: 9px; }
.auth-input-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.auth-input-password { padding-right: 38px; }
.auth-reveal {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center;
    width: 28px; height: 28px;
    background: transparent; border: 0; border-radius: var(--r-sm);
    color: var(--text-faint); cursor: pointer;
}
.auth-reveal:hover { color: var(--text); background: var(--bg-raised); }
.auth-reveal:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 1px; }

.auth-submit { margin-top: var(--sp-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.auth-links { margin-top: var(--sp-4); text-align: center; font-size: 13px; }
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { color: var(--accent-bright); text-decoration: underline; }
.auth-back { margin-top: var(--sp-4); text-align: center; font-size: 12.5px; }
.auth-back a { color: var(--text-faint); text-decoration: none; }
.auth-back a:hover { color: var(--text); }

.auth-account { display: flex; align-items: center; gap: 7px; margin: 0 0 var(--sp-3); font-size: 12.5px; color: var(--text-dim); font-family: var(--font-data); }
.auth-hint { text-align: left; font-size: 12.5px; color: var(--text-faint); line-height: 1.5; margin: var(--sp-3) 0; }

/* Landing publica (Home) */
.landing-hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: var(--sp-6);
    align-items: center;
    padding: var(--sp-5) 0 var(--sp-6);
}
.landing-kicker { margin: 0 0 6px; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.landing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }
.landing-actions .landing-note { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.landing-status-note { margin: 0; padding: 0 var(--sp-4) var(--sp-3); font-size: 11.5px; color: var(--text-faint); line-height: 1.5; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.status-pill.is-ok { color: var(--ok, #46c07a); }
.status-pill.is-bad { color: var(--bad, #f26d6d); }

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--sp-4);
    border-top: 1px solid var(--border);
    padding-top: var(--sp-5);
}
.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--sp-4);
}
.feature-card h2 { font-size: 14px; margin: 0 0 6px; letter-spacing: -.01em; }
.feature-card p { margin: 0; font-size: 12.8px; line-height: 1.55; color: var(--text-dim); }
.feature-ico {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    background: var(--bg-accent-soft);
    color: var(--accent-bright);
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 430px; }
    .auth-story { display: none; }
    .landing-hero { grid-template-columns: 1fr; }
    .landing-status { order: 2; }
}

/* ==========================================================================
   About dialog (topbar info button) - conteudo em ingles por decisao de produto
   ========================================================================== */
.about-panel {
    width: min(720px, calc(100vw - 32px));
    max-height: 86vh;
    padding: 0;
    overflow-y: auto;
}

.about-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-raised);
    z-index: 1;
}
.about-mark { margin: 0; flex: 0 0 auto; }
.about-head .modal-title { margin: 0; }
.about-sub {
    margin: 5px 0 0;
    font-size: 12.5px;
    color: var(--text-faint);
    line-height: 1.45;
}

.about-section { padding: 16px 22px 6px; }
.about-section:last-of-type { padding-bottom: 14px; }
.about-section h4 {
    margin: 0 0 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.about-grid {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 7px 16px;
    margin: 0;
}
.about-grid dt {
    font-size: 12.5px;
    color: var(--text-faint);
    font-weight: 500;
}
.about-grid dd {
    margin: 0;
    font-size: 12.8px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
}

.about-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    border: 1px solid transparent;
    font-family: var(--font-ui);
}
.about-pill.is-ok { color: #54d18b; background: rgba(70, 192, 122, .1); border-color: rgba(70, 192, 122, .35); }
.about-pill.is-bad { color: #f26d6d; background: rgba(242, 109, 109, .1); border-color: rgba(242, 109, 109, .35); }
.about-pill.is-dev { color: #f0b232; background: rgba(240, 178, 50, .1); border-color: rgba(240, 178, 50, .35); }

.about-db-version { color: var(--text-faint); font-size: 12px; }

.about-actions {
    padding: 14px 22px 18px;
    border-top: 1px solid var(--border);
    align-items: center;
    position: sticky;
    bottom: 0;
    background: var(--bg-raised);
}
.about-copied {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    font-size: 12px;
    color: #54d18b;
}

@media (max-width: 620px) {
    .about-grid { grid-template-columns: 1fr; gap: 2px 0; }
    .about-grid dt { margin-top: 9px; }
    .about-grid dt:first-of-type { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Configuracao de IA (AiSettings): passos, cards de sugestao e lista de models
   -------------------------------------------------------------------------- */
.ai-step { padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); }
.ai-step:first-child { padding-top: 0; }
.ai-step-head { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.ai-step-num {
    flex: 0 0 auto;
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: var(--bg-inset);
    color: var(--text-dim);
    font-size: 12px; font-weight: 600;
}
.ai-step-num.is-done { background: rgba(111,220,116,.12); border-color: rgba(111,220,116,.45); color: var(--good); }
.ai-step-title { font-size: 15px; font-weight: 600; margin: 2px 0 2px; color: var(--text); }
.ai-step-sub { font-size: 13px; color: var(--text-dim); margin: 0; }
.ai-step-body { padding-left: 38px; }

.ai-empty {
    padding: var(--sp-4);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-md);
    background: var(--bg-inset);
    color: var(--text-dim);
    font-size: 13px;
}

.ai-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-3); }
.ai-pick {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    text-align: left;
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-raised);
    color: var(--text);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ai-pick:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.ai-pick:focus-visible, .ai-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-pick.is-selected { border-color: var(--accent); background: var(--bg-accent-soft); }
.ai-pick-top { display: flex; width: 100%; align-items: center; min-height: 20px; }
.ai-pick-check, .ai-row-check { margin-left: auto; color: var(--accent-bright); font-weight: 700; }
.ai-pick-title { font-weight: 600; font-size: 14px; }
.ai-pick-desc { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.ai-pick-model { display: flex; flex-direction: column; font-size: 12px; margin-top: 2px; }
.ai-pick-model .mono, .ai-row-name .mono { color: var(--text-faint); font-size: 11px; word-break: break-all; }
.ai-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }

.ai-all { margin-top: var(--sp-4); }
.ai-all-toggle {
    background: none; border: 0; padding: 0;
    color: var(--accent); font-size: 13px; cursor: pointer;
}
.ai-all-toggle:hover { color: var(--accent-bright); text-decoration: underline; }
.ai-group { margin-top: var(--sp-3); }
.ai-group-head { font-size: 12px; margin-bottom: 6px; }
.ai-row {
    display: flex; align-items: center; gap: var(--sp-3);
    width: 100%;
    text-align: left;
    padding: 8px var(--sp-3);
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.ai-row + .ai-row { border-top-color: var(--border); border-radius: 0; }
.ai-row:hover { background: var(--bg-hover); }
.ai-row.is-selected { background: var(--bg-accent-soft); border-color: var(--accent); border-radius: var(--r-sm); }
.ai-row.is-muted { opacity: .6; }
.ai-row-check { order: 3; margin-left: 0; width: 14px; }
.ai-row-name { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; font-size: 13px; }

@media (max-width: 620px) {
    .ai-step-body { padding-left: 0; }
}
