/* ==========================================================================
   Adlytiq app UI — full logged-in product (light theme)
   Reuses tokens from styles.css. Read-only analytics — no edit controls.
   ========================================================================== */

#app-root { height: 100%; }

.app {
  --side-w: 244px;
  --topbar-h: 60px;
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  height: 100vh;
  background: var(--bg-2);
  color: var(--ink-2);
  overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.side {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 14px 12px;
  min-height: 0;
}
.side-ws {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; cursor: pointer; transition: background .15s;
}
.side-ws:hover { background: var(--bg-2); }
.side-ws .mk { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.side-ws .mk svg { width: 16px; height: 16px; }
.side-ws .nm { font-size: 13.5px; font-weight: 640; color: var(--ink); letter-spacing: -.01em; }
.side-ws .id { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.side-ws .cv { margin-left: auto; color: var(--faint); }

.side-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 7px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--r-xs);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  border: 1px solid transparent; cursor: pointer;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--bg-2); color: var(--ink); }
.nav-item svg { width: 18px; height: 18px; color: var(--faint); flex-shrink: 0; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item.active svg { color: var(--primary); }
.nav-item .badge { margin-left: auto; font-size: 10.5px; font-family: var(--font-mono); color: var(--faint); }

.side-spacer { flex: 1; }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; transition: background .15s; }
.side-user:hover { background: var(--bg-2); }
.side-user .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), color-mix(in oklab, var(--primary) 50%, var(--positive))); flex-shrink: 0; }
.side-user .nm { font-size: 13px; font-weight: 600; color: var(--ink); }
.side-user .em { font-size: 11px; color: var(--faint); }
.side-user .cv { margin-left: auto; color: var(--faint); }

/* ── Main column ───────────────────────────────────────────────────────── */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, #fff 80%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  flex-shrink: 0;
}
.topbar .pg-title { font-size: 16px; font-weight: 640; color: var(--ink); letter-spacing: -.01em; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.tb-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-xs);
  background: #fff; font-size: 13px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; transition: background .14s, border-color .14s;
  white-space: nowrap;
}
.tb-chip:hover { background: var(--bg-2); border-color: #d6deea; }
.tb-chip svg { width: 15px; height: 15px; color: var(--muted); }
.tb-chip.sync { cursor: default; }
.tb-chip .sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 3px var(--positive-soft); }
.tb-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-xs); background: #fff; color: var(--muted); cursor: pointer; transition: background .14s; }
.tb-icon:hover { background: var(--bg-2); color: var(--ink); }
.tb-icon svg { width: 17px; height: 17px; }
.tb-icon .dot-n { position: absolute; }

/* scroll region */
.scroll { flex: 1; overflow-y: auto; min-height: 0; }
.page { padding: 22px 26px 60px; max-width: 1320px; margin: 0 auto; }

/* ── Demo banner ───────────────────────────────────────────────────────── */
.demo-banner {
  display: flex; align-items: center; gap: 14px;
  margin: 18px 26px 0;
  padding: 12px 16px;
  border: 1px solid color-mix(in oklab, var(--primary) 24%, var(--line));
  background: var(--primary-soft);
  border-radius: var(--r);
}
.demo-banner .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #fff; color: var(--primary); flex-shrink: 0; }
.demo-banner .ic svg { width: 16px; height: 16px; }
.demo-banner .tx { font-size: 13.5px; color: var(--ink-2); }
.demo-banner .tx b { color: var(--ink); font-weight: 600; }
.demo-banner .btn { margin-left: auto; }

