/* ===== Tokens =====
   Porcelain canvas, white surfaces, ink-navy text, one cobalt accent.
   The only dark, bold surface is the hero ("pulso") on the overview. */
:root {
  --bg: #f2f4f8;
  --panel: #ffffff;
  --panel-2: #f6f7fb;
  --fg: #151b36;
  --fg-muted: #5b6482;
  --line: #e2e6ef;
  --line-strong: #cdd3e1;
  --accent: #2b59ff;
  --accent-ink: #ffffff;
  --accent-soft: #e8edff;
  --side: #ffffff;
  --side-fg: #3d4566;
  --side-active: #eef1ff;
  --good: #0c8f61;
  --bad: #d93b41;
  --warn: #b26a00;
  --good-soft: #e2f5ed;
  --bad-soft: #fdecec;
  --warn-soft: #fff3df;
  --muted-bar: #c3c9d9;
  --hour-bar: #b9c7ff; --heat-0: #e3e9ff; --heat-empty: #f1f3f8;
  --grid: #edf0f6;
  --axis: #c8cede;
  --ref: #8790b0;
  --hero: #131a3a;
  --hero-2: #1b2350;
  --hero-fg: #eef1ff;
  --hero-muted: #97a1c8;
  --hero-line: #2a3364;
  --hero-accent: #7c9bff;
  --hero-good: #4fdc9f;
  --hero-bad: #ff8589;
  --shadow: 0 1px 2px rgba(21, 27, 54, .04), 0 2px 8px rgba(21, 27, 54, .04);
  --shadow-lg: 0 18px 48px rgba(21, 27, 54, .18);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --num: Bahnschrift, "DIN Alternate", "DIN 2014", "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1022; --panel: #141a33; --panel-2: #19203d; --fg: #e8ecfa; --fg-muted: #9aa3c4;
    --line: #252d4f; --line-strong: #323b62; --accent: #6f8fff; --accent-soft: #1d2650;
    --side: #10152b; --side-fg: #b9c1e0; --side-active: #1d2650; --good: #3ccf8e; --bad: #ff6b70; --warn: #f0a83a;
    --good-soft: #10291f; --bad-soft: #33161a; --warn-soft: #2e2311;
    --muted-bar: #46507a; --grid: #1f2645; --axis: #36406a; --ref: #8892b8;
    --hour-bar: #34418a; --heat-0: #1e2752; --heat-empty: #161c38;
    --hero: #0f1530; --hero-2: #161e45; --hero-line: #283163;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 12px/1.4 ui-monospace, Consolas, monospace; background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--fg-muted); }
.small { font-size: 12px; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.flat { color: var(--fg-muted); }
.note { color: var(--fg-muted); font-size: 12.5px; line-height: 1.5; }
.num { font-family: var(--num); }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--fg-muted); }

