/* ==========================================================================
   MigLu3D — tema claro / escuro
   ========================================================================== */
:root {
    --brand: #0d8bf2;
    --brand-strong: #0670c9;
    --brand-soft: #e6f3fe;
    --bg: #f3f6fa;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --surface-3: #eef2f7;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --ok: #059669;
    --ok-soft: #e7f8f0;
    --warn: #b45309;
    --warn-soft: #fff4e0;
    --danger: #dc2626;
    --danger-soft: #fdecec;
    --info: #0670c9;
    --info-soft: #e6f3fe;
    --violet: #7c3aed;
    --violet-soft: #f1ebfe;
    --idle: #64748b;
    --idle-soft: #f1f5f9;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .05);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, .18);
    --radius: 14px;
    --radius-sm: 10px;
    --sidebar-w: 236px;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --brand: #3aa0ff;
    --brand-strong: #6cb8ff;
    --brand-soft: #10263f;
    --bg: #0a101c;
    --surface: #111a2b;
    --surface-2: #151f33;
    --surface-3: #1b2740;
    --border: #22304a;
    --border-strong: #31415f;
    --text: #e6edf7;
    --text-2: #c3cede;
    --muted: #8b9ab3;
    --ok: #34d399;
    --ok-soft: #0f2a24;
    --warn: #fbbf24;
    --warn-soft: #2d230f;
    --danger: #f87171;
    --danger-soft: #331617;
    --info: #6cb8ff;
    --info-soft: #10263f;
    --violet: #a78bfa;
    --violet-soft: #221a3a;
    --idle: #8b9ab3;
    --idle-soft: #1b2740;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--text); }
body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--brand); }
.hidden { display: none !important; }
.mobile-only { display: none !important; }
@media (max-width: 900px) { .mobile-only { display: inline-flex !important; } .desktop-only { display: none !important; } }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    z-index: 30;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.sidebar .brand img { height: 40px; width: auto; border-radius: 8px; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.2px; }
.brand-sub { font-size: 11px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--text-2); text-decoration: none; font-weight: 600;
    position: relative;
}
.nav a:hover { background: var(--surface-3); }
.nav a.active { background: var(--brand-soft); color: var(--brand-strong); }
.nav .count {
    margin-left: auto; font-size: 11px; font-weight: 800;
    background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 7px;
}
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--brand); color: #fff; font-weight: 800;
    display: grid; place-items: center; flex-shrink: 0; font-size: 14px;
}
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 24px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.topbar .mobile-logo { display: none; height: 32px; border-radius: 6px; }
.page { padding: 20px 24px 40px; max-width: 1400px; margin: 0 auto; }
.bottom-nav { display: none; }