/* ── Page header ───────────────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.page-head .desc { font-size: 14px; color: var(--muted); margin-top: 4px; }
.page-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ── KPI cards ─────────────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.kcard { padding: 16px 17px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.kcard.hl { background: var(--primary-soft); border-color: color-mix(in oklab, var(--primary) 26%, var(--line)); }
.kcard .lab { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kcard .val { font-size: 27px; font-weight: 720; color: var(--ink); letter-spacing: -.022em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kcard.hl .val { color: var(--primary); }
.kcard .delta { display: inline-flex; align-items: center; gap: 4px; margin-top: 9px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kcard .delta svg { width: 13px; height: 13px; }
.kcard .delta .vs { color: var(--faint); font-weight: 500; margin-left: 2px; }
.delta.pos { color: var(--positive); }
.delta.neg { color: var(--negative); }

/* ── Panels ────────────────────────────────────────────────────────────── */
.panels { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 14px; }
.pnl { border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 16px 18px 14px; }
.pnl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pnl-head .t { font-size: 14px; font-weight: 640; color: var(--ink); }
.pnl-head .sub { font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.legend i.bar { background: color-mix(in oklab, var(--primary) 70%, white); }
.legend i.line { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }

.chart { width: 100%; display: block; }

/* spend-by-campaign horizontal bars */
.hbar-row { display: grid; grid-template-columns: 120px 1fr 56px; align-items: center; gap: 12px; padding: 7px 0; }
.hbar-row .nm { font-size: 12.5px; color: var(--ink-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 9px; border-radius: 99px; background: var(--bg-3); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 99px; }
.hbar-row .amt { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ── Tables ────────────────────────────────────────────────────────────── */
.tbl-wrap { border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.tbl-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tbl-head .t { font-size: 14px; font-weight: 640; color: var(--ink); }
.tbl-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.tbl-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: right; font-weight: 500; color: var(--faint);
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--bg-2); cursor: pointer; user-select: none;
}
table.tbl th:first-child { text-align: left; }
table.tbl th .ar { opacity: .5; margin-left: 3px; }
table.tbl td { padding: 12px 16px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--bg-2); }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl td:first-child { text-align: left; font-weight: 540; color: var(--ink); }
.cname { display: flex; align-items: center; gap: 10px; }
.cname .sw { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
.cname .meta { font-size: 11px; color: var(--faint); font-weight: 400; }
.spark { width: 60px; height: 20px; display: block; }
.roas-v { font-weight: 650; }
.roas-v.good { color: var(--positive); }
.roas-v.mid { color: var(--ink); }
.roas-v.low { color: var(--negative); }

/* status pill */
.pill-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.pill-status .d { width: 6px; height: 6px; border-radius: 50%; }
.pill-status.enabled { background: var(--positive-soft); color: color-mix(in oklab, var(--positive) 80%, black); }
.pill-status.enabled .d { background: var(--positive); }
.pill-status.paused { background: var(--bg-3); color: var(--muted); }
.pill-status.paused .d { background: var(--faint); }
.ro-hint { cursor: help; }

/* ── Filters / toolbar ─────────────────────────────────────────────────── */
.filters { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-xs); background: #fff; min-width: 240px; }
.search svg { width: 15px; height: 15px; color: var(--faint); }
.search input { border: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--ink); outline: none; width: 100%; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-xs); background: var(--bg-3); border: 1px solid var(--line); }
.seg button { appearance: none; border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 540; color: var(--muted); padding: 5px 12px; border-radius: 6px; cursor: pointer; transition: all .14s; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-xs); }