/* ===== Buttons & inputs ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--panel); color: var(--fg); cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--panel-2); border-color: var(--fg-muted); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); border-color: var(--accent); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: var(--bad); filter: brightness(1.08); }
.btn-danger-ghost { color: var(--bad); border-color: transparent; background: transparent; }
.btn-danger-ghost:hover { background: var(--bad-soft); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-block { width: 100%; padding: 11px; }
.icon-btn { border: 0; background: transparent; width: 32px; height: 32px; border-radius: var(--radius-sm); cursor: pointer; color: var(--fg-muted); font-size: 16px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--panel-2); color: var(--fg); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 10px; min-width: 0; width: 100%;
}
input[type=color] { width: 56px; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); padding: 2px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sel { width: auto !important; padding: 7px 30px 7px 10px !important; }
.search { width: 220px !important; max-width: 100%; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; cursor: pointer; color: var(--fg-muted); font-size: 13px; font-weight: 500; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--fg); font-weight: 650; box-shadow: 0 1px 2px rgba(21, 27, 54, .12); }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--fg-muted); }
.field-hint { font-size: 12px; color: var(--fg-muted); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.inline-form { display: grid; grid-template-columns: 160px 1fr 180px auto; gap: 10px; align-items: end; margin-bottom: 14px; }
@media (max-width: 720px) { .inline-form { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 180px; overflow: auto; }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13px; }
.row-gap { display: flex; gap: 10px; align-items: center; }
.row-gap.wrap { flex-wrap: wrap; }

/* ===== Login ===== */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.login-side { background: var(--hero); color: var(--hero-fg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-side p { font: 500 26px/1.3 var(--num); color: var(--hero-fg); max-width: 22ch; }
.login-main { display: grid; place-items: center; padding: 32px 20px; }
.login-form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-form h1 { font: 600 30px/1.2 var(--num); }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login-side { padding: 24px; gap: 14px; } .login-side p { font-size: 18px; } }
.brand { display: flex; align-items: center; gap: 10px; font: 600 16px/1 var(--num); color: var(--fg); letter-spacing: .2px; }
.login-side .brand { color: var(--hero-fg); }
.brand-lg { font-size: 22px; }

/* ===== Shell ===== */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-fg); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 20; }
.side .brand { padding: 4px 10px 22px; }
.nav { flex: 1; display: flex; flex-direction: column; gap: 18px; }
.nav-title { font-size: 12px; font-weight: 600; color: var(--fg-muted); padding: 0 10px 6px; opacity: .8; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--side-fg); font-size: 13.5px; text-decoration: none !important; position: relative; }
.nav-link:hover { background: var(--panel-2); color: var(--fg); }
.nav-link.active { background: var(--side-active); color: var(--accent); font-weight: 650; }
.nav-link.active::before { content: ''; position: absolute; left: -12px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-icon { width: 18px; text-align: center; opacity: .8; }
.side-user { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.side-user-info { flex: 1; display: flex; gap: 10px; align-items: center; color: var(--side-fg); text-decoration: none !important; min-width: 0; padding: 4px; border-radius: var(--radius-sm); }
.side-user-info:hover { background: var(--panel-2); }
.side-user-info b { display: block; color: var(--fg); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-info small { color: var(--fg-muted); font-size: 11.5px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--hero); color: var(--hero-fg); display: inline-grid; place-items: center; font: 600 14px/1 var(--num); flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 11px; background: var(--accent-soft); color: var(--accent); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 10px 28px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 62px; }
.page-title { font: 600 21px/1.2 var(--num); margin-right: auto; letter-spacing: .1px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.custom-range { display: flex; align-items: center; gap: 6px; }
.custom-range input { width: 140px !important; padding: 5px 8px !important; }
.menu-btn { display: none; }
.view { padding: 22px 28px 56px; display: flex; flex-direction: column; gap: 18px; max-width: 1560px; width: 100%; }
.scrim { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 15; }
  .menu-btn { display: inline-grid; }
  .top { padding: 10px 16px; }
  .view { padding: 16px 16px 40px; }
}

/* store picker, period picker and refresh */
.store-pick { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--panel); border-radius: 10px; padding: 0 4px 0 12px; }
.store-pick .sw { width: 10px; height: 10px; border-radius: 50%; }
.store-pick select { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 7px 28px 7px 0 !important; font-weight: 600; }
.period { position: relative; }
.period-more { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 240px; z-index: 30; }
.period-more button.opt { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.period-more button.opt:hover, .period-more button.opt[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.period-more .custom { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.period-more .custom .btn { grid-column: 1 / -1; }
.refresh { display: inline-flex; align-items: center; gap: 8px; }
.refresh-info { font-size: 12px; color: var(--fg-muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.live-dot.off { background: var(--muted-bar); box-shadow: none; }
.btn .spin { width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@media (max-width: 720px) { .refresh-info { display: none; } }

/* ===== Layout helpers ===== */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-2.tight { gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .grid-2-1, .grid-1-1 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 720px) { .toolbar-filters { margin-left: 0; } .toolbar-filters .sel, .toolbar-filters .search { flex: 1 1 140px; width: auto !important; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font: 600 16px/1.3 var(--num); letter-spacing: .1px; display: flex; align-items: center; gap: 6px; }
.card-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
h3.sub { font-size: 13px; margin-bottom: 6px; color: var(--fg-muted); font-weight: 600; }
.link-more { font-size: 13px; font-weight: 500; }

.loading { display: flex; align-items: center; gap: 10px; color: var(--fg-muted); padding: 40px 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { background: var(--bad-soft); color: var(--bad); padding: 16px; border-radius: var(--radius); }
.empty-state { background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 48px 24px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty-state h2 { font-size: 18px; }
.empty-state p { color: var(--fg-muted); max-width: 52ch; }
.banner { padding: 10px 14px; border-radius: 8px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); display: block; }
.banner.bad { background: var(--bad-soft); color: var(--bad); display: block; }
.banner.ok { background: var(--good-soft); color: var(--fg); }
.banner.ok > b { color: var(--good); }

/* ===== Summary & KPIs ===== */
.summary { display: flex; flex-direction: column; gap: 4px; }
.headline { font-size: 16px; line-height: 1.55; max-width: 110ch; color: var(--fg-muted); }
.headline b { color: var(--fg); font-weight: 650; }
.headline b.good { color: var(--good); } .headline b.bad { color: var(--bad); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); }
.kpis-big { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; box-shadow: var(--shadow); }
.kpi-label { font-size: 12.5px; color: var(--fg-muted); display: flex; gap: 5px; align-items: center; }
.hint { cursor: help; opacity: .65; font-size: 12px; }
.kpi-value { font: 600 24px/1.15 var(--num); letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-big .kpi-value { font-size: 28px; }
.kpi-foot { display: flex; gap: 6px; align-items: baseline; font-size: 12px; flex-wrap: wrap; }
.delta { font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.delta.good { color: var(--good); } .delta.bad { color: var(--bad); } .delta.flat { color: var(--fg-muted); }
.vs { color: var(--fg-muted); }
.kpi-spark { height: 34px; margin-top: 6px; }

/* ===== Charts ===== */
.chart { position: relative; width: 100%; }
.chart-svg { display: block; overflow: visible; }
.chart-empty { display: grid; place-items: center; min-height: 200px; color: var(--fg-muted); font-size: 13px; border: 1px dashed var(--line); border-radius: 8px; }
.tick-text { font-size: 11.5px; fill: var(--fg-muted); }
.grid-line { stroke: var(--grid); }
.axis-line { stroke: var(--axis); }
.ref-line { stroke: var(--ref); stroke-dasharray: 3 3; opacity: .7; }
.ref-line.goal { stroke-dasharray: 2 3; stroke-width: 1.5; opacity: 1; }
.ref-label { fill: var(--fg-muted); }
.ev-mark { fill: var(--warn); }
.line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.line.dash { stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linecap: butt; }
.bar { transition: opacity .15s; }
.dim { opacity: .3; }
.hover-rule { stroke: var(--axis); pointer-events: none; }
.dot { stroke: var(--panel); stroke-width: 2; pointer-events: none; }
.bubble { fill-opacity: .55; stroke: var(--panel); stroke-width: 1.5; cursor: pointer; transition: opacity .15s; }
.bubble.low { stroke: var(--bad); stroke-width: 2; }
.bubble-label { font-size: 11.5px; fill: var(--fg); pointer-events: none; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 7px 10px; font-size: 12px; min-width: 150px; max-width: 280px; }
.tip-head { color: var(--fg-muted); margin-bottom: 3px; font-weight: 600; }
.tip-line { display: flex; gap: 7px; align-items: center; }
.tip-name { flex: 1; color: var(--fg-muted); }
.tip-ev { color: var(--warn); margin-top: 4px; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }
.sw-dash { width: 16px; height: 0; border-top: 2px dashed; border-radius: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--fg-muted); }
.leg { display: inline-flex; gap: 6px; align-items: center; }
.events { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--fg-muted); }
.ev-dia { color: var(--warn); margin-right: 5px; font-weight: 600; }

.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb { display: flex; flex-direction: column; gap: 4px; }
.hb-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.hb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-val { font-weight: 600; white-space: nowrap; }
.hb-track { height: 8px; background: var(--grid); border-radius: 99px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: 99px; }
.hb-sub { font-size: 12px; color: var(--fg-muted); }

/* ===== Goals ===== */
.goals { display: flex; flex-direction: column; gap: 16px; }
.goal { display: flex; flex-direction: column; gap: 6px; }
.goal-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--fg-muted); }
.goal-head b { color: var(--fg); }
.goal-track { position: relative; height: 10px; background: var(--grid); border-radius: 99px; }
.goal-fill { height: 100%; border-radius: 99px; background: var(--accent); }
.goal-proj { position: absolute; top: 50%; width: 12px; height: 12px; transform: translate(-50%, -50%) rotate(45deg); border: 2px solid var(--panel); }
.goal-proj.ok { background: var(--good); } .goal-proj.no { background: var(--bad); }
.goal-sub { font-size: 12px; color: var(--fg-muted); }
.goal-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goal-tile { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--fg-muted); }
.goal-tile b { font-size: 19px; }
.goal-empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; color: var(--fg-muted); }

/* ===== Tables ===== */
.table-wrap { overflow: auto; margin: 0 -18px; padding: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { position: sticky; top: 0; background: var(--panel); text-align: left; font-weight: 600; font-size: 12px; color: var(--fg-muted); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; z-index: 1; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover td { background: var(--panel-2); }
.table tr[tabindex] { cursor: pointer; }
.table .num { text-align: right; white-space: nowrap; }
.table tr.inactive td { opacity: .55; }
.table tr.current th, .table tr.current td { background: var(--accent-soft); }
.sortable { cursor: pointer; user-select: none; }
.sortable::after { content: ' ↕'; opacity: .3; }
.sortable[aria-sort=descending]::after { content: ' ↓'; opacity: 1; }
.sortable[aria-sort=ascending]::after { content: ' ↑'; opacity: 1; }
.empty-cell { text-align: center; color: var(--fg-muted); padding: 28px !important; }
.cellbar { display: inline-block; width: 46px; height: 6px; margin-right: 8px; vertical-align: middle; border-radius: 99px; background: linear-gradient(to right, var(--c, var(--muted-bar)) var(--w), var(--grid) var(--w)); }
.store-cell, .camp { display: inline-flex; align-items: center; gap: 8px; }
.camp { min-width: 220px; }
.roas { display: inline-flex; align-items: center; gap: 8px; }
.roasbar { position: relative; width: 54px; height: 8px; border-radius: 99px; background: var(--grid); }
.roasbar::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 99px; background: currentColor; }
.roasbar::after { content: ''; position: absolute; top: -3px; bottom: -3px; left: var(--goal); width: 2px; background: var(--fg); }
.roasbar.good { color: var(--good); } .roasbar.mid { color: var(--warn); } .roasbar.bad { color: var(--bad); }
.cell-input { width: 100% !important; min-width: 84px; padding: 5px 8px !important; text-align: right; }
.goals-table td, .goals-table th { padding: 5px 6px; }
.pct-pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-weight: 600; font-size: 12px; }
.pct-pill.good { background: var(--good-soft); color: var(--good); } .pct-pill.bad { background: var(--bad-soft); color: var(--bad); } .pct-pill.flat { background: var(--panel-2); color: var(--fg-muted); }
@media (max-width: 720px) { .hide-sm { display: none; } }

.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.badge.ok { color: var(--good); } .badge.muted { color: var(--fg-muted); }
.pill { display: inline-block; font-size: 11.5px; padding: 0 8px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--fg-muted); white-space: nowrap; }

/* ===== Insights ===== */
.insights { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow: auto; }
.insight { display: flex; gap: 14px; justify-content: space-between; border: 1px solid var(--line); border-left: 3px solid var(--p); border-radius: 8px; padding: 11px 13px; background: var(--panel); }
.insight h3 { font-size: 14px; margin: 4px 0 3px; }
.insight p { color: var(--fg-muted); font-size: 13px; }
.insight-tags { display: flex; gap: 6px; }
.insight-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; justify-content: space-between; flex: none; }
.impact { text-align: right; } .impact small { display: block; font-size: 11px; color: var(--fg-muted); } .impact b { color: var(--good); }
@media (max-width: 640px) { .insight { flex-direction: column; } .insight-side { flex-direction: row; align-items: center; } }
.pri-alta { --p: var(--bad); } .pri-media { --p: var(--warn); } .pri-baixa { --p: var(--good); }
.badge.pri { color: var(--p); }

.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.mini-stat { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; color: var(--fg-muted); font-size: 12px; text-decoration: none !important; }
a.mini-stat:hover { border-color: var(--line-strong); background: var(--panel-2); }
.mini-stat b { font: 600 26px/1.1 var(--num); color: var(--fg); }
.mini-stat.bad b { color: var(--bad); }

.plat-mini { display: flex; flex-direction: column; gap: 8px; }
.plat-row { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 8px; color: var(--fg); text-decoration: none !important; }
.plat-row:hover { background: var(--panel-2); }
.plat-row small { display: block; color: var(--fg-muted); font-size: 11px; }
.plat-name { display: flex; gap: 8px; align-items: center; font-weight: 600; }
@media (max-width: 640px) { .plat-row { grid-template-columns: 1fr 1fr; } }

/* ===== Mídia ===== */
.plat-card { border-top: 3px solid var(--c); }
.plat-head { display: flex; gap: 12px; align-items: center; }
.plat-head h2 { font-size: 16px; }
.plat-logo { width: 38px; height: 38px; border-radius: 9px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.metric { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.metric-label { font-size: 11.5px; color: var(--fg-muted); }
.metric-val { font-size: 16px; white-space: nowrap; }
.sim { display: flex; flex-direction: column; gap: 16px; }
.sim-controls { display: flex; flex-direction: column; gap: 12px; }
.slider { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.slider > span { display: flex; align-items: center; gap: 7px; }
.slider > span b { margin-left: auto; }
.slider input { width: 100%; accent-color: var(--accent); }
.sim-controls .btn { align-self: flex-start; }
.sim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.sim-cell { border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; font-size: 12px; color: var(--fg-muted); }
.sim-cell b { font-size: 17px; color: var(--fg); }
.sim-cell small { font-weight: 600; }
.sim-lines { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--fg-muted); margin-top: 8px; }
.sim-line { display: flex; gap: 6px; align-items: center; }
.sim-line b { color: var(--fg); }

/* ===== Funil ===== */
.funnel { display: flex; flex-direction: column; gap: 3px; }
.fn-row { display: grid; grid-template-columns: minmax(150px, 190px) 1fr minmax(90px, auto); gap: 14px; align-items: center; padding: 7px 9px; border-radius: 8px; }
.fn-row.worst { background: var(--bad-soft); }
.fn-label { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
.fn-num { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 11px; color: var(--fg-muted); flex: none; }
.fn-bars { display: flex; flex-direction: column; gap: 3px; }
.fn-bar { height: 22px; border-radius: 5px; }
.fn-bar-prev { height: 4px; border-radius: 4px; background: var(--muted-bar); }
.fn-vals { text-align: right; display: flex; flex-direction: column; }
.fn-vals b { font-size: 16px; }
.fn-between { font-size: 12.5px; color: var(--fg-muted); padding: 1px 9px 1px 39px; display: flex; gap: 5px; flex-wrap: wrap; align-items: baseline; }
.fn-between b { color: var(--fg); }
.fn-between.worst b { color: var(--bad); }
.fn-arrow { color: var(--fg-muted); }
.flag { color: var(--bad); border: 1px solid currentColor; border-radius: 99px; padding: 0 8px; font-weight: 600; font-size: 11.5px; }
@media (max-width: 640px) { .fn-row { grid-template-columns: 1fr auto; } .fn-bars { grid-column: 1 / -1; grid-row: 2; } }
.movers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.movers li { display: flex; justify-content: space-between; gap: 10px; }

/* ===== Tarefas ===== */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.col { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; transition: background .15s, border-color .15s; }
.col.drop { border-color: var(--accent); background: var(--accent-soft); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.col-head h2 { font-size: 13.5px; }
.count { font-size: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 0 9px; color: var(--fg-muted); }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.col-empty { font-size: 12.5px; color: var(--fg-muted); padding: 10px 4px; }
.task { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--p); border-radius: 8px; padding: 10px 11px; cursor: grab; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.task:hover { border-color: var(--line-strong); border-left-color: var(--p); }
.task.dragging { opacity: .45; }
.task h3 { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.task-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.task-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.task-edit { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 820px) { .task-edit { grid-template-columns: 1fr; } }
.comments-box { display: flex; flex-direction: column; gap: 10px; border-left: 1px solid var(--line); padding-left: 20px; }
@media (max-width: 820px) { .comments-box { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; } }
.comments-box h3 { font-size: 13.5px; }
.comments { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; }
.comment { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.comment.system { background: transparent; padding: 0 2px; font-size: 12px; color: var(--fg-muted); }
.comment.system .comment-head b { display: none; }
.comment-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 2px; }
.comment p { white-space: pre-wrap; }
.comment-new { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* ===== Importar ===== */
.kind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.kind { text-align: left; border: 1px solid var(--line-strong); background: var(--panel); border-radius: 9px; padding: 11px 13px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.kind span { font-size: 12px; color: var(--fg-muted); }
.kind:hover { border-color: var(--fg-muted); }
.kind[aria-checked=true] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cols-list { display: flex; gap: 6px; flex-wrap: wrap; }
.cols-list code.req { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.drop { border: 2px dashed var(--line-strong); border-radius: 10px; padding: 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.has-file { border-style: solid; border-color: var(--good); }
.drop-icon { font-size: 26px; color: var(--accent); }
.tips ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.urls { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.urls li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.urls code { font-size: 14px; padding: 4px 8px; }

/* ===== Modal & toasts ===== */
.modal-back { position: fixed; inset: 0; background: rgba(10, 14, 22, .45); display: grid; place-items: center; padding: 16px; z-index: 100; animation: fade .12s; }
.modal { background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .15s; }
.modal-wide { width: min(980px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 16px 20px; overflow: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.modal-foot .btn-danger-ghost { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.99); } }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--fg); color: var(--panel); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 380px; transition: opacity .3s, transform .3s; }
.toast-error { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 1100px) { .kpis-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plat-row b { white-space: nowrap; }

/* ===== Integrações ===== */
.int-card { border-top: 3px solid var(--c); }
.badge.bad-badge { color: var(--bad); }
.pill.warn-pill { color: var(--warn); border-color: var(--warn); margin-left: 6px; }
.warn-text { color: var(--warn); }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row code { font-size: 12.5px; padding: 5px 8px; word-break: break-all; }
.guide { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); padding: 10px 14px; }
.guide summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.guide ol { margin: 10px 0 2px; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; font-size: 13px; line-height: 1.5; }
.guide code { font-size: 11.5px; word-break: break-all; }
.sync-grid { display: grid; grid-template-columns: minmax(180px, 220px) auto minmax(0, 1fr); gap: 14px; align-items: end; }
.sync-grid input[type=date] { width: 150px !important; }
@media (max-width: 900px) { .sync-grid { grid-template-columns: 1fr; } }
.sync-live { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel-2); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.sync-live.running { border-color: var(--accent); }
.sync-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; max-height: 170px; overflow: auto; }
details > summary { cursor: pointer; }
.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }

/* ===== Atualização automática ===== */
.update-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 300; display: flex; gap: 12px; align-items: center; background: var(--fg); color: var(--panel); padding: 10px 12px 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; }
.offline-pill { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; gap: 8px; align-items: center; background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); padding: 6px 12px; border-radius: 99px; font-size: 12.5px; }

/* ===== Hero (Visão geral) — the one bold surface ===== */
.hero { background: var(--hero); color: var(--hero-fg); border-radius: var(--radius-lg); padding: 24px 26px 0; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 20px 40px -24px rgba(19, 26, 58, .55); position: relative; overflow: hidden; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.hero-head { display: flex; flex-direction: column; gap: 2px; }
.hero-title { color: var(--hero-muted); font-size: 14px; }
.hero-title::first-letter { text-transform: uppercase; }
.hero-value { font: 600 clamp(40px, 5.4vw, 64px)/1.02 var(--num); letter-spacing: -.5px; color: #fff; font-variant-numeric: tabular-nums; }
.hero-delta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--hero-muted); font-size: 13px; margin-top: 4px; }
.hd-chip { font: 600 13px/1 var(--num); padding: 5px 9px; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.hd-chip.good { color: var(--hero-good); background: rgba(79, 220, 159, .12); }
.hd-chip.bad { color: var(--hero-bad); background: rgba(255, 133, 137, .12); }
.hd-chip.flat { color: var(--hero-muted); }
.hero-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hero-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--hero-muted); }
.hero-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hl-cur::before { content: ''; width: 16px; height: 3px; border-radius: 2px; background: var(--hero-accent); }
.hl-prev::before { content: ''; width: 16px; border-top: 2px dashed var(--hero-muted); }
.hero-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.hero-seg:empty { display: none; }
.hero-seg button { border: 0; background: none; color: var(--hero-muted); padding: 5px 10px; border-radius: 7px; cursor: pointer; font-size: 12.5px; }
.hero-seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.hero-chart { position: relative; min-height: 300px; margin: 4px -6px 0; }
.hero-hint { color: var(--hero-muted); font-size: 12px; min-height: 18px; opacity: .85; }
.hero-tabs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); margin: 14px -26px 0; border-top: 1px solid var(--hero-line); }
.hero-tab { background: none; border: 0; border-right: 1px solid var(--hero-line); color: var(--hero-fg); text-align: left; padding: 14px 12px 16px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; position: relative; min-width: 0; transition: background .15s; }
.hero-tab:last-child { border-right: 0; }
.hero-tab:hover { background: rgba(255, 255, 255, .04); }
.hero-tab[aria-selected="true"] { background: var(--hero-2); }
.hero-tab[aria-selected="true"]::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--hero-accent); }
.ht-label { font-size: 12px; color: var(--hero-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-value { font: 600 clamp(15px, 1.3vw, 19px)/1.2 var(--num); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.ht-delta { font: 600 12px/1.3 var(--num); }
.ht-delta.good { color: var(--hero-good); } .ht-delta.bad { color: var(--hero-bad); } .ht-delta.flat { color: var(--hero-muted); }
@media (max-width: 1180px) { .hero-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); } .hero-tab:nth-child(5n) { border-right: 0; } .hero-tab:nth-child(-n+5) { border-bottom: 1px solid var(--hero-line); } }
@media (max-width: 560px) { .hero { padding: 18px 16px 0; } .hero-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px -16px 0; } .hero-tab:nth-child(2n) { border-right: 0; } .hero-tab { border-bottom: 1px solid var(--hero-line); } .hero-tools { align-items: flex-start; } }
.hero-svg .hgrid { stroke: rgba(255, 255, 255, .07); }
.hero-svg .htick { font-size: 11.5px; fill: var(--hero-muted); }
.hero-svg .hline { fill: none; stroke: var(--hero-accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.hero-svg .hline-prev { fill: none; stroke: var(--hero-muted); stroke-width: 1.5; stroke-dasharray: 4 5; opacity: .75; }
.hero-svg .hrule { stroke: rgba(255, 255, 255, .35); pointer-events: none; }
.hero-svg .hdot { fill: var(--hero-accent); stroke: var(--hero); stroke-width: 2.5; pointer-events: none; }
.hero-svg .hdot-prev { fill: var(--hero); stroke: var(--hero-muted); stroke-width: 2; pointer-events: none; }
.hero-svg .hdot-small { fill: var(--hero-accent); opacity: .7; pointer-events: none; }
.hero-svg .hdot-last { fill: #fff; stroke: var(--hero-accent); stroke-width: 3; pointer-events: none; }
.hero-svg .hev-line { stroke: rgba(255, 255, 255, .18); stroke-dasharray: 2 4; }
.hero-svg .hbrush .selection { fill: var(--hero-accent); fill-opacity: .16; stroke: var(--hero-accent); stroke-opacity: .6; }
.chart-empty.dark { color: var(--hero-muted); border-color: var(--hero-line); min-height: 260px; }
.tip.tip-dark { background: #0b1029; border-color: #2c3567; color: var(--hero-fg); }
.tip-dark .tip-head, .tip-dark .tip-name { color: var(--hero-muted); }
.tip-delta { font: 600 12px/1.6 var(--num); }
.tip-delta.up { color: var(--hero-good); } .tip-delta.down { color: var(--hero-bad); }
.tip-hint { margin-top: 4px; font-size: 11px; color: var(--hero-muted); opacity: .8; }

/* secondary metrics: one strip, not a wall of cards */
.strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.strip-item { padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); min-width: 0; }
.strip-item:last-child { border-right: 0; }
.strip-label { font-size: 12.5px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-item b { font: 600 21px/1.2 var(--num); }
@media (max-width: 1100px) { .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .strip-item:nth-child(3n) { border-right: 0; } .strip-item:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip-item { border-bottom: 1px solid var(--line); } .strip-item:nth-child(3n) { border-right: 1px solid var(--line); } .strip-item:nth-child(2n) { border-right: 0; } }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.plat-row b { font-family: var(--num); }
.goal-tile b, .fn-vals b, .metric-val, .sim-cell b, .mini-stat b, .goal-head span { font-family: var(--num); }
.store-pick select { width: auto !important; max-width: 220px; }
.grid-3 .plat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 6px; }
.grid-3 .plat-name { grid-column: 1 / -1; }
.sync-grid { grid-template-columns: repeat(auto-fill, minmax(220px, max-content)); align-items: end; }
.sync-grid .row-gap input[type=date] { width: 150px !important; }

/* ===== Icons ===== */
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.ic-sm { width: 15px; height: 15px; vertical-align: -2px; }
.nav-icon.ic { width: 18px; opacity: .85; }
.nav-link.active .nav-icon { opacity: 1; }
.btn .ic { width: 16px; height: 16px; }
.ic-chip { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; flex: none; }
.ic-chip .ic { width: 18px; height: 18px; }
.card-title { display: flex; gap: 12px; align-items: flex-start; }
.card-title > div { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.more-btn { display: inline-flex !important; align-items: center; gap: 5px; }
.more-btn .ic { width: 15px; height: 15px; }
.ht-label { display: inline-flex; align-items: center; gap: 6px; }
.ht-label .ic { opacity: .75; }
.strip-label { display: inline-flex; align-items: center; gap: 6px; }
.strip-label .ic { color: var(--accent); opacity: .85; }
h3.sub { display: flex; align-items: center; gap: 6px; }
.brand img { border-radius: 8px; }

/* ===== Vendas por canal ===== */
.chan-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--grid); }
.chan-bar span { display: block; height: 100%; min-width: 3px; }
.chan-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.chan { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.chan-dot { width: 10px; height: 10px; border-radius: 50%; }
.chan-name, .chan-val { display: flex; flex-direction: column; min-width: 0; }
.chan-name small, .chan-val small { color: var(--fg-muted); font-size: 12px; }
.chan-val { text-align: right; align-items: flex-end; }
.chan-val b { font-size: 17px; }

/* ===== Diagnóstico ===== */
.health { gap: 18px; }
.health-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.health-form { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 360px; justify-content: flex-end; }
.health-form input { max-width: 340px; }
.rings { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .rings { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .rings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ring { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 6px; border-radius: 12px; background: var(--panel-2); }
.ring-box { position: relative; width: 78px; height: 78px; }
.ring-svg { width: 78px; height: 78px; }
.ring-bg { fill: none; stroke: var(--grid); stroke-width: 6; }
.ring-fg { fill: none; stroke-width: 6; stroke-linecap: round; }
.ring-val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; font-weight: 600; }
.ring b { font-size: 13px; margin-top: 4px; }
.ring small { font-size: 11.5px; color: var(--fg-muted); }
.ring-good .ring-fg { stroke: var(--good); } .ring-good .ring-val { color: var(--good); }
.ring-mid .ring-fg { stroke: #e08a00; } .ring-mid .ring-val { color: var(--warn); }
.ring-bad .ring-fg { stroke: var(--bad); } .ring-bad .ring-val { color: var(--bad); }
.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.vital { border: 1px solid var(--line); border-left: 4px solid var(--muted-bar); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; gap: 1px; }
.vital small { color: var(--fg-muted); font-size: 12px; }
.vital b { font-size: 20px; }
.vital span { font-size: 12px; font-weight: 600; }
.vital-good { border-left-color: var(--good); } .vital-good span { color: var(--good); }
.vital-mid { border-left-color: #e08a00; } .vital-mid span { color: var(--warn); }
.vital-bad { border-left-color: var(--bad); } .vital-bad span { color: var(--bad); }
.opps, .checks-list { display: flex; flex-direction: column; gap: 8px; }
.opp { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 10px; align-items: center; font-size: 13px; }
.opp-bar { height: 6px; border-radius: 99px; background: var(--grid); overflow: hidden; }
.opp-bar span { display: block; height: 100%; background: var(--bad); border-radius: 99px; }
.chk { display: grid; grid-template-columns: 18px 1fr; gap: 2px 8px; font-size: 13px; align-items: start; }
.chk small { grid-column: 2; color: var(--fg-muted); font-size: 12px; }
.chk.ok .ic { color: var(--good); } .chk.no .ic { color: var(--warn); }
.grid.tight-2 { gap: 22px; }
.diag-recs { display: flex; flex-direction: column; gap: 10px; }
.diag-rec { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel); }
.diag-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--p) 12%, transparent); color: var(--p); }
.diag-main h3 { font-size: 14.5px; margin: 4px 0 3px; }
.diag-main p { color: var(--fg-muted); font-size: 13px; }
@media (max-width: 640px) { .diag-rec { grid-template-columns: 34px minmax(0, 1fr); } .diag-rec .insight-side { grid-column: 1 / -1; flex-direction: row; align-items: center; } .diag-ic { width: 34px; height: 34px; } }
.prod-cell { display: inline-flex; align-items: center; gap: 8px; min-width: 200px; }
.flag-ic { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; flex: none; }
.flag-ic.bad { background: var(--bad-soft); color: var(--bad); } .flag-ic.warn { background: var(--warn-soft); color: var(--warn); } .flag-ic.good { background: var(--good-soft); color: var(--good); }
.page-cell { display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.abc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.abc-col { border-radius: 12px; padding: 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 2px; }
.abc-letter { font-size: 26px; font-weight: 700; line-height: 1; }
.abc-A .abc-letter { color: var(--accent); } .abc-B .abc-letter { color: #e08a00; } .abc-C .abc-letter { color: var(--fg-muted); }
.abc-col small { color: var(--fg-muted); font-size: 12px; }
.abc-bar { height: 6px; border-radius: 99px; background: var(--grid); overflow: hidden; margin: 6px 0 2px; }
.abc-bar span { display: block; height: 100%; background: currentColor; }
.abc-A .abc-bar { color: var(--accent); } .abc-B .abc-bar { color: #e08a00; } .abc-C .abc-bar { color: var(--muted-bar); }
.dev-grid { display: grid; gap: 12px; }
.dev { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.dev-head { display: flex; align-items: center; gap: 8px; }
.dev-head .ic { color: var(--accent); }
.dev-head .muted { margin-left: auto; font-size: 12.5px; }
.dev-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dev-stats > div { display: flex; flex-direction: column; }
.dev-stats small { color: var(--fg-muted); font-size: 12px; }
.dev-stats b { font-size: 19px; }
.ref-list { display: flex; flex-direction: column; gap: 16px; }
.ref { display: flex; flex-direction: column; gap: 6px; }
.ref-head { display: flex; justify-content: space-between; font-size: 13px; }
.ref-head b { font-size: 17px; }
.ref-track { position: relative; height: 10px; background: var(--grid); border-radius: 99px; }
.ref-band { position: absolute; top: 0; bottom: 0; background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); border-radius: 99px; }
.ref-dot { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--panel); transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(0,0,0,.25); }

/* ===== Phones ===== */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bn-link { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--fg-muted); text-decoration: none !important; border: 0; background: none; padding: 4px 0; cursor: pointer; font-family: inherit; }
  .bn-link .ic { width: 22px; height: 22px; }
  .bn-link.active { color: var(--accent); font-weight: 650; }
  .menu-btn { display: none !important; }
  .top { padding: 10px 14px 8px; gap: 8px; }
  .page-title { font-size: 19px; }
  .filters { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .store-pick { min-width: 0; }
  .store-pick select { max-width: none; width: 100% !important; }
  .refresh .btn-text { display: none; }
  .refresh .btn { padding: 7px 10px; }
  .period { grid-column: 1 / -1; order: 3; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .period::-webkit-scrollbar { display: none; }
  .period .seg { flex-wrap: nowrap; white-space: nowrap; }
  .period-more { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .view { padding: 14px 12px 28px; gap: 14px; }
  .hero { border-radius: 16px; padding: 18px 16px 0; }
  .hero-value { font-size: 42px; }
  .hero-top { gap: 8px; }
  .hero-tools { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .hero-chart { min-height: 220px; }
  .hero-hint { display: none; }
  .hero-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 10px -16px 0; }
  .hero-tabs::-webkit-scrollbar { display: none; }
  .hero-tab { flex: 0 0 42%; scroll-snap-align: start; border-bottom: 0 !important; border-right: 1px solid var(--hero-line) !important; padding: 12px 14px 14px; }
  .card { padding: 16px; border-radius: 14px; }
  .card-head h2 { font-size: 15.5px; }
  .ic-chip { width: 30px; height: 30px; border-radius: 9px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); left: 12px; right: 12px; }
  .update-bar { bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .modal-back { align-items: end; padding: 0; }
  .modal { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .health-form { justify-content: stretch; }
  .health-form input { max-width: none; }
}
@media (display-mode: standalone) { .top { padding-top: max(10px, env(safe-area-inset-top)); } }

/* ---------- Pedidos por hora ---------- */
.hb-bar { fill: var(--hour-bar); transition: opacity .15s; }
.hb-bar.best { fill: var(--accent); }
.hb-bar.future { opacity: .35; }
.hb.dim .hb-bar { opacity: .35; }
.heat-cell { transition: opacity .15s; }
.heat-cell.dim { opacity: .45; }
.hours-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 2px 0 14px; }
.hours-summary > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hours-summary span { font-size: 12px; color: var(--fg-muted); }
.hours-summary b { font-size: 18px; }
.hours-summary small { font-size: 12px; color: var(--fg-muted); }
.hours-summary .best b { color: var(--accent); }
.hours-head-tools { display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) { .hours-summary { grid-template-columns: 1fr 1fr; } .hours-summary > div:last-child { grid-column: span 2; } }

/* ---------- Precificação ---------- */
.pr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pr-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; }
.pr-store { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-muted); }
.pr-store select { min-width: 200px; }
.pr-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--fg); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-size: 13.5px; }
.pr-banner > .ic { color: var(--accent); flex: none; }
.pr-banner > div { flex: 1; }
.pr-banner.soft { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.pr-banner.soft > .ic { color: var(--warn); }
.pr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pr-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; box-shadow: var(--shadow); }
.pr-tile-l { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--fg-muted); }
.pr-tile b { font-size: 22px; font-family: var(--num); }
.pr-tile small { font-size: 12px; color: var(--fg-muted); }
.pr-tile.bad b { color: var(--bad); } .pr-tile.good b { color: var(--good); } .pr-tile.warn b { color: var(--warn); }
.pr-prod { display: flex; flex-direction: column; min-width: 0; }
.pr-prod small { color: var(--fg-muted); font-size: 12px; }
.m-chip { display: inline-block; min-width: 58px; text-align: right; font: 600 13px var(--num); padding: 2px 8px; border-radius: 99px; }
.m-chip.good { color: var(--good); background: var(--good-soft); }
.m-chip.warn { color: var(--warn); background: var(--warn-soft); }
.m-chip.bad { color: var(--bad); background: var(--bad-soft); }
.pr-how p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; color: var(--fg-muted); }
.pr-how b { color: var(--fg); }
.pr-sold { display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow: auto; margin-top: 10px; }
.pr-sold-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.pr-sold-item:hover { background: var(--panel-2); }
.pr-sold-item span { display: flex; flex-direction: column; }
.pr-sold-item small { color: var(--fg-muted); font-size: 12px; }

