:root {
  color-scheme: dark;
  --bg: #0b1220;
  --sidebar: #0a101c;
  --surface: #111c2c;
  --surface-raised: #152235;
  --surface-soft: #0f1928;
  --border: #26364a;
  --border-strong: #34465c;
  --text: #e8eff7;
  --muted: #91a1b5;
  --faint: #65768c;
  --blue: #46b5f2;
  --cyan: #58d4e9;
  --green: #49d69b;
  --amber: #f2b84b;
  --red: #f07e7e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); }
main { min-height: 100vh; }
.hidden { display: none !important; }
.shell { min-height: 100vh; width: 100%; max-width: none; margin: 0; padding: 0; display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 0; background: var(--bg); }
.sidebar { min-width: 0; min-height: 100vh; padding: 22px 14px 16px; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid #1d2a3b; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 28px; padding: 3px 4px; color: var(--text); text-decoration: none; border: 0; background: transparent; text-align: left; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 37px; color: #071625; font-size: 19px; font-weight: 850; border-radius: 12px; background: linear-gradient(145deg, #68d9ef, #3e9bf0); box-shadow: 0 7px 22px #319be533; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 16px; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: grid; gap: 17px; }
.nav-group { display: grid; gap: 4px; }
.nav-label { margin: 0 10px 3px; color: #687a90; font-size: 9px; font-weight: 750; letter-spacing: .15em; }
.nav button { width: 100%; min-height: 39px; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; color: #a9b8c9; background: transparent; font-size: 12px; font-weight: 550; text-align: left; cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.nav button svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; opacity: .88; }
.nav button:hover { color: var(--text); background: #142136; }
.nav button.active { color: #e9f8ff; background: linear-gradient(90deg, #153452, #142338); border-color: #274867; box-shadow: inset 2px 0 #4bbaf2; font-weight: 700; }
.nav button.active svg { color: #56c7f5; opacity: 1; }
.nav button[data-screen=ads] { margin-top: 0; border-top: 1px solid transparent; border-radius: 8px; }
.sidebar-footer { position: relative; display: flex; align-items: center; gap: 9px; margin: auto 3px 0; padding: 13px 0 0; border-top: 1px solid #1c293a; color: #c8d4e2; font-size: 11px; }
.owner-profile { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 5px 6px; text-align: left; background: transparent; border-color: transparent; }
.owner-profile:hover, .owner-profile[aria-expanded="true"] { background: #142136; border-color: #263b53; }
.owner-profile-copy { min-width: 0; display: grid; gap: 3px; text-align: left; }
.owner-profile-copy strong { font-size: 11px; }
.owner-profile-copy small, .owner-menu-heading small { color: var(--faint); font-size: 10px; }
.owner-chevron { margin-left: auto; color: var(--muted); font-size: 15px; }
.owner-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; color: #b8e9fa; background: #173954; font-size: 10px; font-weight: 800; }
.owner-menu { position: absolute; z-index: 30; left: 0; bottom: calc(100% + 9px); width: 226px; padding: 7px; background: #111c2c; border: 1px solid #34465c; border-radius: 11px; box-shadow: 0 16px 42px #0009; }
.owner-menu-heading { display: grid; gap: 3px; padding: 9px 10px 11px; }
.owner-menu-heading strong { font-size: 11px; }
.owner-menu-item { width: 100%; min-height: 34px; display: block; padding: 8px 10px; text-align: left; border: 0; color: #d8e3ee; background: transparent; font-size: 11px; }
.owner-menu-item:hover:not(:disabled) { background: #1a2c43; }
.owner-menu-item:disabled { color: #66778d; opacity: .8; cursor: default; }
.owner-menu-item.danger { color: #f1a8a2; }
.owner-menu-separator { height: 1px; margin: 5px 4px; background: #28384d; }
.sidebar-footer small { color: var(--faint); font-size: 10px; }
.workspace { min-width: 0; min-height: 100vh; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px clamp(20px, 2.6vw, 48px); position: sticky; top: 0; z-index: 8; background: #0d1726ed; border-bottom: 1px solid #1e2c3d; backdrop-filter: blur(16px); }
.page-heading h1 { margin: 0; color: #f0f5fa; font-size: 22px; font-weight: 720; letter-spacing: -.035em; }
.page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
#dashboard-period-host:empty { display: none; }
#dashboard-period-host .filter-row, #dashboard-period-host>label { display: flex; align-items: center; margin: 0; }
#dashboard-period-host label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
#dashboard-period-host select { width: auto; min-width: 120px; height: 35px; padding: 6px 28px 6px 10px; background-color: #142033; }
.view { min-width: 0; padding: 24px clamp(20px, 2.6vw, 48px) 46px; }
.view h2 { color: #edf3fa; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.view h3 { color: #e5edf7; }
.subtle, .muted, .view p.subtle { color: var(--muted); }
.eyebrow, .section-kicker { color: #62c9ea; font-size: 9px; font-weight: 760; letter-spacing: .15em; }
button, .button { min-height: 34px; padding: 8px 12px; color: #d9e7f5; background: #17263a; border: 1px solid #30445c; border-radius: 8px; font: inherit; font-size: 12px; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
button:hover, .button:hover { background: #20344e; border-color: #42617d; }
button:disabled { cursor: not-allowed; opacity: .45; }
button.primary, .login-card button[type=submit], .dialog-actions button[type=submit] { color: #041725; background: linear-gradient(110deg, #55c5ef, #5bb0f1); border-color: transparent; font-weight: 750; }
button.primary:hover, .login-card button[type=submit]:hover, .dialog-actions button[type=submit]:hover { background: #7ad7f4; }
.quiet { color: var(--muted); background: transparent; border: 0; }
.view-head, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 17px; }
.view-head h2 { margin: 0; }
.panel, .metric, .detail-card, .login-card { color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 9px 30px #02081226; }
.metric, .detail-card { padding: 19px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.metric strong { color: #eff6fc; }
.metric span, .metric small { color: var(--muted); }
.form-grid.two, .detail-grid { gap: 14px; }
label { color: #c2cfde; }
input, select, textarea { color: #e6edf5; background: #0d1726; border: 1px solid #31445b; border-radius: 7px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #3f9bd366; border-color: #4aabe1; }
input::placeholder, textarea::placeholder { color: #73839a; }
.table-wrap { overflow: auto; color: var(--text); background: #101a29; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; min-width: 620px; border-collapse: collapse; }
th, td { padding: 11px 13px; color: #d7e1ed; border-bottom: 1px solid #243348; text-align: left; vertical-align: top; }
th { color: #97a9be; background: #152235; font-size: 10px; font-weight: 700; letter-spacing: .025em; }
td { font-size: 12px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #142237; }
.badge { display: inline-block; padding: 4px 8px; color: #bdd0e3; background: #203249; border-radius: 99px; font-size: 10px; font-weight: 700; }
.badge.active, .badge.open, .badge.ready, .badge.confirmed, .badge.full_payment { color: #8de4b9; background: #173a31; }
.badge.closed, .badge.inactive, .badge.posted { color: #a1afbe; background: #243143; }
.badge.unpaid, .badge.deposit { color: #f1c66c; background: #44351b; }
.empty { padding: 30px 18px; color: var(--muted); text-align: center; }
.filter-row { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.filter-row label { min-width: 145px; }
.subnav { display: flex; gap: 8px; margin: 0 0 14px; }
.sync-summary { display: flex; flex-wrap: wrap; gap: 9px 17px; margin: 12px 0 16px; padding: 12px 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; font-size: 11px; }
.item-row, .detail-item { color: var(--text); background: var(--surface-soft); border: 1px solid var(--border); }
.unpaid, .unpaid-row td { color: #f2c8a4; background: #34251f; }
.badge.unpaid { color: #ffb0a1; background: #47251f; }
.editor { width: min(760px, calc(100vw - 24px)); max-height: 90vh; padding: 22px; color: var(--text); background: #111c2c; border: 1px solid var(--border-strong); border-radius: 13px; box-shadow: 0 20px 70px #0009; }
.editor::backdrop { background: #020711b8; }
.dialog-head h2 { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.error { min-height: 1.2em; color: #ff9b91; }
.help { color: var(--muted); }
.toast { position: fixed; inset: 24px auto auto 50%; transform: translateX(-50%); z-index: 2147483647; width: min(460px,calc(100vw - 24px)); max-height: calc(100dvh - 48px); overflow: auto; margin: 0; padding: 0; border: 0; background: transparent; pointer-events: none; display: grid; gap: 8px; }
.toast::backdrop { background: transparent; pointer-events: none; }
.toast-entry { display: flex; align-items: start; gap: 12px; padding: 14px 16px; color: #eaf6ff; background: #173d59; border: 1px solid #2c6388; border-radius: 10px; box-shadow: 0 8px 30px #0005; pointer-events: auto; overflow-wrap: anywhere; }
.toast-entry span { flex: 1; }
.toast-entry button { padding: 0 5px; min-width: 24px; border: 0; background: transparent; color: inherit; font-size: 20px; }
.toast-entry.error { background: #512825; border-color: #90433b; }
.toast-entry.warning { background: #493919; border-color: #96782f; }
.toast-entry.success { background: #173a31; border-color: #347858; }
.row-menu { position: relative; display: inline-block; }
.row-menu summary { display: grid; place-items: center; width: 34px; min-height: 32px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; list-style: none; font-size: 20px; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu-panel { display: grid; min-width: 190px; margin-top: 6px; padding: 6px; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.row-menu-panel button { text-align: left; white-space: normal; }
.row-menu-panel .danger { color: #ef8880; }
.costing-subnav { flex-wrap: wrap; }
.cost-preview { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); overflow-wrap: anywhere; }
.editor fieldset { min-width: 0; margin: 12px 0; padding: 14px; border: 1px solid var(--border); border-radius: 9px; }
.editor legend { font-weight: 700; }
@media(max-width:600px) { .toast { top: 16px; } .editor .form-grid.two { grid-template-columns: minmax(0,1fr); } .costing-subnav button { flex: 1 1 140px; } }
.dashboard-stack { display: grid; gap: 17px; max-width: 1700px; margin: 0 auto; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.kpi-card { position: relative; min-height: 136px; padding: 17px 18px 15px; overflow: hidden; background: linear-gradient(145deg, #142236, #111c2b 72%); border: 1px solid #2a3b50; border-radius: 12px; box-shadow: 0 8px 20px #0309141f; }
.kpi-card::after { position: absolute; right: -24px; bottom: -44px; width: 118px; height: 118px; border: 1px solid #67c8f00c; border-radius: 50%; content: ""; }
.kpi-label { margin-top: 10px; color: #becbda; font-size: 10px; font-weight: 660; }
.kpi-label span { color: #73859b; font-size: 9px; font-weight: 500; }
.kpi-value { display: block; margin-top: 5px; color: #f0f6fc; font-size: clamp(25px, 2vw, 31px); line-height: 1.15; font-weight: 760; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.kpi-value.is-zero { color: #8b9aac; }
.kpi-foot { display: block; margin-top: 6px; color: #788ba1; font-size: 9px; }
.kpi-icon { float: right; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: #173451; color: #61c8ee; }
.kpi-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.customer-icon { color: #74d7c4; background: #173a38; }
.order-icon { color: #a7a7ff; background: #2a2c52; }
.pcs-icon { color: #e5bf7c; background: #3a3021; }
.revenue-icon { color: #73e1ac; background: #173b31; }
.kpi-revenue { border-color: #285a50; background: linear-gradient(135deg, #152a2c, #12202d 78%); }
.kpi-revenue .kpi-value { color: #8de7b8; font-size: clamp(26px, 2.15vw, 33px); }
.dashboard-primary-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, .92fr); gap: 15px; }
.dashboard-secondary-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .95fr); gap: 15px; }
.dash-card { min-width: 0; padding: 18px 19px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 22px #03091420; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 13px; }
.card-heading h2 { margin: 4px 0 0; }
.section-kicker { margin: 0; color: #7892ad; font-size: 8px; }
.card-subtitle, .card-caption { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.period-badge { flex: 0 0 auto; margin-top: 8px; padding: 5px 8px; color: #95a9bc; background: #18273a; border: 1px solid #2a3b50; border-radius: 7px; font-size: 9px; }
.trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.trend-panel { min-width: 0; padding: 12px 12px 8px; background: #0e1827; border: 1px solid #213147; border-radius: 9px; }
.trend-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.trend-heading strong { color: #e7eff8; font-size: 13px; font-variant-numeric: tabular-nums; }
.trend-revenue .trend-heading strong { color: #87e4b5; }
.sparkline { display: block; width: 100%; height: 112px; overflow: visible; margin-top: 4px; color: var(--blue); }
.trend-orders .sparkline { color: #7cacef; }
.chart-gridline { stroke: #27374a; stroke-width: 1; stroke-dasharray: 3 5; }
.chart-area { fill: currentColor; opacity: .10; }
.chart-line { fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-end { fill: currentColor; stroke: #101a29; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-empty { height: 112px; display: grid; place-items: center; color: #71839a; font-size: 10px; }
.trend-labels { display: flex; justify-content: space-between; color: #71839a; font-size: 8px; }
.dash-empty { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); text-align: center; }
.dash-empty strong { color: #cbd7e4; font-size: 11px; }
.dash-empty span { max-width: 300px; color: #8293a7; font-size: 10px; }
.dash-empty.compact { min-height: 96px; }
.empty-mark { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 3px; color: #77c8ed; background: #163047; border-radius: 50%; font-size: 14px; }
.attention-card { border-color: #3b3b30; }
.attention-dot { width: 8px; height: 8px; margin: 6px 3px 0 0; background: var(--amber); border-radius: 50%; box-shadow: 0 0 10px #f2b84b55; }
.attention-row { width: 100%; min-height: 64px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto 12px; align-items: center; gap: 10px; padding: 9px 4px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid #253448; border-radius: 0; }
.attention-row:last-of-type { border-bottom: 0; }
.attention-row:hover { background: #172538; }
.attention-symbol { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; font-size: 14px; }
.attention-symbol.amber { color: var(--amber); background: #45381f; }
.attention-symbol.blue { color: #72cafa; background: #1b354a; }
.attention-copy { display: grid; gap: 4px; }
.attention-copy strong { color: #e2eaf3; font-size: 11px; }
.attention-copy small { color: #8495aa; font-size: 9px; }
.attention-count { font-size: 13px; font-variant-numeric: tabular-nums; }
.amber-text { color: var(--amber); }
.blue-text { color: #76c9f2; }
.attention-arrow { color: #8292a6; font-size: 19px; }
.attention-foot, .card-footnote { margin: 11px 0 0; color: #78899e; font-size: 9px; line-height: 1.5; }
.source-warning { padding: 12px 10px; color: #c5a96c; background: #292519; border: 1px solid #554728; border-radius: 8px; font-size: 10px; }
.funnel-track { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 1px 8px; }
.funnel-step { min-width: 0; display: flex; flex: 1 1 0; flex-direction: column; gap: 5px; }
.funnel-step strong { color: #f0f5fb; font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
.funnel-step>span:last-child { overflow: hidden; color: #95a7bb; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.funnel-index { color: #647990; font-size: 8px; font-weight: 750; letter-spacing: .08em; }
.funnel-arrow { flex: 0 0 auto; margin-top: 12px; color: #4f6e8b; font-size: 16px; }
.text-link { min-height: auto; padding: 3px 0; color: #68c4ef; background: transparent; border: 0; font-size: 10px; }
.text-link:hover { color: #a4e4ff; background: transparent; border: 0; }
.text-link span { margin-left: 3px; }
.ads-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.ads-summary-grid>div { display: grid; gap: 8px; min-width: 0; padding: 11px 10px; background: #0e1827; border: 1px solid #213147; border-radius: 8px; }
.ads-summary-grid span, .payment-summary-grid span { color: #8fa1b6; font-size: 9px; }
.ads-summary-grid strong { overflow: hidden; color: #edf4fb; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.payment-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.payment-summary-grid>div { display: grid; gap: 5px; min-width: 0; padding: 10px 11px; background: #0e1827; border: 1px solid #213147; border-radius: 8px; }
.payment-summary-grid strong { overflow: hidden; color: #e7eff8; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.payment-summary-grid small { color: #bd9e64; font-size: 8px; }
.payment-summary-grid .positive-value { color: #84e0b1; }
.operations-list { display: grid; }
.operations-list>div { min-height: 35px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid #243348; }
.operations-list>div:last-child { border-bottom: 0; }
.operations-list span:nth-child(2) { color: #9aabbd; font-size: 10px; }
.operations-list strong { color: #e1eaf3; font-size: 11px; font-variant-numeric: tabular-nums; }
.ops-icon { color: #68badf; font-size: 13px; text-align: center; }
.spotlight-card { padding-bottom: 8px; }
.spotlight-list { display: grid; }
.spotlight-row { display: grid; grid-template-columns: 52px minmax(160px, 1.15fr) minmax(180px, 1fr) 52px; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid #243348; }
.spotlight-code { width: fit-content; padding: 5px 7px; color: #8eddfa; background: #17334a; border-radius: 6px; font-size: 9px; font-weight: 750; }
.spotlight-main, .spotlight-batch { display: grid; gap: 4px; min-width: 0; }
.spotlight-main strong { overflow: hidden; color: #dfe9f3; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.spotlight-main span, .spotlight-batch { color: #8a9bb0; font-size: 9px; line-height: 1.5; }
.spotlight-total { display: grid; justify-items: end; gap: 1px; }
.spotlight-total strong { color: #e6eff8; font-size: 15px; font-variant-numeric: tabular-nums; }
.spotlight-total span { color: #74869b; font-size: 8px; }
.dashboard-source-note { margin: 0; color: #667991; font-size: 9px; text-align: right; }
.login-card { width: min(440px, calc(100vw - 32px)); margin: 10vh auto; padding: 28px; }
.login-card h2 { margin: 8px 0 10px; color: #edf5fc; }
.login-card p { color: var(--muted); line-height: 1.55; }
.login-card form { display: grid; gap: 14px; }
.login-card button[type=submit] { min-height: 42px; }
.factory-sheet { color: #17232d; background: #fff; border-color: #d9e0e5; }
.factory-sheet table, .factory-sheet th, .factory-sheet td { color: #17232d; background: #fff; border-color: #ccd5dc; }
.factory-sheet th { color: #263d51; background: #edf2f5; }
@media (min-width: 1600px) { .dashboard-stack { gap: 19px; } .kpi-card { min-height: 144px; padding: 19px 21px 16px; } .dash-card { padding: 20px 21px; } }
@media (max-width: 1360px) { .kpi-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 1120px) { .shell { grid-template-columns: 205px minmax(0,1fr); } .sidebar { padding-inline: 10px; } .dashboard-primary-grid { grid-template-columns: minmax(0,1.5fr) minmax(275px,.95fr); } .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 850px) { .shell { grid-template-columns: 72px minmax(0,1fr); } .sidebar { align-items: center; padding-inline: 8px; } .brand { margin: 0 0 24px; } .brand-copy, .nav-label, .nav button span, .owner-profile-copy, .owner-chevron { display: none; } .brand-mark { width: 38px; height: 38px; } .nav { width: 100%; gap: 14px; } .nav-group { width: 100%; } .nav button { justify-content: center; width: 48px; min-height: 42px; margin-inline: auto; padding: 9px; } .nav button svg { width: 19px; height: 19px; } .sidebar-footer { width: 100%; justify-content: center; margin-inline: 0; } .owner-profile { width: 48px; justify-content: center; } .dashboard-primary-grid, .dashboard-secondary-grid { grid-template-columns: 1fr; } .topbar { min-height: 72px; } }
@media (max-width: 620px) { .shell { display: flex; flex-direction: column; } .sidebar { min-height: auto; width: 100%; align-items: stretch; padding: 9px 12px 8px; border-right: 0; border-bottom: 1px solid #1d2a3b; } .brand { display: none; } .nav { display: flex; gap: 0; overflow-x: auto; padding-bottom: 1px; scrollbar-width: thin; } .nav-group { display: contents; } .nav-label { display: none; } .nav button { width: 45px; min-width: 45px; min-height: 42px; margin: 0 2px; } .nav button span { display: none; } .sidebar-footer { display: flex; width: auto; flex: 0 0 auto; align-self: flex-end; margin: 0 0 0 4px; padding: 0; border: 0; } .owner-profile { width: 39px; min-height: 40px; justify-content: center; padding: 3px; } .owner-profile-copy, .owner-chevron { display: none; } .owner-menu { left: auto; right: 0; bottom: calc(100% + 9px); } .topbar { position: static; min-height: 66px; padding: 12px 16px; gap: 9px; } .page-heading h1 { font-size: 18px; } .page-heading p { font-size: 9px; } .topbar-actions { gap: 7px; } #dashboard-period-host label { gap: 5px; font-size: 9px; } #dashboard-period-host label:first-child { font-size: 0; } #dashboard-period-host select { min-width: 94px; height: 32px; padding-inline: 7px 22px; font-size: 10px; } .view { padding: 15px 12px 28px; } .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; } .kpi-card { min-height: 125px; padding: 12px; } .kpi-icon { width: 27px; height: 27px; } .kpi-label { max-width: calc(100% - 31px); margin-top: 8px; font-size: 9px; } .kpi-value, .kpi-revenue .kpi-value { font-size: 22px; } .kpi-foot { font-size: 8px; } .dash-card { padding: 14px; } .trend-grid { grid-template-columns: 1fr; gap: 8px; } .spotlight-row { grid-template-columns: 45px minmax(0,1fr) 44px; gap: 8px; } .spotlight-batch { grid-column: 2/4; grid-row: 2; } .spotlight-total { grid-column: 3; grid-row: 1; } .funnel-track { gap: 4px; padding-top: 9px; } .funnel-step strong { font-size: 16px; } .funnel-step>span:last-child { font-size: 8px; } .funnel-arrow { font-size: 12px; } .ads-summary-grid { gap: 5px; } .ads-summary-grid>div { padding: 8px 7px; } .ads-summary-grid strong { font-size: 11px; } .payment-summary-grid strong { font-size: 12px; } .filter-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); } .form-grid.two, .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 390px) { .kpi-label span { display: block; margin-top: 2px; } .kpi-value, .kpi-revenue .kpi-value { font-size: 19px; } .funnel-step>span:last-child { max-width: 62px; } }
@media print {
  .topbar, .sidebar, .no-print, #login-panel, .toast, .editor { display: none !important; }
  .shell { display: block !important; max-width: none; margin: 0; padding: 0; }
  .view { width: 100%; min-width: 0; padding: 0; }
  .factory-sheet { color: #111; background: #fff; border: 0; border-radius: 0; box-shadow: none; }
  .factory-sheet th, .factory-sheet td { color: #111; background: #fff; border: 1px solid #888; }
}

/* Dashboard intelligence is deliberately compact and metric-led. */
.intelligence-row { align-items: stretch; }
.brief-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.brief-list li { display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 9px; align-items: start; }
.brief-index { display: grid; place-items: center; width: 22px; height: 22px; color: #9fe6ff; background: #17364d; border-radius: 7px; font-size: 9px; font-weight: 750; }
.brief-list li>div { display: grid; gap: 4px; }
.brief-list strong { color: #dce8f4; font-size: 11px; line-height: 1.5; }
.brief-list small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.coverage-stat { display: flex; align-items: baseline; gap: 9px; margin: 15px 0 8px; }
.coverage-stat strong { color: #7fdbb0; font-size: 28px; font-variant-numeric: tabular-nums; }
.coverage-stat span, .data-limits { color: var(--muted); font-size: 10px; }
.data-limits { margin-top: 13px; padding: 9px 10px; background: #172334; border: 1px solid #2a3b50; border-radius: 8px; line-height: 1.5; }
.campaign-watch-card { border-color: #2d4962; }
.watch-design-filter { min-width: 132px; color: var(--muted); font-size: 9px; }
.watch-design-filter select { min-width: 130px; margin-top: 5px; padding: 7px 24px 7px 9px; font-size: 10px; }
.watch-list { display: grid; gap: 9px; }
.watch-row { display: grid; grid-template-columns: minmax(170px,1.4fr) minmax(175px,1fr) auto; gap: 14px; align-items: center; padding: 12px; background: #0e1827; border: 1px solid #26374d; border-radius: 9px; }
.watch-row.is-ignored { opacity: .55; }
.watch-main { min-width: 0; }
.watch-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.watch-label strong { overflow-wrap: anywhere; font-size: 11px; }
.watch-design { color: #96b8d2; font-size: 9px; }
.watch-badge { padding: 3px 6px; color: #f1cd7b; background: #3a301c; border-radius: 99px; font-size: 8px; font-weight: 750; letter-spacing: .04em; }
.watch-main p { margin: 7px 0 3px; color: #b6c5d5; font-size: 9px; line-height: 1.45; }
.watch-main small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.watch-metrics { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--muted); font-size: 9px; }
.watch-metrics span { display: grid; gap: 3px; }
.watch-metrics b { color: #dce8f4; font-size: 10px; }
.watch-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.watch-actions button { min-height: 29px; padding: 5px 7px; font-size: 9px; }
.comparison-legend { display: flex; gap: 13px; margin: 4px 0 12px; color: var(--muted); font-size: 9px; }
.comparison-legend span { display: flex; align-items: center; gap: 5px; }
.comparison-legend i { width: 8px; height: 8px; display: inline-block; border-radius: 3px; }
.bar-leads { background: #48b7ea; }
.bar-orders { background: #a48af5; }
.bar-pcs { background: #66d8ab; }
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 10px; }
.comparison-group { min-width: 0; padding: 11px; background: #0e1827; border: 1px solid #25364a; border-radius: 9px; }
.comparison-title { display: grid; gap: 3px; margin-bottom: 7px; }
.comparison-title strong { color: #edf4fc; font-size: 11px; }
.comparison-title span { min-height: 12px; color: var(--muted); font-size: 9px; }
.comparison-bars { height: 114px; display: flex; align-items: stretch; justify-content: center; gap: 19px; padding-top: 8px; border-bottom: 1px solid #324258; }
.comparison-bar-column { width: 44px; display: grid; grid-template-rows: 14px 1fr 15px; justify-items: center; gap: 3px; }
.comparison-bar-value { color: #d8e4f1; font-size: 9px; font-variant-numeric: tabular-nums; }
.comparison-bar-track { width: 22px; display: flex; align-items: end; overflow: hidden; background: #172334; border-radius: 4px 4px 0 0; }
.comparison-bar { width: 100%; min-height: 0; border-radius: 4px 4px 0 0; }
.comparison-bar-column small { color: var(--muted); font-size: 8px; }
.comparison-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-top: 9px; }
.comparison-facts span { display: grid; gap: 3px; color: var(--muted); font-size: 8px; }
.comparison-facts b { color: #d8e4f1; font-size: 9px; font-variant-numeric: tabular-nums; }
.pace-list { display: grid; gap: 7px; }
.pace-row { display: grid; grid-template-columns: minmax(55px,.45fr) minmax(130px,1fr) minmax(125px,.9fr) auto; gap: 10px; align-items: center; padding: 9px 10px; background: #0e1827; border: 1px solid #25364a; border-radius: 8px; font-size: 9px; }
.pace-row strong { color: #d8e9f5; }
.pace-row span { color: var(--muted); }
.pace-row b { color: #dce8f4; font-size: 9px; white-space: nowrap; }
.pace-row small { grid-column: 2/-1; color: var(--muted); font-size: 8px; }
@media (max-width: 1050px) { .watch-row { grid-template-columns: 1fr 1fr; } .watch-actions { grid-column: 1/-1; justify-content: flex-start; } .pace-row { grid-template-columns: auto 1fr; } .pace-row b { justify-self: start; } }
@media (max-width: 620px) { .watch-row { grid-template-columns: 1fr; gap: 9px; } .watch-actions { grid-column: auto; } .card-heading { flex-wrap: wrap; } .watch-design-filter { width: 100%; } .watch-design-filter select { width: 100%; } .comparison-grid { grid-template-columns: 1fr; } .pace-row { grid-template-columns: 1fr 1fr; gap: 6px; } .pace-row span:nth-of-type(2) { grid-column: 1/-1; } .pace-row b { white-space: normal; } .pace-row small { grid-column: 1/-1; } }

.field-wide { grid-column: 1 / -1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 12px; color: var(--text); }
.field-wide legend { padding: 0 6px; font-weight: 650; }
.field-wide > small { display: block; margin-top: 8px; color: var(--muted); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); }
.check-row input { width: auto; margin: 0; accent-color: var(--blue); }
.check-row small { color: var(--muted); font-weight: 400; }
.design-price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.design-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); }
.design-price-row > span:last-child { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.design-price-row input { width: 105px; padding: 7px 8px; }
@media (max-width: 620px) { .check-grid, .design-price-grid { grid-template-columns: 1fr; } }

.owner-action-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 6px; margin: 8px 0 14px; }
.owner-action-summary > div { min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); }
.owner-action-summary dt { color: var(--muted); font-size: 11px; }
.owner-action-summary dd { margin: 3px 0 0; color: var(--text); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.compact-card { margin: 10px 0; padding: 13px; }
.compact-card h3 { margin: 0 0 8px; font-size: 14px; }
.compact-card .card-heading { gap: 10px; }
.compact-card .table-wrap { margin-top: 9px; }