/* ── Generic card ──────────────────────────────────────────────────────── */
.acard { border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.acard.pad { padding: 20px 22px; }

/* ── Integrations ──────────────────────────────────────────────────────── */
.integ-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.integ-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; padding: 22px; display: flex; flex-direction: column; }
.integ-card.primary { grid-column: span 2; }
.integ-card .ic-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; margin-bottom: 16px; }
.integ-card .ic-logo svg { width: 26px; height: 26px; }
.integ-card h3 { font-size: 17px; color: var(--ink); }
.integ-card .ic-desc { font-size: 13.5px; color: var(--muted); margin-top: 6px; flex: 1; }
.integ-card .ic-foot { margin-top: 18px; display: flex; align-items: center; gap: 10px; }
.integ-card.soon { opacity: .72; }
.tag-soon { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line); border-radius: 99px; padding: 4px 9px; }
.conn-state { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.conn-state.on { color: var(--positive); }
.conn-state.off { color: var(--muted); }
.conn-state .d { width: 7px; height: 7px; border-radius: 50%; }
.conn-state.on .d { background: var(--positive); box-shadow: 0 0 0 3px var(--positive-soft); }
.conn-state.off .d { background: var(--faint); }

/* ── Modal / wizard ────────────────────────────────────────────────────── */
.modal-back {
  position: fixed; inset: 0; z-index: 1000;
  background: color-mix(in oklab, var(--ink) 52%, transparent);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 24px;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 480px;
  background: #fff; border-radius: var(--r-xl);
  box-shadow: var(--sh-xl); overflow: hidden;
  animation: pop .24s cubic-bezier(.3,.8,.4,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-x { position: absolute; top: 20px; right: 20px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.7); border: 1px solid var(--line); color: var(--muted); cursor: pointer; z-index: 2; }
.modal-x:hover { background: #fff; color: var(--ink); }

.wz-steps { display: flex; gap: 6px; padding: 16px 26px 0; }
.wz-steps .s { flex: 1; height: 4px; border-radius: 99px; background: var(--bg-3); }
.wz-steps .s.on { background: var(--primary); }
.wz-body { padding: 24px 26px 26px; }
.wz-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 18px; }
.wz-ic svg { width: 30px; height: 30px; }
.wz-body h2 { font-size: 21px; color: var(--ink); letter-spacing: -.02em; }
.wz-body p.lead { font-size: 14.5px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.perm-list { margin: 20px 0 0; display: grid; gap: 10px; }
.perm-list .row { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; color: var(--ink-2); }
.perm-list .row .ck { flex-shrink: 0; margin-top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--positive-soft); color: var(--positive); }
.perm-list .row.no .ck { background: var(--negative-soft); color: var(--negative); }
.perm-list .row .ck svg { width: 12px; height: 12px; }
.wz-foot { margin-top: 24px; display: flex; gap: 10px; }
.wz-note { margin-top: 14px; font-size: 12px; color: var(--faint); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.wz-note svg { width: 13px; height: 13px; }

/* mock google consent */
.gconsent { padding: 0; }
.gc-head { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); text-align: center; }
.gc-g { width: 40px; height: 40px; margin: 0 auto 14px; }
.gc-head .acct { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; color: var(--ink-2); }
.gc-head .acct .av { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #ea4335, #fbbc05); }
.gc-head h2 { font-size: 18px; color: var(--ink); font-weight: 500; margin-top: 16px; }
.gc-head h2 b { font-weight: 700; }
.gc-body { padding: 20px 26px; }
.gc-body .ttl { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.gc-perm { display: flex; gap: 12px; padding: 10px 0; }
.gc-perm svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.gc-perm .tx { font-size: 13.5px; color: var(--ink-2); }
.gc-note { font-size: 12px; color: var(--faint); margin-top: 12px; line-height: 1.6; }
.gc-foot { padding: 16px 26px 24px; display: flex; justify-content: flex-end; gap: 10px; }
.gc-btn { appearance: none; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: var(--r-xs); cursor: pointer; }
.gc-btn.cancel { color: #1a73e8; }
.gc-btn.cancel:hover { background: #f1f6fe; }
.gc-btn.allow { background: #1a73e8; color: #fff; }
.gc-btn.allow:hover { background: #1765cc; }

/* import progress */
.import-prog { margin: 22px 0 6px; }
.import-bar { height: 8px; border-radius: 99px; background: var(--bg-3); overflow: hidden; }
.import-bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s ease; }
.import-rows { margin-top: 16px; display: grid; gap: 9px; }
.import-rows .r { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.import-rows .r svg { width: 16px; height: 16px; }
.import-rows .r.pending { color: var(--faint); }
.spin { animation: spin 1s linear infinite; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Onboarding ────────────────────────────────────────────────────────── */
.onb { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg-2); position: relative; }
.onb::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 360px; background: radial-gradient(60% 100% at 50% 0%, var(--primary-tint), transparent 70%); }
.onb-inner { position: relative; width: 100%; max-width: 560px; text-align: center; }
.onb-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 660; font-size: 18px; color: var(--ink); margin-bottom: 36px; }
.onb-steps { display: flex; gap: 7px; justify-content: center; margin-bottom: 24px; }
.onb-steps .s { width: 30px; height: 4px; border-radius: 99px; background: var(--bg-3); }
.onb-steps .s.on { background: var(--primary); }
.onb h1 { font-size: 30px; color: var(--ink); letter-spacing: -.025em; }
.onb .sub { font-size: 16px; color: var(--muted); margin-top: 12px; }
.onb-card { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh); padding: 26px; text-align: left; display: flex; align-items: center; gap: 18px; }
.onb-card .lg { width: 50px; height: 50px; border-radius: 13px; border: 1px solid var(--line); display: grid; place-items: center; flex-shrink: 0; }
.onb-card .lg svg { width: 28px; height: 28px; }
.onb-card .ct h3 { font-size: 16px; color: var(--ink); }
.onb-card .ct p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.onb-card .btn { margin-left: auto; }
.onb-skip { margin-top: 20px; font-size: 14px; color: var(--muted); background: none; border: 0; cursor: pointer; font-family: inherit; }
.onb-skip:hover { color: var(--ink); text-decoration: underline; }

/* ── Settings ──────────────────────────────────────────────────────────── */
.settings-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.settings-tabs button { appearance: none; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 540; color: var(--muted); padding: 12px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.settings-tabs button.on { color: var(--ink); border-bottom-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.form-row .lbl h4 { font-size: 14px; color: var(--ink); }
.form-row .lbl p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.field { width: 100%; max-width: 380px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-xs); background: #fff; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.field:focus { border-color: color-mix(in oklab, var(--primary) 50%, var(--line)); box-shadow: var(--ring); }
.code-box { font-family: var(--font-mono); font-size: 12.5px; background: var(--ink); color: #e2e8f0; border-radius: var(--r-sm); padding: 14px 16px; overflow-x: auto; line-height: 1.7; max-width: 560px; position: relative; }
.code-box .cp { position: absolute; top: 10px; right: 10px; font-family: var(--font-sans); font-size: 11px; color: #94a3b8; background: rgba(255,255,255,.08); border: 0; padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.code-box .cp:hover { background: rgba(255,255,255,.16); color: #fff; }
.danger { border: 1px solid color-mix(in oklab, var(--negative) 30%, var(--line)); border-radius: var(--r); padding: 18px 20px; display: flex; align-items: center; gap: 16px; background: var(--negative-soft); }
.danger .tx h4 { font-size: 14px; color: var(--ink); }
.danger .tx p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.danger .btn { margin-left: auto; }
.btn-danger { background: #fff; color: var(--negative); border: 1px solid color-mix(in oklab, var(--negative) 40%, var(--line)); }
.btn-danger:hover { background: var(--negative); color: #fff; }

.members { width: 100%; border-collapse: collapse; }
.members td, .members th { padding: 12px 4px; text-align: left; font-size: 13.5px; border-bottom: 1px solid var(--line-2); }
.members th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); font-weight: 500; }
.members .who { display: flex; align-items: center; gap: 10px; }
.members .av { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.role-pill { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--bg-3); color: var(--ink-2); }
.invoice-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.invoice-row .amt { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 540; }
.invoice-row a { color: var(--primary); font-weight: 540; }

/* empty state */
.empty { text-align: center; padding: 60px 20px; }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--faint); }
.empty .ic svg { width: 30px; height: 30px; }
.empty h3 { font-size: 18px; color: var(--ink); }
.empty p { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 380px; margin-inline: auto; }

/* read-only note */
.ro-banner { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg-2); }
.ro-banner svg { width: 14px; height: 14px; color: var(--positive); }

/* tooltip */
.tip { position: relative; }
.tip .tip-body { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 500; padding: 7px 10px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; box-shadow: var(--sh); z-index: 5; }
.tip:hover .tip-body { opacity: 1; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpis .kcard:nth-child(5) { grid-column: 1 / -1; }
  .panels { grid-template-columns: 1fr; }
  .integ-grid { grid-template-columns: 1fr; }
  .integ-card.primary { grid-column: auto; }
  .form-row { grid-template-columns: 1fr; gap: 10px; }
}