/* inputs with R$ / % */
.num-in { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); overflow: hidden; width: 150px; flex: none; }
.num-in:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.num-in input { border: 0 !important; box-shadow: none !important; text-align: right; min-width: 0; width: 100%; font-family: var(--num); background: transparent; padding-left: 6px; padding-right: 8px; }
.ni-pre, .ni-suf { display: flex; align-items: center; padding: 0 9px; font-size: 12.5px; color: var(--fg-muted); background: var(--panel-2); }
.ni-pre { border-right: 1px solid var(--line); } .ni-suf { border-left: 1px solid var(--line); }
.pr-rows { display: flex; flex-direction: column; }
.pr-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pr-row:last-child { border-bottom: 0; }
.pr-row select { width: 190px; }
.pr-row > input[type=text] { width: 190px; }
.pr-label { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pr-label b { font-size: 13.5px; font-weight: 600; }
.pr-label small { font-size: 12px; color: var(--fg-muted); line-height: 1.35; }
.pr-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; align-items: flex-start; }
.pr-li { display: flex; gap: 8px; align-items: center; width: 100%; }
.pr-li > input { flex: 1; min-width: 0; }
.pr-result { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; margin-top: 10px; background: var(--panel-2); border-radius: 10px; font-size: 13.5px; }
.pr-result b { text-align: right; font-size: 15px; }
.pr-costs { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pr-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pr-sticky { position: sticky; top: 76px; }
.pr-summary h3 { margin: 0 0 12px; font-size: 15px; }
.pr-sum-list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.pr-sum-list li { display: flex; align-items: center; gap: 8px; }
.pr-sum-list li b { margin-left: auto; }
.pr-sum-list i, .pe-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.pr-sum-big { font-size: 15px; margin: 6px 0; }
.pr-summary .btn { width: 100%; margin-top: 8px; justify-content: center; }
.pr-channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.pr-channels > .btn { justify-self: start; }
.pr-ch.off { opacity: .6; }
.pr-ch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pr-ch-head h2 { margin: 0; font-size: 16px; }
.pr-ch-head > input { font-weight: 650; font-size: 15px; flex: 1; min-width: 0; }
.pr-ch-head .sw { width: 12px; height: 12px; border-radius: 4px; }
.pr-ch-head .switch { margin-left: auto; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-muted); white-space: nowrap; cursor: pointer; }
.pr-tiers { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 6px; }
.pr-tier { display: grid; grid-template-columns: 1fr 1fr 1fr 28px; gap: 8px; align-items: center; }
.pr-tier .num-in { width: auto; }
.pr-tier.head span { font-size: 12px; color: var(--fg-muted); font-weight: 600; }
.pr-tiers > .btn { align-self: flex-start; }
.pr-savebar { position: sticky; bottom: 0; padding: 12px 0; display: flex; justify-content: flex-end; background: linear-gradient(to top, var(--bg) 60%, transparent); }

/* product editor */
.pe-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.pe-form { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.grid-3c { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 10px; }
.pe-h { display: flex; align-items: center; gap: 7px; font-size: 14px; margin: 14px 0 2px; color: var(--accent); }
.pe-sub { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 13px; font-weight: 600; }
.pe-out { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pe-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pe-kpis > div { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.pe-kpis span { font-size: 12px; color: var(--fg-muted); }
.pe-kpis b { font-size: 18px; }
.pe-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pe-table th { font-size: 11.5px; color: var(--fg-muted); font-weight: 600; text-align: left; padding: 6px; border-bottom: 1px solid var(--line); }
.pe-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pe-table .num { text-align: right; }
.pe-table td:first-child { display: flex; align-items: center; gap: 7px; }
.pe-table tbody tr { cursor: pointer; }
.pe-table tbody tr:hover { background: var(--panel-2); }
.pe-table tr.sel { background: var(--accent-soft); }
.pe-comp { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.pe-comp-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.pe-comp-head span { color: var(--fg-muted); font-family: var(--num); }
.pe-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--grid); }
.pe-bar span { height: 100%; min-width: 2px; }
.pe-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--fg-muted); }
.pe-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pe-lines summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; }
.pe-lines table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.pe-lines td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.pe-lines .num { text-align: right; font-family: var(--num); white-space: nowrap; }
.pe-lines tr.tot td { font-weight: 650; border-bottom: 0; }