@media (max-width: 900px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .topbar { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
    .topbar h1 { font-size: 18px; }
    .topbar .mobile-logo { display: block; }
    .page { padding: 16px 16px 96px; }
    .bottom-nav {
        display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
        position: fixed; inset: auto 0 0 0; z-index: 30;
        background: var(--surface); border-top: 1px solid var(--border);
        padding: 6px 4px max(6px, env(safe-area-inset-bottom));
    }
    .bottom-nav a {
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none;
        padding: 4px 0; border-radius: 10px; position: relative;
    }
    .bottom-nav a.active { color: var(--brand); }
    .bottom-nav .count {
        position: absolute; top: 0; left: calc(50% + 6px);
        background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
        border-radius: 999px; padding: 0 5px; line-height: 16px;
    }
}

/* ---------------------------------------------------------------- botões */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    font-weight: 650; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { border-color: var(--brand); color: var(--brand-strong); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #04121f; }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
:root[data-theme="dark"] .btn.success { color: #04120c; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.icon-only { padding: 8px; }
.btn.sm.icon-only { padding: 6px; }
.btn.block { width: 100%; }
.btn .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- cards e grids */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.card.pad { padding: 16px; }
.section { margin-bottom: 26px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.section-head .sub { font-size: 13px; color: var(--muted); font-weight: 500; }
.grid { display: grid; gap: 14px; }
.grid > * { min-width: 0; }
.grid.kpis { grid-template-columns: repeat(4, 1fr); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.cards-sm { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .grid.kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) { .grid.two { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .grid.cards, .grid.cards-sm { grid-template-columns: 1fr; } }

.kpi { padding: 16px; display: flex; gap: 14px; align-items: flex-start; cursor: pointer; transition: border-color .15s; text-decoration: none; color: inherit; }
.kpi:hover { border-color: var(--brand); }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.kpi-value { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-sub { font-size: 12px; font-weight: 700; margin-top: 2px; }
@media (max-width: 500px) {
    .kpi { padding: 12px; gap: 10px; }
    .kpi-icon { width: 36px; height: 36px; }
    .kpi-value { font-size: 23px; }
}

.tone-info { background: var(--info-soft); color: var(--info); }
.tone-ok { background: var(--ok-soft); color: var(--ok); }
.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-idle { background: var(--idle-soft); color: var(--idle); }
.text-ok { color: var(--ok); } .text-warn { color: var(--warn); } .text-danger { color: var(--danger); } .text-info { color: var(--info); }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.pulse .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }

/* ---------------------------------------------------------------- barra de filtros */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search { position: relative; flex: 1; min-width: 180px; max-width: 360px; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px; }

/* ---------------------------------------------------------------- formulários */
.input, select.input, textarea.input {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
textarea.input { resize: vertical; min-height: 80px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
input[type="color"].input { padding: 4px; height: 42px; }

/* ---------------------------------------------------------------- modal */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(8, 13, 25, .55); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center; padding: 16px;
    animation: fade .15s ease-out;
}
.modal {
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
    box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px);
    display: flex; flex-direction: column; animation: pop .18s ease-out;
}
.modal.wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 17px; font-weight: 800; flex: 1; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (max-width: 560px) {
    .modal-backdrop { align-items: flex-end; padding: 0; }
    .modal { border-radius: 18px 18px 0 0; max-height: 92vh; }
}

/* ---------------------------------------------------------------- toasts */
#toasts { position: fixed; z-index: 200; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 12px;
    background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 12px;
    font-weight: 650; box-shadow: var(--shadow-lg); animation: pop .2s ease-out;
}
.toast.error { background: var(--danger); color: #fff; }
.toast button { background: transparent; border: 0; color: var(--brand); font-weight: 800; cursor: pointer; text-transform: uppercase; font-size: 12px; }
:root[data-theme="dark"] .toast button { color: var(--brand-strong); }
.toast.error button { color: #fff; }
@media (max-width: 900px) { #toasts { bottom: 84px; } }

/* ---------------------------------------------------------------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 50% -10%, var(--brand-soft), var(--bg)); }
.login-card { width: 100%; max-width: 380px; padding: 28px 24px; }
.login-card img { width: 170px; margin: 0 auto 8px; border-radius: 12px; }
.login-card h2 { text-align: center; font-size: 18px; margin-bottom: 4px; }
.login-card p.sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: 13px; }
.alert { padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13px; display: flex; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------- impressoras */
.printer-card { display: flex; flex-direction: column; overflow: hidden; }
.printer-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 10px; }
.printer-head h3 { font-size: 16px; font-weight: 800; }
.cam { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cam.on {
    position: relative; aspect-ratio: 16 / 9; background: #0b1220;
    display: grid; place-items: center; overflow: hidden;
}
.cam-open {
    width: 100%; border: 0; background: var(--surface-2); color: var(--muted);
    padding: 9px 16px; display: flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 650; font-size: 13px; cursor: pointer;
}
.cam-open:hover { background: var(--brand-soft); color: var(--brand-strong); }
.cam img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.cam img.preview { object-fit: contain; background: #fff; }
.cam .cam-badge { position: absolute; left: 8px; top: 8px; background: rgba(8, 13, 25, .75); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; display: flex; gap: 6px; align-items: center; }
.cam .cam-close { position: absolute; right: 8px; top: 8px; }
.cam-off { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #94a3b8; font-size: 12px; }
.printer-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); border-radius: 999px; transition: width .6s; }
.progress.ok > div { background: var(--ok); }
.progress.warn > div { background: var(--warn); }
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.stat-row span { display: inline-flex; gap: 5px; align-items: center; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slot { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.slot.active { border-color: var(--brand); background: var(--brand-soft); }
.slot.empty { opacity: .5; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); flex-shrink: 0; }
.slot span { font-size: 11.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.printer-foot { display: flex; gap: 6px; padding: 0 16px 14px; }
.printer-mini { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.printer-mini:hover { border-color: var(--brand); }

.big-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.big-stats > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.big-stats b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.big-stats small { color: var(--muted); font-weight: 600; font-size: 12px; }
@media (max-width: 560px) { .big-stats { grid-template-columns: repeat(2, 1fr); } }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- pedidos */
.order-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.order-items { display: flex; flex-direction: column; gap: 6px; }
.order-ids { display: flex; flex-direction: column; gap: 3px; }
.order-id { display: flex; align-items: baseline; gap: 8px; cursor: pointer; font-size: 13px; }
.order-id small { width: 58px; flex-shrink: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.order-id .mono { font-weight: 700; word-break: break-all; }
.order-id:hover .mono { color: var(--brand-strong); }
.track-end { font-size: 16px; font-weight: 800; color: var(--brand-strong); background: var(--brand-soft); border-radius: 6px; padding: 0 4px; margin-left: 2px; }
.order-item { display: flex; gap: 10px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 6px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; display: grid; place-items: center; color: var(--muted); }
.thumb.lg { width: 64px; height: 64px; border-radius: 12px; }
.qty { font-weight: 800; font-size: 15px; color: var(--brand-strong); min-width: 34px; text-align: center; }
.platform { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; letter-spacing: .3px; }
.pf-shopee { background: #fff0eb; color: #ee4d2d; }
.pf-ml { background: #fff9d6; color: #8a6d00; }
.pf-tiktok { background: #eef0f3; color: #111; }
.pf-manual { background: var(--violet-soft); color: var(--violet); }
.pf-other { background: var(--surface-3); color: var(--text-2); }
:root[data-theme="dark"] .pf-shopee { background: #3a1a12; color: #ff8a6b; }
:root[data-theme="dark"] .pf-ml { background: #352d07; color: #ffe066; }
:root[data-theme="dark"] .pf-tiktok { background: #232a36; color: #e6edf7; }

.toprint-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.toprint { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.toprint-n { font-size: 24px; font-weight: 800; color: var(--danger); line-height: 1; min-width: 34px; text-align: right; }
.toprint.done { opacity: .7; }
.toprint.done .toprint-n { color: var(--ok); }

.fila-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.fila-machine { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); min-width: 0; }
.fila-job { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); }
.fila-job.late .fila-n { background: var(--danger-soft); color: var(--danger); }
.fila-n { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; font-size: 12px; display: grid; place-items: center; flex-shrink: 0; margin-top: 8px; }

#avisos { position: fixed; z-index: 180; top: 68px; right: 16px; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.aviso { display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 14px; border: 1px solid currentColor; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .2s ease-out; }
.aviso b { font-size: 15px; }
.aviso .grow > div { color: var(--text); margin-top: 2px; }
.bell-count { position: absolute; top: 0; right: 0; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 0 5px; line-height: 16px; }

/* ---------------------------------------------------------------- estoque */
.prod-card { padding: 14px; display: flex; flex-direction: column; gap: 12px; border-left: 4px solid var(--border); }
.prod-card.danger { border-left-color: var(--danger); }
.prod-card.warning, .prod-card.low { border-left-color: var(--warn); }
.prod-card.ok { border-left-color: var(--ok); }
.prod-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.prod-numbers > div { background: var(--surface-2); border-radius: 10px; padding: 6px 4px; }
.prod-numbers b { display: block; font-size: 18px; font-weight: 800; }
.prod-numbers small { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 11px; overflow: hidden; }
.stepper button { border: 0; background: var(--surface); width: 38px; height: 36px; font-size: 18px; font-weight: 700; cursor: pointer; color: var(--text); }
.stepper button:hover { background: var(--brand-soft); color: var(--brand-strong); }
.stepper .val { min-width: 48px; text-align: center; font-weight: 800; font-size: 16px; cursor: pointer; border-left: 1px solid var(--border); border-right: 1px solid var(--border); height: 36px; line-height: 36px; padding: 0 6px; }
.fil-swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); flex-shrink: 0; }

/* ---------------------------------------------------------------- projetos (kanban) */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.column { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; scroll-snap-align: start; }
.column.drop { border-color: var(--brand); background: var(--brand-soft); }
.column-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-weight: 800; }
.column-head .n { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 0 8px; }
.proj-card { padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.proj-card:hover { border-color: var(--brand); }
.proj-card[draggable="true"] { cursor: grab; }
.proj-card h4 { font-size: 14px; font-weight: 750; }
.proj-card .cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.channel { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.ch-whatsapp { color: #16a34a; } .ch-instagram { color: #d6249f; } .ch-presencial { color: var(--info); } .ch-outro { color: var(--muted); }
@media (max-width: 900px) { .board { grid-auto-columns: 82vw; } }

/* ---------------------------------------------------------------- vazio / diversos */
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; margin: 0 auto 8px; opacity: .6; }
.empty b { display: block; color: var(--text-2); margin-bottom: 2px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.sync-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px; flex-wrap: wrap; }
.sync-bar > .grow { min-width: 200px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .9); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; color: #fff; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 12px; }
.banner { margin-bottom: 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- Radar de Virais */
.radar-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s; }
.radar-card:hover, .radar-card:focus-visible { border-color: var(--brand); outline: none; }
.radar-score { min-width: 40px; height: 32px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.radar-score.lg { min-width: 54px; height: 40px; font-size: 20px; }
.spark { width: 120px; height: 30px; flex-shrink: 0; }
.radar-sliders { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: center; }
.radar-sliders > label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.radar-sliders input[type=range] { width: 100%; accent-color: var(--brand); }
@media (max-width: 760px) { .radar-sliders { grid-template-columns: 1fr; } }
.radar-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; }
.radar-bars > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.radar-bars .bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.radar-bars .bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.radar-bars b { color: var(--text); grid-row: 1; grid-column: 2; }
.radar-h { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 6px; }
.radar-tips { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.radar-model { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
@media (max-width: 560px) { .radar-model { flex-wrap: wrap; } }
.radar-log { white-space: pre-wrap; font-size: 12px; max-height: 60vh; overflow: auto; background: var(--surface-3); padding: 12px; border-radius: 10px; }
.chart-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.chart-title { font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 11px; }
.chart .cross { stroke: var(--border-strong); stroke-width: 1; }
.chart-tip { position: absolute; top: 0; pointer-events: none; opacity: 0; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 8px; padding: 5px 8px; font-size: 12px; display: flex; flex-direction: column; min-width: 90px; transition: opacity .1s; }
.chart-tip span { color: var(--muted); }
.radar-model a.btn, .modal a.btn { text-decoration: none; }