/* ---------- Marketplaces ---------- */
.mk-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mk-tile { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.mk-tile span { font-size: 12.5px; color: var(--fg-muted); }
.mk-tile b { font-size: 22px; }
.mk-tile small { font-size: 12px; color: var(--fg-muted); }
.mk-empty .ic-lg { width: 40px; height: 40px; color: var(--accent); }
.mk-empty p { max-width: 560px; color: var(--fg-muted); }

@media (max-width: 1100px) {
  .pr-costs, .pe-grid { grid-template-columns: 1fr; }
  .pr-sticky, .pe-out { position: static; }
  .pr-tiles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .pr-channels { grid-template-columns: 1fr; }
  .pr-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .num-in, .pr-row select, .pr-row > input[type=text] { width: 100%; }
  .grid-3c { grid-template-columns: 1fr; }
  .pr-tier { grid-template-columns: 1fr 1fr 1fr 24px; gap: 4px; }
  .pr-tier .ni-pre, .pr-tier .ni-suf { padding: 0 5px; }
  .mk-vs { grid-template-columns: 1fr; }
  .pe-kpis { grid-template-columns: 1fr 1fr; }
  .pe-table { font-size: 12px; } .pe-table th:nth-child(6), .pe-table td:nth-child(6) { display: none; }
  .pr-tabs { width: 100%; } .pr-tabs button { flex: 1; justify-content: center; padding: 7px 6px; }
}
.modal.modal-xl { width: min(1280px, 100%); }
@media (min-width: 1101px) { .modal-xl .pe-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
@media (max-width: 760px) { .pr-tabs .ic { display: none; } }
.pr-li-wrap { width: 100%; display: flex; flex-direction: column; gap: 3px; }
.pr-li-wrap.media { background: var(--accent-soft); border-radius: 10px; padding: 8px; margin-bottom: 4px; }
.pr-li-hint { font-size: 12px; color: var(--fg-muted); padding: 0 2px; }
.pr-li .unit-sel { width: 104px; flex: none; padding-left: 8px; padding-right: 4px; }
.pr-li .num-in { width: 130px; }
.icon-btn-ph { width: 30px; flex: none; }
.pr-li-add { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) { .pr-li { flex-wrap: wrap; } .pr-li > input[type=text] { flex-basis: 100%; } .pr-li .num-in { flex: 1; width: auto; } }
.hero-lag { display: inline-flex; align-items: center; gap: 6px; color: #ffd27a; margin-right: 6px; }

/* ---------- Revisão out/2026 ---------- */
.align-start { align-items: start; }
.strip { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); }
@media (min-width: 561px) and (max-width: 1180px) { .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } .strip-item { border-bottom: 1px solid var(--line); } .strip-item:nth-child(3n) { border-right: 1px solid var(--line); } }
@media (max-width: 560px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (min-width: 641px) { .plat-row { grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plat-row { grid-template-columns: 1fr 1fr; } .plat-row .plat-name { grid-column: span 2; } }
.plat-row > span { min-width: 0; }
.plat-name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
/* DRE */
.dre { display: flex; flex-direction: column; }
.dre-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(60px, 1fr) auto 52px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.dre-row.dre-top { font-weight: 650; }
.dre-row.dre-top b { font-size: 15px; }
.dre-l { display: flex; gap: 8px; align-items: center; min-width: 0; }
.dre-l i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dre-l > span { display: flex; flex-direction: column; min-width: 0; }
.dre-l small { font-size: 11.5px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dre-bar { height: 8px; border-radius: 99px; background: var(--grid); overflow: hidden; }
.dre-bar span { display: block; height: 100%; border-radius: 99px; }
.dre-row b { text-align: right; white-space: nowrap; }
.dre-row > .muted { text-align: right; font-size: 12.5px; }
.dre-result { display: grid; grid-template-columns: 1fr auto 52px; gap: 12px; align-items: center; margin-top: 12px; padding: 14px 16px; border-radius: 12px; background: var(--good-soft); }
.dre-result.bad { background: var(--bad-soft); }
.dre-result > span:first-child { display: flex; flex-direction: column; font-weight: 650; }
.dre-result small { font-weight: 400; font-size: 12px; color: var(--fg-muted); }
.dre-result b { font-size: 22px; color: var(--good); }
.dre-result.bad b { color: var(--bad); }
.dre-result > span:last-child { text-align: right; font-weight: 650; }
.dre-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--fg-muted); }
.dre-empty .ic-lg, .ic-lg { width: 34px; height: 34px; color: var(--accent); }
/* atribuição */
.attr-bar { margin-bottom: 12px; }
.attr-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.attr-head span { color: var(--fg-muted); }
.attr-track { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--grid); }
.attr-track span { height: 100%; }
.attr-msg { font-size: 13.5px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); margin: 4px 0 12px; }
.attr-msg.warn { background: var(--warn-soft); }
.attr-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.attr-kpis > div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.attr-kpis span { font-size: 12px; color: var(--fg-muted); }
.attr-kpis b { font-size: 19px; }
.attr-kpis .hl { border-color: var(--accent); background: var(--accent-soft); }
/* produtos */
.src-tag { display: inline-flex; align-items: center; gap: 5px; }
.abc-chip { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-weight: 700; font-size: 12.5px; color: #fff; background: var(--c); }
.abc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.abc-box { border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.abc-box > b { font-size: 22px; color: var(--c); }
.abc-box span, .abc-box small { font-size: 12px; color: var(--fg-muted); }
.abc-box strong { font-size: 18px; }
@media (max-width: 760px) {
  .dre-row { grid-template-columns: minmax(0, 1fr) auto; }
  .dre-row .dre-bar, .dre-row > .muted { display: none; }
  .dre-result { grid-template-columns: 1fr auto; } .dre-result > span:last-child { display: none; }
  .attr-kpis { grid-template-columns: 1fr 1fr; } .attr-kpis .hl { grid-column: span 2; }
  .abc-row { grid-template-columns: 1fr; }
}
.ref-total { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13.5px; }
.ref-total b { font-size: 17px; }
.ref-total small { grid-column: span 2; }
.mk-attr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.mk-attr.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.mk-attr > div { display: flex; flex-direction: column; gap: 1px; }
.mk-attr span { font-size: 12.5px; color: var(--fg-muted); }
.mk-attr b { font-size: 20px; }
.mk-attr small { font-size: 12px; color: var(--fg-muted); }
.mk-attr .hl b { color: var(--accent); }
.mk-attr p { grid-column: 1 / -1; margin: 4px 0 0; font-size: 13px; color: var(--fg-muted); }
@media (max-width: 760px) { .mk-attr { grid-template-columns: 1fr 1fr; } }

/* =====================================================================
   VISION — tema escuro com vidro (out/2026)
   Fundo azul-marinho profundo com brilhos azul/violeta, cartões de vidro
   translúcido, um azul elétrico (#0075ff) e ciano (#2cd9ff) nos gráficos.
   ===================================================================== */
:root, :root[data-theme] {
  --bg: #060b26;
  --panel: #0c1440;
  --panel-2: rgba(5, 9, 34, .55);
  --fg: #ffffff;
  --fg-muted: #a0aec0;
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .14);
  --accent: #0075ff;
  --accent-2: #2cd9ff;
  --accent-b: #1a8cff;
  --accent-3: #7a40ff;
  --ac-rgb: 0, 117, 255;
  --ac2-rgb: 44, 217, 255;
  --ac3-rgb: 122, 64, 255;
  --nav-icon-bg: #1a1f37;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 117, 255, .18);
  --side: transparent;
  --side-fg: #c3cbe0;
  --side-active: rgba(26, 31, 55, .8);
  --good: #01d27f;
  --bad: #ff5b67;
  --warn: #ffb547;
  --good-soft: rgba(1, 210, 127, .13);
  --bad-soft: rgba(255, 91, 103, .14);
  --warn-soft: rgba(255, 181, 71, .13);
  --muted-bar: #263678;
  --hour-bar: #22357f; --heat-0: #0f1c5c; --heat-empty: rgba(255, 255, 255, .035);
  --grid: rgba(255, 255, 255, .07);
  --axis: rgba(255, 255, 255, .2);
  --ref: #8f9ac0;
  --hero: #081038;
  --hero-2: rgba(0, 117, 255, .16);
  --hero-fg: #ffffff;
  --hero-muted: #a0aec0;
  --hero-line: rgba(255, 255, 255, .08);
  --hero-accent: #2cd9ff;
  --hero-good: #01d27f;
  --hero-bad: #ff6b76;
  --glass: linear-gradient(127deg, rgba(6, 11, 40, .94) 19%, rgba(10, 14, 35, .55) 76%);
  --glass-2: linear-gradient(127deg, rgba(24, 29, 60, .9) 28%, rgba(10, 14, 35, .6) 92%);
  --glow: 0 0 0 1px rgba(255, 255, 255, .055) inset, 0 20px 50px -30px rgba(0, 0, 0, .8);
  --shadow: var(--glow);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --font: "Plus Jakarta Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Plus Jakarta Sans", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
html { background: var(--bg); }
body {
  background:
    radial-gradient(1100px 700px at 8% -10%, rgba(var(--ac3-rgb), .38), transparent 60%),
    radial-gradient(900px 620px at 100% 0%, rgba(var(--ac-rgb), .30), transparent 62%),
    radial-gradient(1000px 800px at 60% 110%, rgba(33, 70, 255, .26), transparent 60%),
    linear-gradient(160deg, #0a0f3a 0%, #060b26 45%, #040822 100%);
  background-attachment: fixed;
  color: var(--fg);
}
::selection { background: rgba(var(--ac-rgb), .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* --- glass surfaces --- */
.card, .kpi, .strip, .empty-state, .pr-tile, .mk-attr, .health, .health-card {
  background: var(--glass);
  border: 0;
  box-shadow: var(--glow);
  backdrop-filter: blur(42px) saturate(140%);
  -webkit-backdrop-filter: blur(42px) saturate(140%);
}
.card { border-radius: var(--radius); padding: 22px; }
.kpi { border-radius: 18px; padding: 15px 16px; }
.empty-state { border-radius: var(--radius); }
.card-head h2, .card-title h2 { font: 700 16.5px/1.3 var(--display); letter-spacing: 0; color: #fff; }
.kpi-value { font-family: var(--display); font-weight: 700; }
.kpi-label { color: var(--fg-muted); font-weight: 500; }
h1, .page-title, .top h1 { font-family: var(--display); font-weight: 700; }

/* inner tiles (inside cards) */
.mini-stat, .goal-tile, .pe-kpis > div, .attr-kpis > div, .hours-summary > div, .abc-box, .mk-tile, .chan, .plat-row, .vital, .ring-box, .dev, .pr-result, .ref-total, .diag-rec, .pr-sold-item, .pr-ch-head ~ .pr-rows, .pe-comp {
  background: rgba(3, 7, 30, .5);
  border-color: rgba(255, 255, 255, .06) !important;
}
.hours-summary > div, .attr-kpis > div, .pe-kpis > div, .abc-box, .mk-tile, .goal-tile, .mini-stat { border-radius: 16px; }
.attr-kpis .hl, .hours-summary .best { background: linear-gradient(127deg, rgba(var(--ac-rgb), .28), rgba(var(--ac2-rgb), .08)) !important; border-color: rgba(var(--ac-rgb), .45) !important; }
.hours-summary .best b { color: var(--accent-2); }

/* --- icon chips: solid electric blue like the reference --- */
.ic-chip {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-b));
  color: #fff; box-shadow: 0 6px 18px -6px rgba(var(--ac-rgb), .9);
}
.ic-chip .ic { width: 18px; height: 18px; }

/* --- sidebar --- */
.side {
  background: linear-gradient(112deg, rgba(6, 11, 40, .92) 0%, rgba(10, 14, 35, .55) 100%);
  border-right: 0;
  box-shadow: 1px 0 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  padding: 22px 14px;
}
.side .brand { padding: 4px 10px 22px; margin-bottom: 8px; border-bottom: 1px solid; border-image: linear-gradient(90deg, transparent, rgba(224, 225, 226, .35), transparent) 1; }
.brand, .brand b { font-family: var(--display); letter-spacing: .6px; }
.nav-group-title, .nav-title { color: #fff !important; opacity: .9; font-weight: 700; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; }
.nav-link { padding: 9px 10px; border-radius: 15px; color: #fff; font-weight: 500; font-size: 13.5px; gap: 12px; }
.nav-link .nav-icon { width: 30px; height: 30px; padding: 7px; border-radius: 11px; background: var(--nav-icon-bg); color: var(--accent); opacity: 1; flex: none; transition: background .2s, color .2s; }
.nav-link:hover { background: rgba(26, 31, 55, .55); color: #fff; }
.nav-link.active { background: var(--side-active); color: #fff; font-weight: 650; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7); }
.nav-link.active::before { display: none; }
.nav-link.active .nav-icon { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(var(--ac-rgb), .9); }
.side-user { border-top: 1px solid rgba(255, 255, 255, .07); }
.side-user-info:hover { background: rgba(26, 31, 55, .55); }
.avatar { background: linear-gradient(135deg, var(--accent), var(--accent-3)) !important; color: #fff !important; }

/* --- top bar --- */
.top { background: rgba(6, 11, 38, .55); border-bottom: 1px solid rgba(255, 255, 255, .05); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); }
.top h1 { color: #fff; }
.store-pick, .period-tabs, .filters .seg { background: rgba(15, 21, 53, .75); border-color: rgba(226, 232, 240, .14); border-radius: 15px; }
.store-pick select { color: #fff; }
.period-more { background: #0c1440; border-color: rgba(255, 255, 255, .12); border-radius: 16px; }
.period-more button.opt { color: #fff; }

/* --- buttons, inputs, segmented --- */
.btn { border-radius: 12px; background: rgba(15, 21, 53, .8); border-color: rgba(226, 232, 240, .16); color: #fff; }
.btn:hover { background: rgba(26, 35, 80, .9); border-color: rgba(226, 232, 240, .28); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-b)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -10px rgba(var(--ac-rgb), .95); }
.btn-primary:hover { background: linear-gradient(135deg, #1a84ff, #39a0ff); border-color: transparent; filter: none; }
.btn-danger { background: #e31a3a; border-color: #e31a3a; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--bad); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
  background: rgba(15, 21, 53, .8); border: 1px solid rgba(226, 232, 240, .16); border-radius: 15px; color: #fff;
}
input::placeholder, textarea::placeholder { color: rgba(160, 174, 192, .7); }
select option { background: #0c1440; color: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--ac-rgb), .25); }
.num-in { background: rgba(15, 21, 53, .8); border-color: rgba(226, 232, 240, .16); border-radius: 12px; }
.num-in input { background: transparent !important; }
.ni-pre, .ni-suf { background: rgba(255, 255, 255, .05); }
.seg { background: rgba(5, 9, 34, .6); border-color: rgba(255, 255, 255, .08); border-radius: 13px; }
.seg button { color: var(--fg-muted); border-radius: 10px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -8px rgba(var(--ac-rgb), .95); }
.badge, .pill { border-radius: 99px; }

/* --- hero (pulso) --- */
.hero {
  background:
    radial-gradient(700px 360px at 85% -10%, rgba(var(--ac-rgb), .42), transparent 65%),
    radial-gradient(520px 300px at 0% 110%, rgba(var(--ac3-rgb), .28), transparent 65%),
    linear-gradient(127deg, rgba(6, 11, 40, .96) 19%, rgba(10, 18, 60, .78) 76%);
  box-shadow: var(--glow), 0 30px 80px -40px rgba(var(--ac-rgb), .55);
  border-radius: 24px;
}
.hero-value { font-family: var(--display); font-weight: 800; letter-spacing: -1px; background: linear-gradient(180deg, #ffffff 30%, #b9dcff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tabs { border-top: 1px solid rgba(255, 255, 255, .07); background: rgba(3, 7, 30, .35); }
.hero-tab { border-right-color: rgba(255, 255, 255, .06); }
.hero-tab[aria-selected="true"] { background: linear-gradient(180deg, rgba(var(--ac-rgb), .28), rgba(var(--ac-rgb), .06)); }
.hero-tab[aria-selected="true"]::before { background: linear-gradient(90deg, var(--accent), var(--accent-2)); height: 3px; box-shadow: 0 0 14px rgba(var(--ac2-rgb), .8); }
.ht-value { font-family: var(--display); font-weight: 700; }
.hero-svg .hline { stroke: var(--accent-2); stroke-width: 3; filter: drop-shadow(0 0 6px rgba(var(--ac2-rgb), .55)); }
.hero-svg .hline-prev { stroke: #7a8bd6; }
.hero-svg .hdot, .hero-svg .hdot-small { fill: var(--accent-2); }
.hero-svg .hdot-last { stroke: var(--accent-2); }
.hero-svg .hbrush .selection { fill: var(--accent-2); stroke: var(--accent-2); }
.hd-chip.good { background: rgba(1, 210, 127, .16); color: #2fe59a; }
.hd-chip.bad { background: rgba(255, 91, 103, .16); color: #ff8a92; }

/* --- strip under the hero --- */
.strip { border-radius: 20px; overflow: hidden; }
.strip-item { border-right-color: rgba(255, 255, 255, .06) !important; border-bottom-color: rgba(255, 255, 255, .06) !important; }
.strip-item b { font-family: var(--display); font-weight: 700; }
.strip-label .ic { color: var(--accent-2); }

/* --- tables --- */
.table th { background: #0b1238; color: #a0aec0; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; border-bottom-color: rgba(86, 87, 122, .55); }
.table td { border-bottom-color: rgba(86, 87, 122, .35); }
.table tbody tr:hover td { background: rgba(var(--ac-rgb), .07); }
.pe-table th { color: #a0aec0; }
.cellbar { background: linear-gradient(to right, var(--c, var(--accent)) var(--w), rgba(255, 255, 255, .08) var(--w)); }

/* --- tooltips, modals, toasts --- */
.tip { background: rgba(8, 13, 45, .96); border: 1px solid rgba(255, 255, 255, .12); color: #fff; border-radius: 12px; backdrop-filter: blur(12px); }
.modal-back { background: rgba(2, 4, 18, .66); backdrop-filter: blur(6px); }
.modal { background: linear-gradient(127deg, #0b1342 10%, #070c2c 90%); border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; }
.modal-foot { border-top-color: rgba(255, 255, 255, .07); }
.toast { background: #0c1440; color: #fff; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; }

/* --- charts on dark --- */
.chart-svg .grid-line, .grid-line { stroke: rgba(255, 255, 255, .07); stroke-dasharray: 4 6; }
.tick-text { fill: #a0aec0; }
.axis-line { stroke: rgba(255, 255, 255, .18); }
.hb-bar { fill: #1d2c6b; }
.hb-bar.best { fill: var(--accent-2); filter: drop-shadow(0 0 8px rgba(var(--ac2-rgb), .55)); }
.chan-bar, .pe-bar, .attr-track, .dre-bar, .goal-track, .ref-track { background: rgba(255, 255, 255, .07); }
.goal-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 12px rgba(var(--ac2-rgb), .5); }

/* --- misc components --- */
.pr-banner { background: linear-gradient(127deg, rgba(var(--ac-rgb), .22), rgba(10, 14, 35, .5)); border-color: rgba(var(--ac-rgb), .4); border-radius: 18px; }
.pr-banner.soft { background: linear-gradient(127deg, rgba(255, 181, 71, .16), rgba(10, 14, 35, .5)); border-color: rgba(255, 181, 71, .35); }
.m-chip.good { background: rgba(1, 210, 127, .14); }
.attr-msg { background: rgba(3, 7, 30, .5); border-radius: 14px; }
.attr-msg.warn { background: linear-gradient(127deg, rgba(255, 181, 71, .16), rgba(3, 7, 30, .4)); }
.dre-result { background: linear-gradient(127deg, rgba(1, 210, 127, .2), rgba(3, 7, 30, .4)); border-radius: 16px; }
.dre-result.bad { background: linear-gradient(127deg, rgba(255, 91, 103, .2), rgba(3, 7, 30, .4)); }
.dre-result b { color: #2fe59a; }
.live-dot { box-shadow: 0 0 0 3px rgba(1, 210, 127, .2), 0 0 10px rgba(1, 210, 127, .8); }
.bottom-nav { background: rgba(6, 11, 38, .82) !important; border-top: 1px solid rgba(255, 255, 255, .07) !important; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.login { background: transparent; }
.login-side { background: radial-gradient(600px 400px at 20% 10%, rgba(var(--ac3-rgb), .45), transparent 60%), radial-gradient(600px 400px at 90% 90%, rgba(var(--ac-rgb), .45), transparent 60%), #070c2e; }
.login-main { background: transparent; }
.login-form { background: var(--glass); padding: 32px; border-radius: 24px; box-shadow: var(--glow); backdrop-filter: blur(40px); }
/* Vision — ajustes finos */
.hb-bar { fill: #253c99; }
.top { background: rgba(6, 11, 38, .86); }
.nav-link { padding: 6px 10px; }
.nav-link .nav-icon { width: 28px; height: 28px; padding: 6px; }
.nav-group { margin-bottom: 4px; }
.ht-value { font-family: var(--num); font-weight: 600; }
.hero-value { padding-bottom: 2px; }
/* semicircle gauge */
.gauge { position: relative; display: grid; place-items: center; }
.gauge svg { width: 100%; max-width: 220px; height: auto; overflow: visible; }
.gauge .g-track { stroke: rgba(255, 255, 255, .08); }
.gauge .g-val { filter: drop-shadow(0 0 8px rgba(var(--ac2-rgb), .45)); }
.gauge-center { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; flex-direction: column; align-items: center; }
.gauge-center b { font: 800 30px/1 var(--display); }
.gauge-center span { font-size: 12px; color: var(--fg-muted); margin-top: 3px; }
.gauge-scale { display: flex; justify-content: space-between; max-width: 230px; margin: 2px auto 0; font-size: 11px; color: var(--fg-muted); width: 100%; }
@media (max-width: 760px) { .attr-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } .attr-kpis .hl { grid-column: auto !important; } .attr-kpis b { font-size: 15px; } .attr-kpis > div { padding: 8px; } }
.brand-dash { align-items: center; gap: 12px; }
.brand-dash img { border-radius: 0; box-shadow: none; }
.brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-text b { font: 800 21px/1 var(--display); letter-spacing: -.02em; color: #fff; }
.brand-text small { font: 600 12px/1.2 var(--font); color: #38e1c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; letter-spacing: .2px; }

/* ---------- Plano de melhorias do site ---------- */
.plan-head { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: center; }
.plan-gauge .gauge-center b { font-size: 40px; }
.plan-sum { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.plan-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pc { border-radius: 16px; padding: 12px 14px; background: rgba(3, 7, 30, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); display: flex; flex-direction: column; }
.pc b { font: 800 26px/1.1 var(--display); }
.pc span { font-size: 12.5px; color: var(--fg-muted); }
.pc.bad b { color: var(--bad); } .pc.warn b { color: var(--warn); } .pc.pc-tip b { color: var(--accent-2); } .pc.ok b { color: var(--good); }
.plan-pages { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; }
.plan-page { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; background: rgba(var(--ac-rgb), .14); color: #cfe3ff; text-decoration: none !important; box-shadow: inset 0 0 0 1px rgba(var(--ac-rgb), .35); }
.plan-page small { color: var(--accent-2); }
.plan-page.err { background: var(--bad-soft); box-shadow: inset 0 0 0 1px rgba(255, 91, 103, .35); }
.plan-sectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.plan-sec { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; border: 0; cursor: pointer; text-align: left; color: #fff; background: rgba(3, 7, 30, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: background .15s, box-shadow .15s; }
.plan-sec:hover { background: rgba(var(--ac-rgb), .1); }
.plan-sec.on { background: linear-gradient(127deg, rgba(var(--ac-rgb), .32), rgba(var(--ac2-rgb), .08)); box-shadow: inset 0 0 0 1px rgba(var(--ac-rgb), .6); }
.plan-sec .ic-chip { width: 32px; height: 32px; }
.plan-sec-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.plan-sec-t b { font-size: 13.5px; }
.plan-sec-t small { font-size: 11.5px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-sec-score { font: 800 16px/1 var(--display); min-width: 40px; text-align: center; padding: 6px 4px; border-radius: 10px; }
.plan-sec-score.good { color: #2fe59a; background: var(--good-soft); } .plan-sec-score.warn { color: var(--warn); background: var(--warn-soft); } .plan-sec-score.bad { color: #ff8a92; background: var(--bad-soft); } .plan-sec-score.sc-tip { color: var(--accent-2); background: rgba(var(--ac2-rgb), .1); font-size: 11px; font-weight: 700; }
.plan-list { display: flex; flex-direction: column; gap: 10px; }
.plan-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(3, 7, 30, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); border-left: 3px solid var(--c, var(--accent)); }
.plan-item.st-bad { --c: var(--bad); } .plan-item.st-warn { --c: var(--warn); } .plan-item.st-tip { --c: var(--accent-2); } .plan-item.st-ok { --c: var(--good); opacity: .85; }
.plan-st { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.plan-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.plan-main h3 { font: 700 15px/1.35 var(--display); }
.plan-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-tags .pill { font-size: 11px; padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: var(--fg-muted); }
.plan-tags .pill.st-bad { color: #ff8a92; background: var(--bad-soft); } .plan-tags .pill.st-warn { color: var(--warn); background: var(--warn-soft); } .plan-tags .pill.st-tip { color: var(--accent-2); background: rgba(var(--ac2-rgb), .1); } .plan-tags .pill.st-ok { color: #2fe59a; background: var(--good-soft); }
.plan-tags .pill.imp-alta { color: #fff; background: rgba(var(--ac-rgb), .35); }
.plan-find { color: #d4dbef; font-size: 13.5px; line-height: 1.5; }
.plan-det summary { cursor: pointer; color: var(--accent-2); font-weight: 600; font-size: 13px; margin-top: 2px; width: max-content; }
.plan-det[open] summary { margin-bottom: 8px; }
.plan-why { font-size: 13px; color: var(--fg-muted); line-height: 1.5; margin-bottom: 8px; }
.plan-why b, .plan-how > b { color: #fff; }
.plan-how { font-size: 13.5px; margin-bottom: 10px; }
.plan-how ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: #d4dbef; }
.plan-ex { border-radius: 14px; background: linear-gradient(127deg, rgba(var(--ac-rgb), .16), rgba(3, 7, 30, .5)); box-shadow: inset 0 0 0 1px rgba(var(--ac-rgb), .3); padding: 10px 12px; margin-bottom: 8px; }
.plan-ex-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; color: var(--accent-2); }
.plan-ex-h span { display: inline-flex; gap: 6px; align-items: center; }
.plan-ex pre { margin: 0; white-space: pre-wrap; font: 13px/1.55 var(--font); color: #fff; }
.plan-side { display: flex; align-items: flex-start; }
.plan-more { align-self: flex-start; }
@media (max-width: 900px) { .plan-head { grid-template-columns: 1fr; } .plan-gauge { max-width: 240px; margin: 0 auto; } .plan-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plan-item { grid-template-columns: 1fr; } .plan-st { display: none; } .plan-side .btn { width: 100%; } .plan-sectors { grid-template-columns: 1fr 1fr; } .plan-sec .ic-chip { display: none; } }
.plan-sec { min-width: 0; overflow: hidden; }
@media (max-width: 640px) { .plan-sectors { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .plan-sec { padding: 9px 10px; gap: 6px; } .plan-sec-t b { font-size: 12.5px; } .plan-sec-score { min-width: 32px; font-size: 14px; } .plan-page { max-width: 100%; } .plan-page span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.sw-group { border-radius: 50% !important; box-shadow: 0 0 0 2px rgba(var(--ac3-rgb), .35), 0 0 10px rgba(var(--ac3-rgb), .7); }
.group-list { display: flex; flex-direction: column; gap: 8px; }
.group-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(3, 7, 30, .5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.group-row .sw { width: 12px; height: 12px; }
.group-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.group-info small { color: var(--fg-muted); font-size: 12.5px; }

/* ---------- Two-step verification ---------- */
.btn-link { background: transparent; border-color: transparent; color: var(--fg-muted); align-self: center; }
.btn-link:hover { color: var(--fg); background: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tfa { display: flex; flex-direction: column; gap: 14px; }
.tfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.45; }
.tfa-qr { display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 20px; align-items: start; }
.tfa-qr img { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 6px; box-sizing: content-box; image-rendering: pixelated; }
.tfa-qr p { margin: 0 0 10px; line-height: 1.45; }
.tfa-manual summary { cursor: pointer; color: var(--accent-2, var(--accent)); font-size: 13px; }
.tfa-manual p { margin: 8px 0 4px; }
.tfa-secret { display: inline-block; font: 600 15px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .06em; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid var(--line); word-break: break-all; user-select: all; }
.tfa-open { margin-top: 10px; display: none; }
@media (hover: none) and (pointer: coarse) { .tfa-open { display: inline-flex; } }
.tfa-form { display: flex; flex-direction: column; gap: 10px; }
.otp-input { font: 600 24px/1.2 ui-monospace, Consolas, monospace !important; letter-spacing: .3em; text-align: center; max-width: 220px; }
.tfa-ok { display: flex; align-items: center; gap: 8px; color: var(--good); font-weight: 600; }
.rc-box { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; }
.rc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.rc-grid code { font: 600 15px/1.6 ui-monospace, Consolas, monospace; letter-spacing: .05em; }
.rc-actions { display: flex; gap: 8px; margin-top: 12px; }
.tfa-facts { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.login-form .tfa-qr { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.sec-row { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
@media (max-width: 560px) { .tfa-qr { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.login-pw, .tfa-login { display: flex; flex-direction: column; gap: 14px; }
.login-pw[hidden], .tfa-login[hidden] { display: none; }
.modal-foot:empty { display: none; }
.access-opt { align-items: flex-start; margin-top: 6px; }
.access-opt > span { display: flex; flex-direction: column; gap: 1px; }
.access-stores { margin: 4px 0 4px 26px; display: grid; gap: 6px; }
.access-stores .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* ---------- Comparison period ---------- */
.cmp { position: relative; }
.cmp-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.cmp-btn:hover { border-color: var(--accent); }
.cmp-btn .cmp-k { color: var(--fg-muted); font-weight: 600; }
.cmp-btn.on { border-color: var(--accent); color: var(--accent-2, var(--accent)); box-shadow: 0 0 0 3px var(--accent-soft); }
.cmp-btn .ic { width: 14px; height: 14px; }
.cmp-pop { left: 0; right: auto; min-width: 290px; }
.cmp-pop .cmp-title { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); padding: 4px 10px 6px; }
.cmp-pop button.opt { display: flex; flex-direction: column; gap: 2px; }
.cmp-pop button.opt small { color: var(--fg-muted); font-size: 12px; }
.cmp-pop .cmp-sub { grid-column: 1 / -1; font-size: 12.5px; color: var(--fg-muted); }
.cmp-pop .cmp-err { grid-column: 1 / -1; color: var(--bad); }
@media (max-width: 760px) {
  .cmp { order: 4; }
  body > .period-more { max-height: calc(100vh - 140px); overflow-y: auto; z-index: 60; width: auto; }
}

/* ---------- Login: Zelmo ---------- */
.zl-side { position: relative; overflow: hidden; isolation: isolate; justify-content: space-between; gap: 32px; }
.zl-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; font: 800 34px/1 var(--display, var(--num)); letter-spacing: -.03em; }
.zl-brand span { color: #fff; }
.zl-brand img { border-radius: 11px; box-shadow: 0 0 28px rgba(56, 225, 200, .4); }
.zl-copy { position: relative; z-index: 2; max-width: 30rem; display: flex; flex-direction: column; gap: 14px; }
.zl-eyebrow { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #38e1c8; padding: 6px 12px; border-radius: 99px; background: rgba(56, 225, 200, .1); border: 1px solid rgba(56, 225, 200, .3); }
.zl-copy h2 { margin: 0; font: 700 34px/1.15 var(--num); color: #fff; letter-spacing: -.01em; }
.zl-side .zl-copy p { margin: 0; font: 400 16.5px/1.5 var(--font, inherit); color: rgba(225, 232, 255, .82); max-width: 34ch; }
.zl-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 9px; }
.zl-points li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: rgba(235, 240, 255, .92); }
.zl-ck { width: 18px; height: 18px; flex: none; color: #38e1c8; padding: 3px; border-radius: 50%; background: rgba(56, 225, 200, .14); }
.zl-floats { position: absolute; inset: 9% 6% 44% 0; z-index: 1; pointer-events: none; }
.zl-float { position: absolute; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 30%;
  background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .15); backdrop-filter: blur(10px);
  animation: zl-float 7s ease-in-out infinite alternate; color: #38e1c8; }
.zl-float .zl-ic { width: 46%; height: 46%; }
.zl-float:nth-child(3n) { color: #9fdcff; }
.zl-float:nth-child(4n) { color: #6ef0c2; }
.zl-chip { width: auto; height: auto; padding: 9px 14px 9px 10px; border-radius: 99px; display: inline-flex; gap: 8px; font-size: 13px; color: #fff; }
.zl-chip .zl-ic { width: 18px; height: 18px; color: #38e1c8; }
.zl-chip b { font-weight: 600; white-space: nowrap; }
.zl-orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; animation: zl-pulse 9s ease-in-out infinite alternate; }
.zl-orb-a { width: 260px; height: 260px; left: 8%; top: 8%; background: var(--accent-3); }
.zl-orb-b { width: 220px; height: 220px; right: 4%; top: 30%; background: var(--accent); animation-delay: -4s; }
@keyframes zl-float {
  0% { transform: translate3d(0, 0, 0) rotate(-4deg); }
  50% { transform: translate3d(6px, -16px, 0) rotate(3deg); }
  100% { transform: translate3d(-4px, -6px, 0) rotate(-1deg); }
}
@keyframes zl-pulse { from { transform: scale(.9); opacity: .4; } to { transform: scale(1.12); opacity: .65; } }
@media (prefers-reduced-motion: reduce) { .zl-float, .zl-orb { animation: none; } }
@media (max-height: 760px) and (min-width: 821px) { .zl-copy h2 { font-size: 28px; } .zl-points { display: none; } }
@media (max-width: 820px) {
  .zl-side { min-height: 300px; gap: 18px; padding: 24px 20px 28px; }
  .zl-brand { font-size: 24px; }
  .zl-brand img { width: 32px; height: 32px; }
  .zl-floats { inset: 0 0 0 30%; opacity: .32; }
  .zl-float { transform-origin: center; scale: .72; }
  .zl-extra { display: none; }
  .zl-copy { gap: 10px; }
  .zl-copy h2 { font-size: 22px; }
  .zl-side .zl-copy p { font-size: 14.5px; }
  .zl-points { display: none; }
}

/* Zelmo logo (icon + wordmark in one SVG) */
.brand-logo { display: block; height: 34px; width: auto; filter: drop-shadow(0 6px 14px rgba(56, 225, 200, .22)); }
.brand-text { gap: 6px; }
.zl-brand img { width: 230px; height: auto; border-radius: 0; box-shadow: none; filter: drop-shadow(0 0 22px rgba(56, 225, 200, .28)); }
@media (max-width: 820px) { .zl-brand img { width: 160px; } }
.token-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.token-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.token-list li > span { display: flex; flex-direction: column; min-width: 0; }
/* Integrações: store picker */
.int-stores { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.int-store { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass, rgba(255,255,255,.03)); color: var(--fg); cursor: pointer; font: inherit; min-width: 170px; }
.int-store .sw { grid-row: 1 / span 2; width: 10px; height: 10px; border-radius: 50%; }
.int-store b { font-size: 14px; }
.int-store small { grid-column: 2; color: var(--fg-muted); font-size: 12px; }
.int-store:hover { border-color: var(--line-strong); }
.int-store.on { border-color: #38e1c8; box-shadow: 0 0 0 3px rgba(56, 225, 200, .15); }

/* histórico (Integrações) */
.hist-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.hist-box h3 { margin: 0 0 4px; font-size: 15px; }
.hist-box .row-gap.wrap { flex-wrap: wrap; margin-top: 10px; }
.hist-box select { width: auto; min-width: 200px; }
.hist-box > .row-gap:not(.wrap) { margin-top: 10px; }
.hist-box .banner { flex-direction: row; align-items: center; flex-wrap: wrap; }
.hist-box input[type=date] { width: 160px !important; }

/* --- menu lateral no celular ("Mais") --- */
.side-close { display: none; }
@media (max-width: 960px) {
  .side {
    z-index: 60; width: min(86vw, 320px); height: 100dvh;
    background: linear-gradient(160deg, #0a1035 0%, #070b26 100%) !important; /* opaco: nada da tela de trás aparece */
    backdrop-filter: none; -webkit-backdrop-filter: none;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y;
    transition: transform .26s cubic-bezier(.2, .8, .2, 1);
    border-radius: 0 22px 22px 0;
  }
  body.nav-open .side { box-shadow: 18px 0 48px rgba(0, 0, 0, .55); }
  body.nav-open .scrim { z-index: 55; background: rgba(2, 4, 18, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: scrim-in .2s ease; }
  @keyframes scrim-in { from { opacity: 0; } }
  html:has(body.nav-open), body.nav-open { overflow: hidden; overscroll-behavior: none; }
  .side .brand { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 14px 10px; margin-bottom: 4px; }
  .side-close { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .06); color: #fff; flex: none; }
  .side-close .ic { width: 18px; height: 18px; }
  .side nav { flex: 1; }
  .side .nav { gap: 6px; }
  .side .nav-group-title, .side .nav-title { margin-top: 4px; padding-bottom: 4px; }
  .side .nav-link { margin: 0; }
  .side .nav-link { padding: 5px 10px; min-height: 40px; }
  .side .nav-link .nav-icon { width: 28px; height: 28px; padding: 6px; }
  .side-user { margin-top: 10px; padding-top: 10px; }
}
.diag-report { max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 11.5px; line-height: 1.45; background: rgba(0,0,0,.3); padding: 12px; border-radius: 10px; }

/* --- Pedidos --- */
.ord-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ord-tools input.search { width: 290px !important; max-width: 100%; }
.ord-table tr.clickable { cursor: pointer; }
.ord-table tr.clickable:hover td { background: rgba(255, 255, 255, .03); }
.ord-table tr.row-muted td { opacity: .55; }
.ord-status { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: rgba(255, 255, 255, .07); color: var(--fg-muted); }
.ord-status.good { background: rgba(1, 181, 116, .14); color: #01b574; }
.ord-status.warn { background: rgba(255, 181, 71, .14); color: #ffb547; }
.ord-status.bad { background: rgba(227, 26, 26, .14); color: #ff6b6b; }
.ord-more { display: flex; justify-content: center; padding-top: 14px; }
.show-sm { display: none !important; }
.ord-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); margin-bottom: 6px; }
.ord-head .block { display: block; margin: 2px 0; }
.ord-name { font-size: 16px; }
.ord-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--fg-muted); margin: 16px 0 8px; }
.ord-prod { display: flex; gap: 10px; align-items: center; }
.ord-prod img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; flex: none; }
.ord-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ord-box { padding: 4px 14px 12px; border-radius: 14px; background: rgba(255, 255, 255, .03); }
.ord-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13.5px; }
.ord-total { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 6px; padding-top: 8px; font-size: 15px; }
@media (max-width: 760px) {
  .show-sm { display: block !important; }
  .ord-tools input.search { width: 100% !important; }
  .ord-tools > .row-gap { width: 100%; }
  .ord-head, .ord-grid { grid-template-columns: 1fr 1fr; }
  .ord-grid { grid-template-columns: 1fr; }
}
.loading-block { padding: 40px 20px; text-align: center; color: var(--fg-muted); }
.strike { text-decoration: line-through; }
.ord-prod img { background: #fff; }

/* --- Clientes (Visão geral) --- */
.cu-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.cu-tile { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); display: flex; flex-direction: column; gap: 4px; }
.cu-tile > span { font-size: 12.5px; color: var(--fg-muted); }
.cu-tile b { font-size: 20px; }
.cu-tile small { font-size: 12px; color: var(--fg-muted); }
.cu-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .06); margin-bottom: 8px; }
.cu-new { background: var(--accent); } .cu-ret { background: #01b574; }
@media (max-width: 1100px) { .cu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Produção --- */
.prod-tools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.prod-tools select { width: auto; }
.prod-tools input.search { width: 240px !important; }
.prod-board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.prod-col { background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); border-top: 3px solid var(--c); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.prod-col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 2px 4px 4px; font-size: 13.5px; }
.prod-empty { color: var(--fg-muted); font-size: 12.5px; text-align: center; padding: 18px 0; margin: 0; }
.prod-card { background: rgba(10, 16, 50, .85); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; transition: border-color .15s, transform .15s; }
.prod-card:hover { border-color: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.prod-card.late { border-color: rgba(255, 107, 107, .65); box-shadow: 0 0 0 1px rgba(255, 107, 107, .25) inset; }
.prod-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.prod-store { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, var(--s) 22%, transparent); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.prod-name { font-size: 14px; line-height: 1.3; }
.prod-card-mid { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--fg-muted); }
.prod-card-mid .ic { width: 13px; height: 13px; vertical-align: -2px; }
.prod-badge { align-self: flex-start; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .07); color: var(--fg-muted); }
.prod-badge.good { background: rgba(1, 181, 116, .15); color: #01b574; }
.prod-badge.warn { background: rgba(255, 181, 71, .15); color: #ffb547; }
.prod-badge.bad { background: rgba(227, 26, 26, .18); color: #ff6b6b; }
.prod-next { align-self: stretch; margin-top: 2px; }
.prod-hist { margin-top: 6px; }
@media (max-width: 760px) {
  .prod-board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; }
  .prod-col { scroll-snap-align: start; }
  .prod-tools input.search { width: 100% !important; }
}
.size-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.size-cell { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.size-cell > span { font-size: 12px; font-weight: 700; color: var(--fg-muted); }
.size-cell input { text-align: center; padding: 8px 4px !important; }
.size-total { justify-content: flex-start; }
.size-total b { padding: 9px 0; font-size: 15px; }
.size-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.size-chips span { font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--fg-muted); }
.size-chips b { color: #fff; }
@media (max-width: 600px) { .size-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.table tfoot .total-row td { position: sticky; bottom: 0; background: #0b1240; border-top: 1px solid rgba(255, 255, 255, .14); font-weight: 600; z-index: 1; }

/* ===== Estampas (DTF print editor) ===== */
.est-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.est-top .search { flex: 1; min-width: 200px; max-width: 420px; }
.est-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.est-grid > .empty-state { grid-column: 1 / -1; }
.est-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.est-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 12px;
  background: repeating-conic-gradient(#e9ecf3 0% 25%, #cfd5e2 0% 50%) 0 0 / 16px 16px; }
.est-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.est-info { padding: 10px 12px 12px; display: grid; gap: 6px; }
.est-info a { color: var(--fg); }
.est-actions { flex-wrap: wrap; }
.est-status { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); color: var(--fg-muted); }
.est-status.st-aprovada { background: rgba(1, 181, 116, .15); color: #01945f; }
.est-status.st-impressa { background: rgba(43, 89, 255, .14); color: var(--accent); }
.est-presets .btn { font-weight: 500; }

.est-editor { display: flex; flex-direction: column; gap: 10px; height: calc(100vh - 120px); min-height: 560px; }
.est-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.est-bar select { width: auto; }
.est-name { flex: 1 1 200px; max-width: 320px; font-weight: 650; }
.est-size { display: flex; align-items: center; gap: 4px; }
.est-num { width: 70px !important; text-align: center; }
.est-zoom { min-width: 46px; text-align: center; font-size: 12.5px; color: var(--fg-muted); }
.est-save.dirty { box-shadow: 0 0 0 3px rgba(255, 181, 71, .45); }
.est-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 76px 1fr 320px; gap: 10px; }
.est-tools { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; overflow: auto; }
.est-tool { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--fg); cursor: pointer; }
.est-tool:hover { background: var(--panel-2); border-color: var(--line); }
.est-ic { font-size: 19px; line-height: 1; font-weight: 800; }
.est-tool small { font-size: 10.5px; color: var(--fg-muted); }
.est-stage { position: relative; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.est-canvas { display: block; margin: auto; outline: none; touch-action: none; }
.est-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; }
.est-props, .est-layers { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; align-content: start; }
.est-props h3, .est-layers h3 { margin: 0; font-size: 14px; }
.est-props hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.est-ph { align-items: center; }
.est-layer-name { flex: 1; padding: 5px 8px !important; }
.est-f { display: grid; gap: 4px; font-size: 12.5px; }
.est-f > span { color: var(--fg-muted); font-weight: 600; }
.est-f input, .est-f select, .est-f textarea { padding: 6px 8px; }
.est-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.est-btns { display: flex; flex-wrap: wrap; gap: 5px; }
.est-btns .btn { padding: 5px 9px; font-size: 12.5px; }
.btn.on { background: var(--accent-soft, #e7edff); border-color: var(--accent); color: var(--accent); }
.est-color { display: flex; gap: 5px; align-items: center; }
.est-color input[type=color] { width: 40px; height: 32px; flex: none; }
.est-hex { width: 84px !important; font-family: ui-monospace, Consolas, monospace; }
.est-range input { width: 100%; accent-color: var(--accent); }
.est-sub { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.est-dim { font-size: 13px; padding-top: 6px; }
.est-dpi { font-size: 12.5px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--panel-2); }
.est-dpi.good { background: rgba(1, 181, 116, .13); }
.est-dpi.warn { background: rgba(255, 181, 71, .2); }
.est-dpi.bad { background: rgba(255, 90, 90, .17); }
.est-layer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.est-layer-list li { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; }
.est-layer-list li:hover { background: var(--panel-2); }
.est-layer-list li.on { background: var(--accent-soft, #e7edff); border-color: var(--accent); }
.est-lic { width: 22px; text-align: center; font-weight: 800; }
.est-lname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.est-lbtn { border: 0; background: transparent; color: var(--fg-muted); cursor: pointer; padding: 2px 4px; font-size: 12px; }
.est-lbtn:hover { color: var(--fg); }
.est-bg { display: flex; align-items: center; gap: 5px; }
.est-sw { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-strong); cursor: pointer; padding: 0; }
.sw-checker { background: repeating-conic-gradient(#e9ecf3 0% 25%, #cfd5e2 0% 50%) 0 0 / 8px 8px; }
.est-bg input[type=color] { width: 30px; height: 24px; padding: 1px; }
.est-mock-wrap { display: flex; justify-content: center; background: var(--panel-2); border-radius: var(--radius-sm); padding: 8px; overflow: auto; }
.est-mock { max-width: 100%; height: auto !important; }
.linklike { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; font-weight: 600; }
@media (max-width: 1100px) { .est-main { grid-template-columns: 64px 1fr 270px; } }
@media (max-width: 820px) {
  .est-editor { height: auto; }
  .est-main { grid-template-columns: 1fr; }
  .est-tools { flex-direction: row; overflow-x: auto; }
  .est-tool { min-width: 58px; }
  .est-stage { height: 60vh; }
  .est-side { overflow: visible; }
}

/* ===== Estampas: criar com IA ===== */
.btn-ai, .est-tool-ai { background: linear-gradient(135deg, var(--accent-3), var(--accent)) !important; color: #fff !important; border-color: transparent !important; }
.est-tool-ai small { color: rgba(255, 255, 255, .9) !important; }
.ai-modal { max-width: 980px; }
.ai-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ai-form { display: grid; gap: 10px; align-content: start; }
.ai-step { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.ai-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; }
.ai-refs { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.ai-ref { position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--panel-2); }
.ai-ref img { width: 100%; height: 100%; object-fit: cover; }
.ai-ref.loading img { opacity: .4; }
.ai-ref.loading::after { content: 'enviando…'; position: absolute; inset: auto 0 6px; text-align: center; font-size: 11px; font-weight: 700; }
.ai-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; font-size: 11px; }
.ai-drop { min-width: 160px; height: 92px; flex: 1; border: 2px dashed var(--line-strong); border-radius: 10px; background: transparent; color: var(--fg); cursor: pointer; display: grid; place-content: center; gap: 2px; text-align: center; }
.ai-drop small { color: var(--fg-muted); }
.ai-drop:hover, .ai-drop.over { border-color: var(--accent); background: var(--accent-soft, rgba(43, 89, 255, .08)); }
.ai-uselayer { width: 100%; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ai-mini { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--panel-2); }
.ai-mini img { width: 100%; height: 100%; object-fit: cover; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chips button { display: grid; gap: 1px; text-align: left; border: 1px solid var(--line-strong); background: var(--panel); color: var(--fg); border-radius: 9px; padding: 6px 11px; cursor: pointer; font-weight: 600; font-size: 13px; }
.ai-chips button small { color: var(--fg-muted); font-weight: 500; font-size: 11px; }
.ai-chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft, #e7edff); color: var(--accent); }
.ai-q button { flex: 1; min-width: 120px; }
.ai-gen { justify-content: space-between; }
.ai-gen select { width: auto; }
.ai-go { padding: 10px 22px; font-size: 15px; }
.ai-cfg summary { cursor: pointer; color: var(--fg-muted); font-size: 12.5px; }
.ai-setup { display: grid; gap: 10px; }
.ai-steps { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.ai-results { display: grid; gap: 12px; align-content: start; max-height: 70vh; overflow: auto; padding-right: 4px; }
.ai-results h3 { margin: 0; font-size: 14px; }
.ai-job { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; display: grid; gap: 8px; }
.ai-job-head { display: flex; gap: 10px; }
.ai-job-refs { display: flex; gap: 3px; flex: none; }
.ai-job-refs img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; }
.ai-job-txt { min-width: 0; font-size: 12.5px; }
.ai-job-txt small { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ai-wait { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--fg-muted); }
.ai-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ai-res { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ai-res a { display: block; aspect-ratio: 1; background: repeating-conic-gradient(#e9ecf3 0% 25%, #cfd5e2 0% 50%) 0 0 / 14px 14px; }
.ai-res img { width: 100%; height: 100%; object-fit: contain; }
.ai-res figcaption { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; align-items: center; }
.ai-res figcaption .btn { padding: 4px 8px; font-size: 12px; }
.ai-res figcaption small { width: 100%; font-size: 11px; }
@media (max-width: 820px) { .ai-wrap { grid-template-columns: 1fr; } .ai-results { max-height: none; } }
.perf-good { color: var(--good, #01b574); } .perf-warn { color: var(--warn, #e08a00); } .perf-bad { color: var(--bad, #e5484d); }
/* custo dos produtos */
.cost-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.cost-list li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cost-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cost-add input { width: 200px !important; flex: none; } .cost-add .cost-in { width: 130px !important; } .cost-add select { width: auto !important; flex: none; }
.cost-cell { font-weight: 600; color: var(--fg); }
.cost-cell:hover { text-decoration: underline; }
/* values with cents: never cut with "…" — shrink a little and wrap if needed */
.ht-value { font-size: clamp(13px, 1.05vw, 17px); white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.kpi-value { font-size: clamp(18px, 1.55vw, 24px); white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.kpi-goal { margin-top: 6px; font-size: 12px; font-weight: 600; }
.kpi-goal.good, .ht-goal.good { color: var(--good, #01b574); } .kpi-goal.bad, .ht-goal.bad { color: var(--bad, #e5484d); }
.ht-goal { display: block; font-size: 11px; font-weight: 600; }
/* diagnóstico: o que fazer */
.fix { margin-top: 10px; }
.fix-toggle { border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--fg); border-radius: 99px; padding: 6px 12px; font: 700 12.5px var(--font); cursor: pointer; }
.fix-toggle:hover { border-color: var(--accent); }
.fix-body { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--panel-2); border: 1px solid var(--line); }
.fix-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; }
.fix-measure { margin: 10px 0 0; font-size: 12.5px; color: var(--fg-muted); }
.fix-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fix-result { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.fix-result.good { background: rgba(1, 181, 116, .14); color: var(--good, #01b574); }
.fix-result.warn { background: rgba(224, 138, 0, .14); color: var(--warn, #e08a00); }
.fix-done { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.fix-done summary { cursor: pointer; font-weight: 700; color: var(--fg-muted); }
.fix-done ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.fix-done li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.fix-done-ic { flex: none; width: 34px; text-align: center; font-weight: 800; color: var(--fg-muted); }
.fix-done-ic.good { color: var(--good, #01b574); }
.fix-done-txt { flex: 1; min-width: 0; }

/* =====================================================================
   GLASSY (out/2026) — verde da logo (#38e1c8) + azul, vidro claro e brilhos.
   Ligado sempre por <html data-visual="glassy"> (js/visual.js).
   ===================================================================== */
:root[data-visual="glassy"] {
  --bg: #070a1a;
  --accent: #38e1c8;
  --accent-b: #1fbfa6;
  --accent-2: #7ff0dc;
  --accent-3: #3b82f6;
  --ac-rgb: 56, 225, 200;
  --ac2-rgb: 127, 240, 220;
  --ac3-rgb: 59, 130, 246;
  --accent-soft: rgba(56, 225, 200, .16);
  --side-active: rgba(56, 225, 200, .16);
  --nav-icon-bg: rgba(255, 255, 255, .06);
  --fg-muted: #a9aed3;
  --good: #34d399; --bad: #fb7185; --warn: #fbbf24;
  --good-soft: rgba(52, 211, 153, .14); --bad-soft: rgba(251, 113, 133, .14); --warn-soft: rgba(251, 191, 36, .14);
  --muted-bar: #1e4f5c; --hour-bar: #1f6f6a; --heat-0: #0f3a3f;
  --hero-2: rgba(56, 225, 200, .14);
  --hero-muted: #b4b9da;
  --hero-accent: #38e1c8;
  --hero-good: #34d399; --hero-bad: #fb7185;
  --glass: linear-gradient(160deg, rgba(255, 255, 255, .085) 0%, rgba(255, 255, 255, .028) 100%);
  --glass-2: linear-gradient(160deg, rgba(255, 255, 255, .11) 0%, rgba(255, 255, 255, .04) 100%);
  --glow: 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 1px 0 rgba(255, 255, 255, .1) inset, 0 18px 48px -24px rgba(3, 4, 20, .9);
  --shadow: var(--glow);
}
:root[data-visual="glassy"] body {
  background:
    radial-gradient(1000px 680px at 6% -8%, rgba(20, 184, 166, .30), transparent 60%),
    radial-gradient(900px 640px at 100% 4%, rgba(37, 99, 235, .30), transparent 62%),
    radial-gradient(1000px 800px at 55% 112%, rgba(56, 225, 200, .18), transparent 60%),
    linear-gradient(165deg, #06182a 0%, #060c1c 50%, #040817 100%);
  background-attachment: fixed;
}
:root[data-visual="glassy"] ::selection { background: rgba(56, 225, 200, .4); }

/* glass surfaces: lighter, with a lit top edge */
:root[data-visual="glassy"] :is(.card, .kpi, .strip, .empty-state, .pr-tile, .mk-attr, .health, .health-card) {
  background: var(--glass);
  box-shadow: var(--glow);
}
:root[data-visual="glassy"] :is(.kpi, .pr-tile) { position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
:root[data-visual="glassy"] :is(.kpi, .pr-tile)::after {
  content: ''; position: absolute; left: 14%; right: 14%; top: 0; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--kc, var(--accent-2)), transparent); opacity: .85;
}
:root[data-visual="glassy"] .kpi:nth-child(4n+2) { --kc: #60a5fa; }
:root[data-visual="glassy"] .kpi:nth-child(4n+3) { --kc: #f472b6; }
:root[data-visual="glassy"] .kpi:nth-child(4n+4) { --kc: #fbbf24; }
@media (hover: hover) {
  :root[data-visual="glassy"] :is(.kpi, .pr-tile):hover { transform: translateY(-3px); box-shadow: var(--glow), 0 18px 44px -18px rgba(var(--ac-rgb), .45); }
  :root[data-visual="glassy"] .card { transition: box-shadow .3s ease; }
  :root[data-visual="glassy"] .card:hover { box-shadow: var(--glow), 0 22px 60px -30px rgba(var(--ac-rgb), .55); }
}
:root[data-visual="glassy"] :is(.mini-stat, .goal-tile, .pe-kpis > div, .attr-kpis > div, .hours-summary > div, .abc-box, .mk-tile, .chan, .plat-row, .vital, .ring-box, .dev, .pr-result, .ref-total, .diag-rec, .pr-sold-item, .pe-comp, .pc, .plan-sec, .plan-item, .group-row) {
  background: rgba(255, 255, 255, .04);
}

/* icon chips: glowing tiles, colour changes from card to card like the reference */
:root[data-visual="glassy"] .ic-chip { background: linear-gradient(135deg, #2bcfb6, #0f8f7e); box-shadow: 0 0 22px -4px rgba(56, 225, 200, .7); }
:root[data-visual="glassy"] .card:nth-of-type(4n+2) .ic-chip { background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 0 22px -4px rgba(59, 130, 246, .75); }
:root[data-visual="glassy"] .card:nth-of-type(4n+3) .ic-chip { background: linear-gradient(135deg, #ec4899, #be185d); box-shadow: 0 0 22px -4px rgba(236, 72, 153, .7); }
:root[data-visual="glassy"] .card:nth-of-type(4n+4) .ic-chip { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 0 22px -4px rgba(245, 158, 11, .65); }

/* sidebar */
:root[data-visual="glassy"] .side {
  background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02));
  box-shadow: 1px 0 0 rgba(255, 255, 255, .08);
}
:root[data-visual="glassy"] .nav-link .nav-icon { color: #7ff0dc; }
:root[data-visual="glassy"] .nav-link:hover { background: rgba(255, 255, 255, .06); }
:root[data-visual="glassy"] .nav-link.active {
  background: linear-gradient(90deg, rgba(56, 225, 200, .32), rgba(59, 130, 246, .14));
  box-shadow: 0 0 26px -8px rgba(56, 225, 200, .55), inset 0 1px 0 rgba(255, 255, 255, .14);
}
:root[data-visual="glassy"] .nav-link.active .nav-icon { background: linear-gradient(135deg, #38e1c8, #1fbfa6); color: #04211d; box-shadow: 0 0 16px -2px rgba(56, 225, 200, .85); }
:root[data-visual="glassy"] .avatar { background: linear-gradient(135deg, #38e1c8, #3b82f6) !important; color: #04211d !important; }

/* top bar, pickers, buttons, inputs */
:root[data-visual="glassy"] .top { background: rgba(10, 9, 34, .5); border-bottom-color: rgba(255, 255, 255, .07); }
:root[data-visual="glassy"] :is(.store-pick, .period-tabs, .filters .seg, .seg) { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
:root[data-visual="glassy"] .seg button[aria-pressed="true"] { background: linear-gradient(135deg, #38e1c8, #1fbfa6); color: #04211d; font-weight: 700; box-shadow: 0 0 18px -4px rgba(56, 225, 200, .75); }
:root[data-visual="glassy"] .btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .13); }
:root[data-visual="glassy"] .btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(56, 225, 200, .45); }
:root[data-visual="glassy"] .btn-primary { background: linear-gradient(135deg, #38e1c8, #1fbfa6); border-color: transparent; color: #04211d; box-shadow: 0 8px 24px -10px rgba(56, 225, 200, .9); }
:root[data-visual="glassy"] .btn-primary:hover { background: linear-gradient(135deg, #5be8d3, #2bcfb6); border-color: transparent; color: #04211d; }
:root[data-visual="glassy"] .btn-danger { background: #e11d48; border-color: #e11d48; }
:root[data-visual="glassy"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
:root[data-visual="glassy"] select, :root[data-visual="glassy"] textarea, :root[data-visual="glassy"] .num-in { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .13); }
:root[data-visual="glassy"] select option { background: #0c1a2c; }
:root[data-visual="glassy"] .num-in input { background: transparent !important; }

/* floating layers stay solid so text never sits on a busy background */
:root[data-visual="glassy"] .period-more, :root[data-visual="glassy"] .toast { background: #0c1a2c; border-color: rgba(56, 225, 200, .22); }
:root[data-visual="glassy"] .tip { background: rgba(10, 22, 38, .96); border-color: rgba(56, 225, 200, .35); }
:root[data-visual="glassy"] .modal { background: linear-gradient(160deg, #0f2236 0%, #08111f 100%); border-color: rgba(56, 225, 200, .18); }
:root[data-visual="glassy"] .table th { background: #0b1626; }
:root[data-visual="glassy"] .table tbody tr:hover td { background: rgba(56, 225, 200, .06); }
:root[data-visual="glassy"] .bottom-nav { background: rgba(6, 14, 28, .88) !important; }

/* hero (pulso) */
:root[data-visual="glassy"] .hero {
  background:
    radial-gradient(720px 380px at 88% -12%, rgba(56, 225, 200, .30), transparent 65%),
    radial-gradient(560px 320px at 0% 112%, rgba(59, 130, 246, .30), transparent 65%),
    linear-gradient(150deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .025) 100%);
  box-shadow: var(--glow), 0 30px 80px -40px rgba(56, 225, 200, .45);
}
:root[data-visual="glassy"] .hero-value { background: linear-gradient(180deg, #ffffff 30%, #c8fbf1); -webkit-background-clip: text; background-clip: text; }
:root[data-visual="glassy"] .hero-tabs { background: rgba(255, 255, 255, .03); }
:root[data-visual="glassy"] .hero-svg .hline { stroke: #38e1c8; filter: drop-shadow(0 0 7px rgba(56, 225, 200, .65)); }
:root[data-visual="glassy"] .hero-svg .hline-prev { stroke: #8b8fc9; }
:root[data-visual="glassy"] .hd-chip.good { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
:root[data-visual="glassy"] .hd-chip.bad { background: rgba(251, 113, 133, .16); color: #fda4af; }
:root[data-visual="glassy"] .goal-fill { background: linear-gradient(90deg, #1fbfa6, #7ff0dc); box-shadow: 0 0 12px rgba(56, 225, 200, .5); }
:root[data-visual="glassy"] .login-side { background: radial-gradient(600px 400px at 20% 10%, rgba(56, 225, 200, .32), transparent 60%), radial-gradient(600px 400px at 90% 90%, rgba(59, 130, 246, .35), transparent 60%), #06101f; }

/* gentle entrance for the view */
@keyframes glassyIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
:root[data-visual="glassy"] .view > * { animation: glassyIn .45s cubic-bezier(.2, .7, .2, 1) both; }
:root[data-visual="glassy"] .view > *:nth-child(2) { animation-delay: .04s; }
:root[data-visual="glassy"] .view > *:nth-child(3) { animation-delay: .08s; }
:root[data-visual="glassy"] .view > *:nth-child(n+4) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) {
  :root[data-visual="glassy"] .view > * { animation: none; }
  :root[data-visual="glassy"] :is(.kpi, .pr-tile):hover { transform: none; }
}

/* ===== Entrada de estoque ===== */
.stk-search { font-size: 15px !important; padding: 11px 14px !important; }
.stk-hint { padding: 18px 2px; }
.stk-scroll { max-height: 560px; overflow: auto; border-radius: 12px; }
.stk-table td { vertical-align: middle; }
.stk-table th.r, .stk-table td.r, .table th.r, .table td.r { text-align: right; }
.stk-off { opacity: .55; }
.stk-add { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
input.stk-qty { width: 76px !important; text-align: center; padding: 6px 8px !important; }
.stk-side { position: sticky; top: 80px; align-self: start; }
.stk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.stk-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.stk-li-name b { display: block; overflow: hidden; text-overflow: ellipsis; }
.stk-total { display: flex; justify-content: space-between; padding: 10px 4px 0; border-top: 1px solid var(--line); font-size: 14px; }
@media (max-width: 1100px) { .stk-side { position: static; } }
/* entrada × saída, câmera */
.stk-mode button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px !important; font-size: 14px !important; }
.stk-mode .count { margin-left: 2px; }
.stk-mode .stk-mode-saida[aria-pressed="true"] { background: linear-gradient(135deg, #fb7185, #e11d48) !important; color: #fff !important; box-shadow: 0 0 18px -4px rgba(244, 63, 94, .75) !important; }
[data-stk-mode="saida"] .stk-side { box-shadow: var(--glow), inset 0 0 0 1px rgba(251, 113, 133, .35); }
.stk-searchbox { position: relative; }
.stk-searchbox .stk-search { padding-right: 56px !important; }
.stk-cam { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 38px; border-radius: 10px; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #04211d; background: linear-gradient(135deg, var(--accent), var(--accent-b, var(--accent))); box-shadow: 0 0 14px -4px rgba(var(--ac-rgb, 0, 117, 255), .8); }
.stk-cam .ic { width: 20px; height: 20px; }
.stk-searchbox input[type=search]::-webkit-search-cancel-button { margin-right: 4px; }
.stk-li-nums { display: flex; gap: 6px; }
.stk-li-nums label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--fg-muted); }
input.stk-val { width: 78px !important; text-align: right; padding: 6px 8px !important; }
input.stk-need { border-color: var(--bad) !important; }
.stk-list li { grid-template-columns: minmax(0, 1fr) auto; }
.stk-list li .stk-li-name { grid-column: 1; grid-row: 1; }
.stk-list li .icon-btn { grid-column: 2; grid-row: 1; align-self: start; }
.stk-list li .stk-li-nums { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
.stk-list li.stk-short { border-color: rgba(251, 113, 133, .5); }
.stk-tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.stk-tag.in { color: var(--good); background: var(--good-soft); }
.stk-tag.out { color: var(--bad); background: var(--bad-soft); }
.stk-scan { display: flex; flex-direction: column; gap: 12px; }
.stk-video-box { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 10; max-height: 56vh; }
.stk-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.stk-aim { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #ff3b5c; box-shadow: 0 0 12px #ff3b5c; }
.stk-aim::before { content: ''; position: absolute; left: 0; right: 0; top: -60px; bottom: -60px; border: 2px solid rgba(255, 255, 255, .55); border-radius: 12px; }
.stk-scan-status { font-size: 14px; text-align: center; }
.stk-scan-ok { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--good-soft); color: var(--fg); }
.stk-scan-ok .ic { color: var(--good); width: 22px; height: 22px; flex: none; }
.stk-scan-bad { padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); }
/* lista de produtos em cartões, com − quantidade + */
.stk-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 620px; overflow: auto; }
.stk-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.stk-card.on { border-color: rgba(var(--ac-rgb, 0, 117, 255), .6); background: rgba(var(--ac-rgb, 0, 117, 255), .08); }
.stk-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stk-card-info > b { font-size: 14.5px; line-height: 1.3; }
.stk-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }
.stk-card-meta b { color: var(--fg); }
.stk-step { display: flex; align-items: center; gap: 6px; flex: none; }
.stk-step-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .06); color: var(--fg); font-size: 22px; font-weight: 600; line-height: 1; cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.stk-step-btn.plus { background: linear-gradient(135deg, var(--accent), var(--accent-b, var(--accent))); color: #04211d; border-color: transparent; }
[data-stk-mode="saida"] .stk-step-btn.plus { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; }
.stk-step input.stk-qty { width: 56px !important; height: 44px; font-size: 16px !important; font-weight: 700; }
.stk-scan-big { display: none !important; }
.stk-bar { display: none; }
.stk-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow: auto; }
.stk-hist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.stk-hist .stk-tag { font-size: 13px; min-width: 44px; text-align: center; }
.stk-hist-main b { display: block; font-size: 13.5px; }
.stk-hist-err { margin-top: 3px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .stk-desk { display: none; }
  .stk-mode { display: grid !important; grid-template-columns: 1fr 1fr 1fr; width: 100%; }
  .stk-mode button { padding: 12px 6px !important; font-size: 14px !important; }
  .stk-mode button { justify-content: center; padding: 12px !important; font-size: 15px !important; }
  .stk-pick { gap: 6px 10px; font-size: 13px; }
  .stk-pick .sel { width: 100% !important; }
  .stk-search { font-size: 16px !important; }
  .stk-scan-big { display: inline-flex !important; padding: 14px !important; font-size: 15.5px; gap: 8px; }
  .stk-scan-big .ic { width: 20px; height: 20px; }
  .stk-cards { max-height: none; }
  .stk-card { padding: 12px; gap: 10px; }
  .stk-card-info > b { font-size: 14px; }
  .stk-side input, .stk-side .stk-qty, .stk-side .stk-val { font-size: 16px !important; }
  .stk-bar { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 35; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 10px 10px 16px; border-radius: 16px; background: rgba(10, 20, 36, .94); border: 1px solid var(--line-strong); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .stk-bar[hidden] { display: none; }
  .stk-bar .btn { padding: 11px 16px; }
  [data-stk-mode] { padding-bottom: 84px; }
  .stk-send { padding: 14px !important; font-size: 15px; }
  .stk-hist li { grid-template-columns: auto minmax(0, 1fr); }
  .stk-hist li > .badge { grid-column: 2; justify-self: start; }
}
@media (max-width: 760px) { .stk-cam { display: none; } .stk-searchbox .stk-search { padding-right: 14px !important; } }
/* estoque: histórico recolhível e ajustes */
.stk-hist-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; font: 700 16.5px/1.3 var(--display, inherit); min-height: 28px; }
.stk-hist-card > summary::-webkit-details-marker { display: none; }
.stk-hist-card > summary .muted { font-weight: 500; margin-left: auto; }
.stk-hist-card .stk-chev { width: 18px; height: 18px; transition: transform .2s; color: var(--fg-muted); }
.stk-hist-card[open] .stk-chev { transform: rotate(180deg); }
.stk-hist-card:not([open]) { padding-top: 16px; padding-bottom: 16px; }
.stk-hist-card .btn { align-self: center; }
.stk-bar.stk-bar-off { opacity: 0; pointer-events: none; transform: translateY(12px); }
.stk-bar { transition: opacity .2s, transform .2s; }
@media (max-width: 760px) {
  .stk-desk-inline { display: none; }
  .stk-cat-btn { padding: 6px 8px !important; }
  .stk-pick { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .stk-pick > b, .stk-pick > .sel { grid-column: 1 / -1; }
  .stk-pick > .muted:not(.small) { grid-column: 1 / -1; }
  .card-head .card-title h2 { font-size: 16px; }
}
.stk-card-meta { gap: 4px 10px; }
.stk-card-meta > span + span::before { content: '·'; margin-right: 10px; opacity: .5; }
.stk-card-meta { display: block; line-height: 1.5; }
.stk-card-meta > span + span::before { margin: 0 6px; }
/* físico / vendido / disponível */
.stk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.stk-chip { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: var(--fg-muted); white-space: nowrap; }
.stk-chip b { color: var(--fg); margin-left: 2px; }
.stk-chip.sold { background: var(--warn-soft); color: var(--warn); }
.stk-chip.sold b { color: var(--warn); }
.stk-chip.free { background: var(--good-soft); color: var(--good); }
.stk-chip.free b { color: var(--good); }
.stk-sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px dashed var(--line-strong); font-size: 13px; color: var(--fg-muted); }
.stk-sum .stk-chips { margin-top: 0; }
.stk-card { flex-wrap: wrap; }
.stk-card > .stk-chips { flex-basis: 100%; margin-top: 0; }
.plan-side { flex-direction: column; gap: 8px; align-items: stretch; }
.plan-side .fix-actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* estoque: transferência entre produtos */
.stk-mode .stk-mode-transferir[aria-pressed="true"] { background: linear-gradient(135deg, #a78bfa, #7c3aed) !important; color: #fff !important; box-shadow: 0 0 18px -4px rgba(139, 92, 246, .75) !important; }
[data-stk-mode="transferir"] .stk-side { box-shadow: var(--glow), inset 0 0 0 1px rgba(167, 139, 250, .35); }
.stk-tx-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: start; }
.stk-tx-arrow { align-self: center; padding-top: 22px; color: var(--fg-muted); }
.stk-tx-arrow .ic { width: 22px; height: 22px; }
.stk-slot { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stk-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
.stk-slot-label { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-muted); }
.stk-slot-chosen { padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(var(--ac-rgb, 0, 117, 255), .6); background: rgba(var(--ac-rgb, 0, 117, 255), .08); display: flex; flex-direction: column; gap: 6px; }
.stk-slot-results .stk-cards { max-height: 360px; }
.stk-pickable .stk-card { padding: 0; }
.stk-pick-btn { all: unset; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; cursor: pointer; border-radius: 14px; }
.stk-pick-btn:hover, .stk-pick-btn:focus-visible { background: rgba(255, 255, 255, .06); outline: none; }
.stk-pick-btn:focus-visible { box-shadow: 0 0 0 2px rgba(var(--ac-rgb, 0, 117, 255), .7); }
.stk-tx-add { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.stk-tx-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.stk-tag.tx { color: #c4b5fd; background: rgba(139, 92, 246, .16); }
.stk-hist-tx .stk-tag.in, .stk-hist-tx .stk-tag.out { outline: 1px dashed rgba(167, 139, 250, .6); }
@media (max-width: 900px) {
  .stk-tx-pair { grid-template-columns: minmax(0, 1fr); }
  .stk-tx-arrow { padding-top: 0; justify-self: center; transform: rotate(90deg); }
}
@media (max-width: 760px) { .stk-slot .stk-cam { display: inline-flex; } .stk-slot .stk-searchbox .stk-search { padding-right: 52px !important; } }
.stk-pick-btn .stk-card-info { flex: 1 1 100%; }
.stk-pickable .stk-card.on { border-color: rgb(var(--ac-rgb, 0, 117, 255)); box-shadow: inset 0 0 0 1px rgb(var(--ac-rgb, 0, 117, 255)), 0 0 16px -6px rgba(var(--ac-rgb, 0, 117, 255), .8); }
.stk-pickable .stk-card.on .stk-card-info > b::before { content: '✓ '; color: rgb(var(--ac-rgb, 0, 117, 255)); }
/* mídia: conjuntos e criativos */
.cr-name { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.cr-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.cr-h { font-size: 14px; margin: 4px 0 10px; color: var(--fg-muted); font-weight: 600; }
.cr-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cr-fig { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.cr-fig img, .cr-ph { width: 100%; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; background: rgba(255, 255, 255, .05); }
.cr-ph .ic { width: 28px; height: 28px; opacity: .5; }
.cr-fig figcaption { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.cr-fig figcaption b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-fig figcaption span { color: var(--fg-muted); }
/* produção: romaneio impresso (2 vias por folha A4) */
.prod-card-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rom-sheet { display: none; }
@media print {
  @page rom { size: A4 portrait; margin: 8mm; }
  .rom-sheet { page: rom; }
  body.printing-rom { background: #fff !important; }
  body.printing-rom > *:not(.rom-sheet) { display: none !important; }
  body.printing-rom .rom-sheet { display: block; color: #000; font: 10.5pt/1.3 Arial, Helvetica, sans-serif; }
  .rom-copy { height: 134mm; box-sizing: border-box; border: 1.2px solid #000; border-radius: 3mm; padding: 4mm 5mm 5mm; display: flex; flex-direction: column; gap: 2.4mm; break-inside: avoid; }
  .rom-cut { text-align: center; font-size: 8pt; color: #555; border-top: 1px dashed #777; margin: 3mm 0; padding-top: 1mm; }
  .rom-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1.2px solid #000; padding-bottom: 2mm; }
  .rom-head h1 { font-size: 15pt; margin: 0; letter-spacing: .02em; text-transform: uppercase; }
  .rom-head small { font-size: 8.5pt; color: #333; }
  .rom-lot { border: 1.2px solid #000; border-radius: 2mm; padding: 1mm 4mm; text-align: center; }
  .rom-lot span { display: block; font-size: 7.5pt; text-transform: uppercase; }
  .rom-lot b { font-size: 14pt; }
  .rom-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2mm 4mm; }
  .rom-f { display: flex; flex-direction: column; border-bottom: 1px solid #000; min-height: 9mm; justify-content: flex-end; }
  .rom-f span { font-size: 7.5pt; text-transform: uppercase; color: #333; }
  .rom-f b { font-size: 10.5pt; font-weight: 700; min-height: 4.5mm; }
  .rom-f.wide { grid-column: 1 / -1; }
  .rom-sizes { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .rom-sizes th, .rom-sizes td { border: 1px solid #000; padding: 1.4mm 1mm; text-align: center; font-size: 10pt; height: 6mm; }
  .rom-sizes thead th { background: #e9e9e9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 9pt; }
  .rom-sizes tbody th { text-align: left; font-size: 8.5pt; width: 18mm; }
  .rom-sizes .rom-tot { font-weight: 700; }
  .rom-cost .rom-f b { font-size: 11pt; }
  .rom-notes { margin: 0; font-size: 9pt; border-bottom: 1px solid #000; min-height: 7mm; }
  .rom-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6mm; margin-top: auto; }
  .rom-sign div { display: flex; flex-direction: column; }
  .rom-sign span { border-bottom: 1px solid #000; height: 8mm; }
  .rom-sign small { font-size: 7.5pt; text-align: center; margin-top: 1mm; }
}
.prod-card-actions .prod-next { flex: 1; align-self: auto; margin-top: 0; }
/* produção: compra de malha */
.fabric-box { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: rgba(14, 165, 233, .05); }
.fabric-box > summary { cursor: pointer; font-weight: 700; padding: 2px 0; }
.fabric-box[open] > summary { margin-bottom: 10px; }
.fabric-lines { display: flex; flex-direction: column; gap: 8px; }
.fabric-line { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; align-items: center; }
.fabric-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fabric-view { display: flex; flex-direction: column; gap: 4px; }
/* produção: vários produtos por lote */
.lot-items-head { margin-top: 4px; }
.lot-items { display: flex; flex-direction: column; gap: 10px; }
.lot-item { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px; background: rgba(255, 255, 255, .025); display: flex; flex-direction: column; gap: 6px; }
.lot-item-head { display: flex; justify-content: space-between; align-items: center; }
.lot-card-items { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.lot-card-items > div { border-left: 2px solid var(--line-strong, rgba(255,255,255,.15)); padding-left: 8px; }
@media print {
  .rom-copy.rom-full { height: auto; min-height: 136mm; }
  .rom-break { break-after: page; height: 0; }
  .rom-multi th, .rom-multi td { font-size: 8.5pt; padding: 1mm .6mm; }
  .rom-multi .rom-prod { text-align: left; width: 34mm; }
  .rom-multi .rom-prod b { display: block; font-size: 8.5pt; }
  .rom-multi .rom-prod small { display: block; font-size: 7pt; font-weight: 400; }
  .rom-multi .rom-sum th, .rom-multi .rom-sum td { font-weight: 700; background: #f2f2f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* produção: relatório por período */
.rep-filters input[type=date] { width: auto; }
.rep-title { display: none; }
.rep-sec h2 { margin: 0 0 10px; }
.rep-sec { display: flex; flex-direction: column; gap: 12px; }
.rep-sums { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.rep-sums > div { display: flex; flex-direction: column; gap: 4px; }
.rep-late td { color: var(--bad); }
.rep-sheet { display: none; }
@media print {
  @page rep { size: A4 landscape; margin: 10mm; }
  .rep-sheet { page: rep; }
  body.printing-rep { background: #fff !important; }
  body.printing-rep > *:not(.rep-sheet) { display: none !important; }
  body.printing-rep .rep-sheet { display: block; color: #000; font: 9.5pt/1.3 Arial, Helvetica, sans-serif; }
  .rep-sheet *, .rep-sheet *::before, .rep-sheet *::after { color: #000 !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-color: #888 !important; }
  .rep-sheet .rep-title { display: block; border-bottom: 1.5px solid #000; margin-bottom: 4mm; padding-bottom: 2mm; }
  .rep-sheet .rep-title h1 { font-size: 16pt; margin: 0; text-transform: uppercase; }
  .rep-sheet .rep-title p { margin: 1mm 0 0; font-size: 9pt; }
  .rep-sheet .kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3mm; margin-bottom: 4mm; }
  .rep-sheet .kpi, .rep-sheet .kpis > * { border: 1px solid #888; border-radius: 2mm; padding: 2mm 3mm; }
  .rep-sheet .card { border: 0; padding: 0; margin: 0 0 5mm; border-radius: 0; break-inside: auto; }
  .rep-sheet .rep-sec h2 { font-size: 12pt; border-bottom: 1px solid #000; padding-bottom: 1mm; margin: 0 0 2mm; }
  .rep-sheet .table-wrap { max-height: none !important; overflow: visible !important; border: 0; }
  .rep-sheet table { width: 100%; border-collapse: collapse; }
  .rep-sheet th, .rep-sheet td { border: 1px solid #999; padding: 1mm 1.5mm; font-size: 8.5pt; position: static !important; }
  .rep-sheet thead th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-weight: 700; text-transform: none; letter-spacing: 0; }
  .rep-sheet tr { break-inside: avoid; }
  .rep-sheet .total-row td { font-weight: 700; }
  .rep-sheet .size-chips span { border: 1px solid #999; }
}
/* resultado: site × marketplaces */
.dre-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dre-split-i { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.dre-split-i span { font-size: 12.5px; color: var(--fg-muted); }
.dre-split-i b { font-size: 17px; }
.dre-split-i.good b { color: var(--good); } .dre-split-i.bad b { color: var(--bad); }
.dre-split-i small { color: var(--fg-muted); font-size: 11.5px; }
.pr-share { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 12px; font-size: 13.5px; }
.pr-share select { width: auto !important; }
.dre-how { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; }
.dre-how summary { cursor: pointer; color: var(--accent, #38e1c8); font-weight: 600; }
.dre-how dl { margin: 10px 0 0; display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: 8px 14px; }
.dre-how dt { font-weight: 700; }
.dre-how dd { margin: 0; color: var(--fg-muted); }
@media (max-width: 600px) { .dre-how dl { grid-template-columns: 1fr; } .dre-how dd { margin-bottom: 6px; } }
.cost-missing { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.cost-missing h3 { font-size: 14.5px; margin: 0 0 8px; }
.cost-missing .cost-list li { grid-template-columns: minmax(0, 1fr) 130px auto; }
/* produção: vários romaneios por folha (3 por A4 em pé) */
.rom-pick { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.rom-pick-i { align-items: flex-start; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
@media print {
  .rom-copy.rom-compact { height: 88mm; padding: 3mm 4mm; gap: 1.6mm; font-size: 8.5pt; border-radius: 2mm; }
  .rom-copy.rom-compact.rom-tall { height: auto; min-height: 88mm; break-inside: avoid; }
  .rom-compact .rom-head { padding-bottom: 1.2mm; }
  .rom-compact .rom-head h1 { font-size: 11pt; }
  .rom-compact .rom-head small { font-size: 7.5pt; }
  .rom-compact .rom-lot { padding: .5mm 3mm; }
  .rom-compact .rom-lot b { font-size: 11pt; }
  .rom-compact .rom-grid { grid-template-columns: repeat(4, 1fr); gap: 1mm 3mm; }
  .rom-compact .rom-f { min-height: 6.5mm; }
  .rom-compact .rom-f span { font-size: 6.5pt; }
  .rom-compact .rom-f b { font-size: 8.5pt; min-height: 3.5mm; }
  .rom-compact .rom-f.wide { grid-column: span 2; }
  .rom-compact .rom-sizes th, .rom-compact .rom-sizes td { font-size: 8pt; padding: .6mm .8mm; height: 4.2mm; }
  .rom-compact .rom-notes { font-size: 7.5pt; min-height: 4mm; }
  .rom-compact .rom-sign { gap: 4mm; }
  .rom-compact .rom-sign span { height: 5.5mm; }
  .rom-compact .rom-sign small { font-size: 6.5pt; }
  .rom-cut.rom-cut-sm { margin: 1.2mm 0; padding-top: 0; font-size: 6pt; line-height: 1; }
}
@media print {
  .rom-compact .rom-multi .rom-prod b { display: inline; font-size: 7.5pt; }
  .rom-compact .rom-multi .rom-prod small { display: inline; font-size: 6.5pt; margin-left: 1mm; }
  .rom-compact .rom-multi th, .rom-compact .rom-multi td { padding: .4mm .6mm; height: 3.8mm; font-size: 7.5pt; }
  .rom-compact .rom-multi .rom-prod { width: 44mm; }
}

/* Costureiras: filtro por período, linha clicável e romaneio do período */
.ws-filters { margin-bottom: 12px; }
.row-click { cursor: pointer; }
.row-click:hover td { background: rgba(255, 255, 255, .03); }
.ws-acts { white-space: nowrap; }
.ws-acts .btn + .btn { margin-left: 6px; }
.ws-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.modal-back:has(.ws-period) { grid-template-columns: minmax(0, 1fr); }
.modal:has(.ws-period) .modal-foot { flex-wrap: wrap; }
.ws-period, .ws-period .stack { max-width: 100%; }
.ws-period .table-wrap { max-width: 100%; overflow-x: auto; }
.ws-period .ws-filters input[type=date] { min-width: 0; }
@media (max-width: 760px) { .ws-period .ws-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rep-sign { display: none; }
@media print {
  @page repv { size: A4 portrait; margin: 10mm; }
  .rep-sheet.rep-portrait { page: repv; }
  .rep-portrait .kpis { gap: 2mm; }
  .rep-portrait .kpi, .rep-portrait .kpis > * { padding: 1.5mm 2mm; min-width: 0; }
  .rep-portrait th, .rep-portrait td { font-size: 8pt; padding: .8mm 1mm; }
  .rep-portrait .table-wrap { margin: 0; padding: 0; }
  .rep-portrait .nw { white-space: nowrap; }
  .rep-sheet .rep-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 16mm; margin-top: 16mm; break-inside: avoid; }
  .rep-sheet .rep-sign div { display: flex; flex-direction: column; }
  .rep-sheet .rep-sign span { border-bottom: 1px solid #000; height: 8mm; }
  .rep-sheet .rep-sign small { font-size: 8pt; text-align: center; margin-top: 1mm; }
}

/* Contas a Pagar */
.bills-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bills-month { display: inline-flex; align-items: center; gap: 8px; }
.bills-month b { min-width: 130px; text-align: center; }
.bills-table .nw { white-space: nowrap; }
.bills-table td.num .btn + .btn { margin-left: 6px; }
.bill-st { font-weight: 650; }
.bill-paga { color: var(--good); }
.bill-vencida { color: var(--bad); }

/* Cadastrar produto */
.cad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.cad-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.cad-cats { max-height: 220px; overflow: auto; }
.cad-line { display: grid; grid-template-columns: 130px 1fr; gap: 10px; overflow-wrap: anywhere; }

/* stage columns can be minimized (Produção) */
.prod-col-btn { width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.prod-col-btn:hover, .prod-col-btn:focus-visible { background: rgba(255, 255, 255, .05); }
.prod-col.min { align-self: start; }

/* e-mail campaign editor: blocks and preview side by side, stacked on small screens */
@media (max-width: 900px) { .mail-editor { grid-template-columns: 1fr !important; } }
