/* Business Hub — design tokens (reference data-viz palette, validated light + dark) */
:root {
  color-scheme: light;
  /* Google-Ads-like surfaces: blue-grey canvas, white cards, thin grey lines, Google blue */
  --page: #f6f8fc; --surface: #ffffff; --surface-2: #f1f3f4; --line: #dadce0; --axis: #bdc1c6;
  --text: #1f1f1f; --text-2: #444746; --muted: #5f6368; --ring: rgba(26,115,232,.25);
  --accent: #1a73e8; --accent-wash: #e8f0fe; --nav-active: #d3e3fd; --nav-active-text: #041e49;
  --series-0: #b9b7ae;                                    /* comparison period / de-emphasis */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  --good: #188038; --good-text: #137333; --warning: #f9ab00; --serious: #e8710a; --critical: #d93025;
  --critical-text: #b3261e; --warning-text: #8a5a00; --ai-text: #6a3fd1;
  --seq-100: #d2e3fc; --seq-250: #8ab4f8; --seq-400: #4285f4; --seq-550: #1967d2; --seq-700: #174ea6;
  --shadow: 0 1px 2px rgba(60,64,67,.15), 0 1px 3px 1px rgba(60,64,67,.08);
  --sbw: 256px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #131314; --surface: #1e1f20; --surface-2: #282a2c; --line: #3c4043; --axis: #5f6368;
    --text: #e3e3e3; --text-2: #c4c7c5; --muted: #9aa0a6; --ring: rgba(138,180,248,.3);
    --accent: #8ab4f8; --accent-wash: rgba(138,180,248,.14); --nav-active: #004a77; --nav-active-text: #c2e7ff;
    --series-0: #5a5955; --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
    --good: #81c995; --good-text: #81c995; --shadow: none;
    --critical-text: #f28b82; --warning-text: #fdd663; --ai-text: #b9a6ff;
    --seq-100: #1e3a5f; --seq-250: #24518a; --seq-400: #2f6fc0; --seq-550: #5b93e6; --seq-700: #8ab4f8;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --critical-text: #f28b82; --warning-text: #fdd663; --ai-text: #b9a6ff;
  --seq-100: #1e3a5f; --seq-250: #24518a; --seq-400: #2f6fc0; --seq-550: #5b93e6; --seq-700: #8ab4f8;
  --page: #131314; --surface: #1e1f20; --surface-2: #282a2c; --line: #3c4043; --axis: #5f6368;
  --text: #e3e3e3; --text-2: #c4c7c5; --muted: #9aa0a6; --ring: rgba(138,180,248,.3);
  --accent: #8ab4f8; --accent-wash: rgba(138,180,248,.14); --nav-active: #004a77; --nav-active-text: #c2e7ff;
  --series-0: #5a5955; --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --good: #81c995; --good-text: #81c995; --shadow: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--text); font: 14px/1.45 "Google Sans Text", "Google Sans", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- app shell: left navigation + top bar + page bar (Google Ads pattern) ---------- */
.app { display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr); min-height: 100vh; }
.sidenav { position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; background: var(--page); display: flex; flex-direction: column;
  padding: 8px 10px 12px; scrollbar-width: thin; z-index: 30; }
.snbrand { display: flex; align-items: center; gap: 6px; height: 52px; padding-left: 2px; margin-bottom: 6px; }
.snicon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center; flex: none; }
.snicon:hover { background: var(--surface-2); }
.snicon svg, .sntop svg, .tbicon svg, .searchbox svg, .daterange svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand { font-weight: 500; font-size: 18px; white-space: nowrap; display: flex; gap: 9px; align-items: center; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .dot { width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(from 210deg, #4285f4, #34a853, #fbbc04, #ea4335, #4285f4); flex: none; }
.snlist { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sntop { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px 0 12px; border-radius: 20px; color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap; }
.sntop:hover { background: var(--surface-2); text-decoration: none; }
.snsec.active > .sntop, .sntop.activeone { background: var(--nav-active); color: var(--nav-active-text); }
.sntop .chev { margin-left: auto; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); opacity: .6; transition: transform .15s; }
.snsec.open > .sntop .chev { transform: rotate(-135deg); }
.snsub { display: none; flex-direction: column; padding: 4px 0 8px 46px; }
.snsec.open .snsub { display: flex; }
.snsub a { padding: 7px 12px; border-radius: 16px; color: var(--text-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snsub a:hover { background: var(--surface-2); text-decoration: none; }
.snsub a.on { color: var(--accent); font-weight: 600; background: var(--accent-wash); }
.sngroup { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 3px; }
.snfoot { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
/* collapsed rail: icons with a small label under each, like Google Ads */
.appmain { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 25; background: var(--page); }
.topbar .row1 { display: flex; align-items: center; gap: 12px; padding: 8px 24px 8px 8px; height: 64px; }
.acct { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 0 4px 0 12px; height: 40px; }
.acct .acctdot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.acct select { border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 500; font-size: 14px; padding: 8px 6px; cursor: pointer; outline: none; }
.searchbox { flex: 1; max-width: 720px; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px 0 16px; border-radius: 24px; border: 0;
  background: var(--surface-2); color: var(--muted); font: inherit; font-size: 15px; cursor: text; text-align: left; }
:root[data-theme="dark"] .searchbox { background: var(--surface); }
.searchbox:hover { box-shadow: var(--shadow); background: var(--surface); }
.searchbox span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchbox kbd { font: inherit; font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--muted); background: var(--surface); }
.topbar .tools { margin-left: auto; display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tbicon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; display: grid; place-items: center; position: relative; }
.tbicon:hover { background: var(--surface-2); }
.tbbtn { border: 1px solid var(--line); background: var(--surface); color: var(--accent); border-radius: 18px; height: 36px; padding: 0 16px; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 500; }
.tbbtn:hover { background: var(--accent-wash); }
.avatarmenu { position: relative; }
.avatarbtn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #1a73e8; color: #fff; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  display: inline-grid; place-items: center; margin-left: 4px; }
.avatarbtn.big { width: 44px; height: 44px; font-size: 19px; margin: 0; cursor: default; }
.avpanel { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; background: var(--surface); border-radius: 16px; box-shadow: 0 4px 24px rgba(60,64,67,.25); padding: 8px; z-index: 60; }
.avpanel[hidden] { display: none; }
.avhead { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; white-space: normal; }
.avhead b { color: var(--text); font-size: 14px; }
.avitem { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.avitem:hover { background: var(--surface-2); text-decoration: none; }
.iconbtn { border: 1px solid var(--line); background: var(--surface); color: var(--text-2); border-radius: 16px; padding: 5px 12px;
           cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 500; }
.iconbtn:hover { background: var(--surface-2); }
/* page bar: breadcrumb left, date range + compare top-right */
.pagebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 24px 10px 24px; position: sticky; top: 64px; z-index: 20; background: var(--page); }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.crumbs b { color: var(--text); font-weight: 500; } .crumbs .sep { opacity: .6; }
.filterform { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filterform label { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); height: 36px; padding-left: 10px; }
.filterform label span { font-size: 12px; color: var(--muted); }
.filterform select { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; padding: 6px 8px; cursor: pointer; outline: none; }
.filterform .views select { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); height: 36px; padding: 0 8px; }
.filterform .views { display: flex; gap: 6px; align-items: center; }
.daterange { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); height: 40px; padding: 0 6px 0 12px; color: var(--text-2); }
.daterange select { font-weight: 500; }
.daterange .dates { font-size: 12.5px; color: var(--muted); padding-right: 6px; border-left: 1px solid var(--line); padding-left: 10px; white-space: nowrap; }
.daterange .custom { display: none; gap: 4px; align-items: center; } .daterange .custom.on { display: flex; }
.daterange input[type=date] { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; background: var(--surface); color: var(--text); }
.snscrim, .mobonly { display: none; }

/* ---------- layout ---------- */
main { width: 100%; max-width: 1600px; padding: 4px 24px 60px; }
.pagehead { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.pagehead h1 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
.pagehead .sub { color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g-hero { grid-template-columns: minmax(320px, 1.3fr) 2fr; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
section { margin-top: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-width: 0; box-shadow: var(--shadow); }
.card h2 { font-size: 13px; font-weight: 600; color: var(--text); margin: 0; }
.card .cardhead { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card .cardhead .note { margin-left: 0; }
.card .cardhead .actions { margin-left: auto; display: flex; gap: 6px; }
.note { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }

/* ---------- stat tiles ---------- */
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; box-shadow: var(--shadow);
        display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; }
.tile .label { color: var(--text-2); font-size: 12px; font-weight: 500; display: flex; gap: 6px; align-items: center; }
.tile .value { font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.tile .foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-height: 18px; }
.tile svg.spark { width: 100%; height: 30px; margin-top: 2px; }
.hint { cursor: help; color: var(--muted); border: 1px solid var(--line); border-radius: 50%; width: 15px; height: 15px; font-size: 10px;
        display: inline-flex; align-items: center; justify-content: center; }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.good { color: var(--good-text); } .delta.bad { color: var(--critical); } .delta.flat { color: var(--muted); }
.hero .value { font-size: 48px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.hero svg.spark { height: 64px; }

/* ---------- meters ---------- */
.meter { position: relative; height: 10px; border-radius: 999px; background: var(--seq-100); overflow: hidden; margin: 8px 0 4px; }
:root[data-theme="dark"] .meter { background: #184f95; }
.meter > span { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 999px; }
.meter > i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .55; }
.meter.over > span { background: var(--serious); }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.kv b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- charts ---------- */
.chartbox { position: relative; height: 270px; }
.chartbox.short { height: 200px; }
.chartbox.tall { height: 340px; }
.chartwrap.loading { opacity: .5; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); margin: -4px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.legend span.off { opacity: .35; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.box { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--text); }
th.sorted-asc::after { content: " ↑"; } th.sorted-desc::after { content: " ↓"; }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr:hover td { background: var(--surface-2); }
td.wrap { word-break: break-word; }
.tabletools { display: flex; gap: 8px; align-items: center; }
.tabletools input { font: inherit; font-size: 12px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
                    color: var(--text); width: 180px; }
.scroll { max-height: 520px; overflow: auto; }
.bar-inline { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); vertical-align: middle; margin-left: 6px; opacity: .8; }

/* ---------- segmented bar (part-to-whole) ---------- */
.segbar { display: flex; gap: 2px; height: 28px; margin: 6px 0 10px; }
.segbar > div { border-radius: 4px; color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; padding-left: 6px;
                overflow: hidden; white-space: nowrap; min-width: 2px; }
.segbar > div.dark-text { color: #0b0b0b; }
.seglegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.seglegend span { display: inline-flex; gap: 6px; align-items: center; }
.seglegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- heatmap ---------- */
.heat { display: grid; grid-template-columns: 38px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10px; color: var(--muted); min-width: 0; }
.heat .c { aspect-ratio: 1.6; border-radius: 3px; background: var(--surface-2); position: relative; }
.heat .c:hover { outline: 2px solid var(--text); outline-offset: -1px; }
.heat .h { text-align: center; }
.cohort td.cell { text-align: center; font-variant-numeric: tabular-nums; font-size: 12px; border-bottom: 2px solid var(--surface); }

/* ---------- alerts / pills / tags ---------- */
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.alert .ic { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 18px; display: flex; align-items: center; justify-content: center;
             color: #fff; font-size: 11px; font-weight: 700; }
.alert.critical .ic { background: var(--critical); } .alert.serious .ic { background: var(--serious); }
.alert.warning .ic { background: var(--warning); color: #0b0b0b; } .alert.good .ic { background: var(--good); }
.alert .d { color: var(--muted); font-size: 12px; }
.pill { padding: 1px 8px; border-radius: 999px; font-weight: 600; font-size: 12px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.pill.good { background: rgba(12,163,12,.12); color: var(--good-text); }
.pill.warn { background: rgba(250,178,25,.18); color: var(--warning-text); }
.pill.bad { background: rgba(208,59,59,.12); color: var(--critical); }
:root[data-theme="dark"] .pill.warn { color: var(--warning); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.tag.order { background: rgba(12,163,12,.12); color: var(--good-text); }
.tag.refund, .tag.failed, .tag.cancelled { background: rgba(208,59,59,.12); color: var(--critical); }
.warnbar { background: rgba(208,59,59,.08); border: 1px solid rgba(208,59,59,.4); color: var(--critical); padding: 9px 13px; border-radius: 10px; margin-bottom: 10px; font-size: 13px; }
.infobar { background: var(--accent-wash); padding: 9px 13px; border-radius: 10px; margin-bottom: 10px; font-size: 13px; }

/* ---------- forms (settings, login) ---------- */
.form-row { display: grid; grid-template-columns: 260px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.form-row input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); max-width: 240px; }
.btn { border: 0; background: var(--accent); color: #fff; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.login { max-width: 360px; margin: 14vh auto; }
.login input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--page); color: var(--text); font-size: 15px; margin: 8px 0 12px; }
.login button { width: 100%; }
.err { color: var(--critical); margin-bottom: 8px; }

@media (max-width: 760px) {
  .g2, .g3, .g-hero { grid-template-columns: 1fr; }
  main { padding: 12px 12px 40px; }
  .hero .value { font-size: 38px; }
  .form-row { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .actions, .tabletools { display: none !important; }
  .card, .tile { box-shadow: none; break-inside: avoid; }
}
.hero .quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.hero .quick div { display: flex; flex-direction: column; }
.hero .quick span { color: var(--muted); font-size: 12px; }
.hero .quick b { font-size: 17px; font-weight: 650; }
.hero .quick em { font-style: normal; color: var(--text-2); font-size: 12px; }
.cohort td.partial { color: var(--muted); font-style: italic; background: transparent; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tile { padding: 12px; }
  .tile .value { font-size: 20px; }
  .heat { grid-template-columns: 30px repeat(24, minmax(0, 1fr)); font-size: 9px; }
}
.login label.note { display: block; margin-top: 4px; }
.login input[type=email], .login input[type=password] { width: 100%; }
.iconbtn.active-preset { background: var(--accent-wash); color: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- notification center */
.notif { position: relative; }
.iconbtn.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 34px; }
.bell .badge { position: absolute; top: -5px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  font: 600 10.5px/17px system-ui, sans-serif; text-align: center; color: #fff; background: var(--warning); color: #0b0b0b;
  border: 2px solid var(--surface); }
.bell .badge.critical { background: var(--critical); color: #fff; }
.bell.has-critical svg { color: var(--critical); animation: bellshake 1.2s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes bellshake { 0%,60%,100% { transform: rotate(0) } 10%,30% { transform: rotate(14deg) } 20%,40% { transform: rotate(-14deg) } }
@media (prefers-reduced-motion: reduce) { .bell.has-critical svg { animation: none; } }
.notifpanel { position: absolute; right: 0; top: calc(100% + 8px); width: min(440px, calc(100vw - 24px)); max-height: min(72vh, 620px);
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18); z-index: 50; white-space: normal; color: var(--text); text-align: left; }
.nphead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: 13px; }
.npfilter { display: inline-flex; gap: 2px; background: var(--page); border-radius: 8px; padding: 2px; }
.npfilter button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 11.5px; padding: 3px 7px; border-radius: 6px; cursor: pointer; }
.npfilter button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.linkbtn { margin-left: auto; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11.5px; cursor: pointer; text-decoration: underline; }
.nplist { overflow-y: auto; padding: 4px 0; }
.npgroup { padding: 8px 13px 3px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nitem { display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 10px; padding: 9px 13px; border-left: 3px solid transparent; font-size: 13px; }
.nitem + .nitem { border-top: 1px solid var(--line); }
.nitem .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; }
.nitem.critical { border-left-color: var(--critical); background: rgba(208,59,59,.06); }
.nitem.warning { border-left-color: var(--warning); background: rgba(250,178,25,.08); }
.nitem.info { border-left-color: var(--good); }
.nitem.critical .dot { background: var(--critical); } .nitem.warning .dot { background: var(--warning); } .nitem.info .dot { background: var(--good); }
.nitem.read { background: none; opacity: .62; }
.nitem .nt { font-weight: 600; line-height: 1.35; }
.nitem .nd { grid-column: 2 / 4; color: var(--muted); font-size: 12px; line-height: 1.4; word-break: break-word; }
.nitem .na { grid-column: 2 / 4; display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); }
.nitem .na a, .nitem .na button { color: var(--text); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.nitem .lvl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 5px; align-self: start; }
.nitem.critical .lvl { color: var(--critical); background: rgba(208,59,59,.12); }
.nitem.warning .lvl { color: #8a5b00; background: rgba(250,178,25,.2); }
:root[data-theme="dark"] .nitem.warning .lvl { color: var(--warning); }
.nitem.info .lvl { color: var(--good-text); background: rgba(12,163,12,.12); }
.npempty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.npfoot { padding: 8px 13px; border-top: 1px solid var(--line); font-size: 11px; }
@media (max-width: 720px) { .notifpanel { position: fixed; left: 12px; right: 12px; top: 56px; width: auto; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nitem.warning .lvl { color: var(--warning); } }
.notifpanel[hidden] { display: none; }

/* today pace */
.g-today { grid-template-columns: minmax(240px, 1fr) 3fr; }
.todaybig { font-size: 34px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 4px 0 6px; }
.todaybig small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.card.today .foot { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 900px) { .g-today { grid-template-columns: 1fr; } }

/* lookup */
.lookupform { display: flex; gap: 10px; align-items: center; }
.lookupform input[type=search] { flex: 1; font: inherit; font-size: 16px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); min-width: 0; }
.custstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 6px 0 10px; }
.custstats span { display: block; font-size: 12px; color: var(--muted); }
.custstats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.minisearch { margin-left: auto; }
.minisearch input { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); width: 220px; }
.costin { width: 74px; text-align: right; font: inherit; font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font-variant-numeric: tabular-nums; }
.costin.saved { border-color: var(--good); } .costin.err { border-color: var(--critical); }
.est { font-style: italic; color: var(--muted); }
.warnrow td { background: rgba(208,59,59,.05); }

/* quick search (Ctrl+K) */
.kbtn { display: inline-flex; align-items: center; gap: 6px; }
.kbtn .kb { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.palette { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.32); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palbox { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.3); overflow: hidden; }
.palbox input { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--line); padding: 15px 17px; font: inherit; font-size: 16px; background: transparent; color: var(--text); outline: none; }
.pallist { max-height: 52vh; overflow-y: auto; padding: 5px; }
.palitem { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.palitem em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.palitem span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palitem.on, .palitem:hover { background: var(--accent-wash); }
.palfoot { padding: 7px 14px; border-top: 1px solid var(--line); font-size: 11px; }
/* saved views */
.views { display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 720px) { .kbtn .kb { display: none; } }

/* trends filters */
.trendform { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.trendform label { display: inline-flex; gap: 6px; align-items: center; }
.trendform select, .trendform input[type=text] { font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.ms { position: relative; }
.ms summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; background: var(--surface); color: var(--muted); }
.ms summary::-webkit-details-marker { display: none; }
.ms summary b { color: var(--text); font-weight: 600; }
.ms[open] summary { border-color: var(--accent); }
.mspanel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(420px, 86vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.16); padding: 8px; }
.msq { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); }
.msacts { display: flex; justify-content: flex-end; padding: 4px 2px; }
.msacts button { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 12px; }
.mslist { max-height: 300px; overflow-y: auto; }
.mslist label { display: flex; gap: 8px; padding: 5px 4px; border-radius: 6px; color: var(--text); font-size: 13px; cursor: pointer; }
.mslist label:hover { background: var(--accent-wash); }
.mslist em { font-style: normal; color: var(--muted); font-size: 11.5px; margin-left: 4px; }
tr.future td { color: var(--muted); opacity: .5; }

/* ---------------------------------------------------------------- task boards */
.tasksapp { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.tside { position: sticky; top: 120px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 13.5px; }
.tsgroup { display: flex; flex-direction: column; gap: 1px; }
.tshead { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 12px 8px 4px; }
.tsl { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.tsl:hover { background: var(--accent-wash); }
.tsl.on { background: var(--accent-wash); font-weight: 600; }
.tsl .ic { width: 16px; text-align: center; }
.tsl .pn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tsl .cnt { font-size: 11px; color: var(--muted); min-width: 18px; text-align: right; }
.tsl .cnt.bad { color: #fff; background: var(--critical); border-radius: 8px; padding: 0 5px; min-width: 0; }
.tsnew { margin: 10px 8px 2px; }
.tmain { min-width: 0; }
.tbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 12px; }
.tbar h1 { font-size: 20px; margin: 0 6px 0 0; }
.tbar select, .tsearch { font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; }
.tsearch { width: 180px; }
.tchk { font-size: 13px; color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.tbar .btn { margin-left: auto; }
.tboard { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.tcol { background: var(--surface-2, rgba(0,0,0,.035)); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; min-height: 200px; }
.tcolhead { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 4px 6px 8px; }
.tcolhead .ccount { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 12px; }
.cdot { width: 8px; height: 8px; border-radius: 50%; }
.cdot.s-todo { background: var(--series-0, #9a9a94); } .cdot.s-doing { background: var(--accent); } .cdot.s-review { background: var(--warning); } .cdot.s-done { background: var(--good); }
.tlist { display: flex; flex-direction: column; gap: 8px; min-height: 60px; border-radius: 8px; padding: 2px; transition: background .12s; flex: 1; }
.tlist.dropover { background: var(--accent-wash); outline: 2px dashed var(--accent); outline-offset: -2px; }
.tempty { color: var(--muted); font-size: 12px; text-align: center; padding: 18px 6px; border: 1px dashed var(--line); border-radius: 8px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.05); border-left: 3px solid transparent; }
.tcard:hover { border-color: var(--accent); }
.tcard:focus-visible { outline: 2px solid var(--accent); }
.tcard.dragging { opacity: .45; }
.tcard.prio-urgent { border-left-color: var(--critical); } .tcard.prio-high { border-left-color: var(--warning); }
.ctitle { font-size: 13.5px; line-height: 1.35; font-weight: 500; word-break: break-word; }
.clabels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.clabels span, .tml .chip { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 9px; background: hsl(var(--h) 70% 92%); color: hsl(var(--h) 55% 30%); }
:root[data-theme="dark"] .clabels span { background: hsl(var(--h) 35% 24%); color: hsl(var(--h) 70% 82%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .clabels span { background: hsl(var(--h) 35% 24%); color: hsl(var(--h) 70% 82%); } }
.cdone { font-size: 11.5px; color: var(--good-text); margin-top: 4px; }
.cfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.cfoot .sp { flex: 1; }
.cmeta.ok { color: var(--good-text); }
.cmeta.due.over { color: #fff; background: var(--critical); border-radius: 5px; padding: 0 5px; }
.cmeta.due.soon { color: #6b4800; background: rgba(250,178,25,.25); border-radius: 5px; padding: 0 5px; }
.cprio { text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.cprio.urgent { color: var(--critical); } .cprio.high { color: #a86a00; }
.cproj { display: inline-flex; align-items: center; gap: 4px; } .cproj i { width: 7px; height: 7px; border-radius: 2px; }
.cfrom { font-size: 10.5px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
  background: hsl(var(--h) 60% 45%); color: #fff; flex: none; }
.tquick input { width: 100%; box-sizing: border-box; margin-top: 8px; font: inherit; font-size: 13px; border: 1px dashed var(--line); background: transparent; color: var(--text); padding: 7px 9px; border-radius: 8px; }
.tquick input:focus { border-style: solid; border-color: var(--accent); background: var(--surface); outline: none; }
/* card modal */
.tmodal { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.35); display: flex; justify-content: center; align-items: flex-start; padding: 6vh 16px 16px; overflow-y: auto; }
.tmodal[hidden] { display: none; }
.tmbox { width: min(860px, 100%); background: var(--surface); border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.3); padding: 18px 20px 20px; }
.tmhead { display: flex; gap: 10px; align-items: center; }
.tmhead h2 { margin: 0; font-size: 18px; flex: 1; }
.tmtitle { flex: 1; font: inherit; font-size: 19px; font-weight: 650; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; background: transparent; color: var(--text); }
.tmtitle:hover, .tmtitle:focus { border-color: var(--line); outline: none; }
.tmsub { color: var(--muted); font-size: 12.5px; margin: 2px 6px 14px; } .okt { color: var(--good-text); }
.tmgrid { display: grid; grid-template-columns: 1fr 230px; gap: 22px; }
.tml { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin: 12px 0 5px; text-transform: uppercase; letter-spacing: .04em; }
.tml .note { text-transform: none; letter-spacing: 0; font-weight: 400; }
.tmbox textarea, .tmbox input[type=text], .tmbox input[type=date], .tmbox input:not([type]), .tmbox select { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.tmbox textarea { resize: vertical; }
.tmside .btn, .tmside .iconbtn { width: 100%; margin-top: 16px; }
.okbtn { background: var(--good) !important; border-color: var(--good) !important; }
.danger { color: var(--critical) !important; margin-top: 12px; }
.tcl { display: flex; flex-direction: column; gap: 4px; }
.tcli { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.tcli span { flex: 1; } .tcli span.done { text-decoration: line-through; color: var(--muted); }
.tcli .linkbtn { margin: 0; text-decoration: none; opacity: .5; }
.tcomform { display: flex; gap: 8px; align-items: flex-start; } .tcomform .btn { flex: none; }
.thist { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.hcom { display: flex; gap: 9px; } .hmeta { font-size: 12px; color: var(--muted); } .hbody { font-size: 13.5px; margin-top: 2px; word-break: break-word; }
.hsys { font-size: 12px; color: var(--muted); padding-left: 31px; }
.tnewgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.colors { display: flex; gap: 8px; } .colors input { display: none; }
.colors span { display: inline-block; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.colors input:checked + span { border-color: var(--text); }
.members { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; max-height: 180px; overflow-y: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 9px 16px; border-radius: 10px;
  font-size: 13.5px; z-index: 120; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
@media (max-width: 900px) {
  .tasksapp { grid-template-columns: 1fr; }
  .tside { position: static; } .tside .tsgroup { flex-direction: row; flex-wrap: wrap; } .tshead { display: none; }
  .tboard { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; } .tcol { scroll-snap-align: start; }
  .tmgrid { grid-template-columns: 1fr; } .tbar .btn { margin-left: 0; }
}
.neg { color: var(--critical); font-weight: 600; }
.segdot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.dt td .iconbtn { white-space: nowrap; }
.avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.tsteam { display: flex; flex-direction: column; gap: 1px; }
.mention { color: var(--accent); font-weight: 600; background: var(--accent-wash); border-radius: 4px; padding: 0 3px; }
.mpop { position: absolute; z-index: 5; left: 0; top: 100%; margin-top: 4px; min-width: 240px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 26px rgba(0,0,0,.18); padding: 4px; }
.mpop[hidden] { display: none; }
.mitem { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.mitem em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--muted); }
.mitem.on, .mitem:hover { background: var(--accent-wash); }

/* Claude agent on the boards */
.tboard.withsug { grid-template-columns: repeat(5, minmax(230px, 1fr)); }
.sugcol { background: linear-gradient(180deg, rgba(139,92,246,.10), rgba(139,92,246,.03)); border-color: rgba(139,92,246,.35); }
.cdot.s-sug { background: #8b5cf6; }
.tsl .cnt.sug { color: #fff; background: #8b5cf6; border-radius: 8px; padding: 0 6px; min-width: 0; }
.sugcard { cursor: pointer; border-color: rgba(139,92,246,.45); }
.sughead { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ai-text); font-weight: 600; margin-bottom: 6px; }
:root[data-theme="dark"] .sughead { color: #b79cff; }
.sughead .sp { flex: 1; }
.cwhy { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.4; }
.sugacts { display: flex; gap: 6px; margin-top: 9px; }
.sugacts button { flex: 1; font: inherit; font-size: 11.5px; font-weight: 600; border-radius: 7px; padding: 5px 4px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.sugacts .okb { background: var(--good); border-color: var(--good); color: #fff; }
.sugacts .nob:hover { border-color: var(--critical); color: var(--critical); }
.sugacts .impb:hover { border-color: #8b5cf6; color: var(--ai-text); }
.cworking { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ai-text); margin: 6px 0 2px; }
.cworking.big { font-size: 13.5px; background: rgba(139,92,246,.08); border-radius: 8px; padding: 9px 11px; margin: 0 0 12px; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(139,92,246,.3); border-top-color: #8b5cf6; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.sugbanner { background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.35); border-radius: 10px; padding: 11px 13px; margin: 0 0 12px; font-size: 13.5px; }
.sugbanner.done { background: transparent; }
.sbtitle { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ai-text); }
:root[data-theme="dark"] .sbtitle { color: #b79cff; }
.sbwhy { margin-top: 7px; line-height: 1.45; }
.sbacts { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; flex-wrap: wrap; }
.sbacts .btn { width: auto !important; margin: 0 !important; }
.sbdet summary { list-style: none; cursor: pointer; } .sbdet summary::-webkit-details-marker { display: none; }
.sbform { display: flex; gap: 8px; margin-top: 8px; min-width: 300px; } .sbform textarea { flex: 1; }
.improvebox { border: 1px dashed rgba(139,92,246,.5); border-radius: 10px; padding: 9px 12px; margin: 0 0 12px; }
.improvebox summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ai-text); }
.improvebox textarea { margin: 9px 0 8px; }
.agentbox { margin: 12px 4px 4px; padding: 10px; border-radius: 10px; background: rgba(139,92,246,.07); }
.agentbtn { width: 100%; background: #8b5cf6 !important; border-color: #8b5cf6 !important; }
.agentbox .note { font-size: 11.5px; margin-top: 7px; line-height: 1.4; }
@media (max-width: 900px) { .tboard.withsug { grid-template-columns: repeat(5, 82vw); } }
.sugacts button { white-space: nowrap; font-size: 11px; padding: 6px 2px; }
.agentbtn:disabled { opacity: .55; cursor: not-allowed; }

/* social media */
.platgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.platcard { display: block; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--pc); border-radius: 12px; padding: 12px 14px; color: var(--text); }
.platcard:hover { text-decoration: none; border-color: var(--pc); }
.platcard.off { opacity: .72; border-top-style: dashed; }
.pch { display: flex; align-items: center; gap: 7px; font-size: 13.5px; } .pch .note { margin-left: auto; font-size: 11.5px; }
.pdot2 { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); }
.pcv { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.pcv small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.pcs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.pcs b { color: var(--text); font-weight: 600; } .pcs b.good { color: var(--good-text); } .pcs b.bad { color: var(--critical); }
.pcoff { margin-top: 14px; font-size: 13px; color: var(--accent); }
.besttimes { display: grid; grid-template-columns: 40px repeat(8, 1fr); gap: 3px; font-size: 11px; }
.besttimes .h { text-align: center; color: var(--muted); font-size: 10.5px; } .besttimes .dl { color: var(--muted); align-self: center; }
.besttimes .c { border-radius: 4px; min-height: 26px; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; font-size: 10.5px; }
.manualform { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.manualform label { display: flex; flex-direction: column; gap: 4px; }
.manualform input, .manualform select { font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; width: 120px; }
.setupcard { border-left: 3px solid var(--warning); }
.linkform label.wide input { width: 340px; } .linkform select { width: 150px; }
.trendcard { border-left: 3px solid #8b5cf6; margin-top: 0; }
.trendcard .agentbtn { width: auto; }
.brieftext { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; margin-top: 10px; max-height: 520px; overflow-y: auto; }

/* trend radar */
.trendbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.chip { font-size: 12.5px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 16px; color: var(--text-2); background: var(--surface); }
.chip:hover { text-decoration: none; border-color: var(--accent); } .chip.on { background: var(--accent-wash); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.trendbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.vthumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-2); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vbadge { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.vbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.vtitle { font-weight: 600; font-size: 13.5px; line-height: 1.35; color: var(--text); }
.vstats { font-size: 12.5px; color: var(--muted); } .vstats b { color: var(--text); }
.vfoot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; }
.vfoot .tag { font-size: 10.5px; } .remix { font-size: 12px; white-space: nowrap; border-color: rgba(139,92,246,.5); color: var(--ai-text); }

/* Ask Claude */
.askbtn { border-color: rgba(139,92,246,.5) !important; color: var(--ai-text) !important; font-weight: 600; }
:root[data-theme="dark"] .askbtn { color: #b79cff !important; }
.chatbox { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chatlog { flex: 1; overflow-y: auto; padding: 14px 4px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.cmsg { display: flex; gap: 9px; max-width: 100%; }
.cmsg.user { justify-content: flex-end; }
.cmsg.user .cbody { background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; padding: 8px 12px; max-width: 80%; white-space: pre-wrap; }
.cmsg.assistant .cbody { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 9px 13px; max-width: calc(100% - 34px);
  font-size: 14px; line-height: 1.55; overflow-x: auto; }
.cmsg.assistant .cbody p { margin: 0 0 7px; } .cmsg.assistant .cbody p:last-child { margin-bottom: 0; }
.cmsg.assistant .cbody ul, .cmsg.assistant .cbody ol { margin: 4px 0 8px; padding-left: 20px; }
.cmsg.assistant .cbody h4 { margin: 10px 0 4px; font-size: 14px; }
.cmsg.assistant .cbody code { background: var(--surface-2); padding: 0 4px; border-radius: 4px; font-size: 12.5px; }
.cmsg.assistant .cbody table { font-size: 12.5px; margin: 6px 0; }
.cmsg.thinking .cbody { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.cmsg.err .cbody { border-color: var(--critical); }
.chatform { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid var(--line); }
.chatform textarea { flex: 1; resize: none; font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); max-height: 160px; }
.chatform textarea:focus { outline: none; border-color: #8b5cf6; }
.chatform .btn { border-radius: 12px; min-width: 42px; height: 40px; font-size: 18px; background: #8b5cf6; border-color: #8b5cf6; }
.cempty { margin: auto 0; padding: 10px; }
.cehead { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.csuggest { display: flex; flex-wrap: wrap; gap: 8px; }
.csuggest button { font: inherit; font-size: 13px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 8px 11px; border-radius: 10px; cursor: pointer; }
.csuggest button:hover { border-color: #8b5cf6; background: rgba(139,92,246,.06); }
.chatpanel { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 80; background: var(--page); border-left: 1px solid var(--line);
  box-shadow: -12px 0 30px rgba(0,0,0,.15); display: flex; flex-direction: column; padding: 12px 14px 14px; }
.chatpanel[hidden] { display: none; }
.cphead { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cphead .note { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.cphead .linkbtn { margin: 0; }
.chatpage { display: grid; grid-template-columns: 240px 1fr; gap: 16px; height: calc(100vh - 150px); min-height: 480px; }
.chatside { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; overflow-y: auto; }
.chatside .tsl .linkbtn { margin-left: auto; text-decoration: none; opacity: .4; } .chatside .tsl:hover .linkbtn { opacity: 1; }
.chatmain { background: var(--surface-2, rgba(0,0,0,.02)); border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px 14px; min-height: 0; display: flex; flex-direction: column; }
@media (max-width: 800px) { .chatpage { grid-template-columns: 1fr; height: auto; } .chatside { max-height: 160px; } .chatmain { height: 70vh; } }

/* content calendar */
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 14px; }
.calhead { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.calday { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-height: 108px; padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calday.other { opacity: .45; } .calday.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.calnum { font-size: 12px; color: var(--muted); font-weight: 600; }
.calchip { display: block; font-size: 11.5px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; color: var(--text); background: var(--surface-2);
  border-left: 3px solid var(--series-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calchip:hover { text-decoration: none; filter: brightness(.97); }
.calchip b { text-transform: uppercase; font-size: 9.5px; letter-spacing: .03em; color: var(--muted); margin-right: 2px; }
.calchip .plats { font-size: 9.5px; color: var(--muted); }
.calchip.done { opacity: .55; text-decoration: line-through; }
.calchip.f-reel { border-left-color: var(--series-5); } .calchip.f-carousel { border-left-color: var(--series-1); }
.calchip.f-meme { border-left-color: var(--series-4); } .calchip.f-news { border-left-color: var(--series-8); }
.calchip.f-explainer { border-left-color: var(--series-3); } .calchip.f-remix { border-left-color: var(--series-7); }
.unsched { display: flex; flex-wrap: wrap; gap: 6px; } .unsched .calchip { max-width: 320px; }
@media (max-width: 800px) { .calgrid { grid-template-columns: repeat(7, 120px); overflow-x: auto; } }


/* ---------- Google-Ads-style components (Material look) ---------- */
.card, .tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.tile .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tile .value { font-weight: 400; letter-spacing: -.01em; }
.cardhead h2 { font-weight: 500; font-size: 15px; }
.pagehead h1 { font-weight: 400; font-size: 24px; letter-spacing: 0; }
table.dt th, table th { font-weight: 500; color: var(--muted); font-size: 12px; }
table.dt tbody tr:hover td { background: var(--surface-2); }
.btn { border-radius: 18px; padding: 9px 22px; font-weight: 500; letter-spacing: .01em; }
.btn:hover { box-shadow: var(--shadow); }
.pill { border-radius: 12px; }
.infobar, .warnbar { border-radius: 8px; }
/* performance card (Overview): metric scorecards switch the chart, like Google Ads */
.perf { padding: 0; overflow: hidden; }
.perfmetrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-bottom: 1px solid var(--line); }
.perfm { text-align: left; border: 0; border-right: 1px solid var(--line); background: var(--surface); padding: 14px 16px 12px; cursor: pointer; font: inherit; color: var(--text);
  border-top: 4px solid transparent; position: relative; }
.perfm:last-child { border-right: 0; }
.perfm:hover { background: var(--surface-2); }
.perfm.on { border-top-color: var(--accent); background: var(--surface); }
.perfm .pl { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.perfm .pv { font-size: 26px; font-weight: 400; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.perfm .pd { font-size: 12px; color: var(--muted); }
.perfbody { padding: 12px 18px 16px; }
.perfbody .cardhead { margin-bottom: 4px; }

/* ---------- small screens: navigation becomes a drawer ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidenav { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-102%); transition: transform .2s ease; background: var(--surface); box-shadow: 0 0 24px rgba(0,0,0,.2); }
  html.navopen .sidenav { transform: none; }
  html.navopen .snscrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 29; }
  .mobonly { display: grid; }
  .topbar .row1 { padding: 8px 12px 8px 4px; gap: 8px; height: 60px; }
  .searchbox { height: 40px; padding: 0 12px; flex: 1; } .searchbox span, .searchbox kbd { display: none; }
  .topbar .tools .who, .askbtn span { display: none; }
  .askbtn { padding: 0 12px; }
  .acct { padding-left: 8px; } .acct select { max-width: 110px; }
  .pagebar { position: static; padding: 4px 12px 10px; }
  .filterform { margin-left: 0; width: 100%; }
  .filterform .views, .daterange .dates { display: none; }
  main { padding: 4px 12px 40px; }
}
/* collapsed rail (desktop): icons only, like Google Ads' slim navigation */
@media (min-width: 901px) {
  html.rail { --sbw: 76px; }
  html.rail .snlabel, html.rail .snsub, html.rail .chev, html.rail .sngroup { display: none !important; }
  html.rail .sidenav { padding: 8px 8px 12px; align-items: center; }
  html.rail .sntop { width: 56px; height: 48px; padding: 0; justify-content: center; border-radius: 16px; }
  html.rail .snbrand { justify-content: center; } html.rail .snbrand .brand { display: none; }
  html.rail .snsec, html.rail .snfoot { width: 100%; display: flex; flex-direction: column; align-items: center; }
}
.tbicon .badge { top: 3px; right: 1px; }

/* ---------------------------------------------------------------- support inbox */
.hd { display: grid; grid-template-columns: 230px 360px minmax(0, 1fr); gap: 0; height: calc(100vh - 128px); min-height: 560px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hdviews { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 8px; font-size: 13.5px; background: var(--page); }
.hdvhead { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px; } .hdvhead .tbbtn { height: 30px; padding: 0 12px; font-size: 12.5px; }
.hdv { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 16px; color: var(--text-2); }
.hdv:hover { background: var(--surface-2); text-decoration: none; } .hdv.on { background: var(--nav-active); color: var(--nav-active-text); font-weight: 600; }
.hdv .pn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hdv .ic { width: 18px; text-align: center; }
.hdv .cnt { font-size: 12px; color: var(--muted); } .hdv .cnt.bad { color: #fff; background: var(--critical); border-radius: 9px; padding: 0 6px; }
.hdvfoot { padding: 12px 10px; font-size: 11.5px; line-height: 1.5; border-top: 1px solid var(--line); margin-top: 10px; }
.hdlist { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.hdsearch { padding: 10px; border-bottom: 1px solid var(--line); }
.hdsearch input { width: 100%; font: inherit; font-size: 13.5px; padding: 8px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.hdrows { overflow-y: auto; flex: 1; }
.hdrow { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text); border-left: 3px solid transparent; }
.hdrow:hover { background: var(--surface-2); text-decoration: none; } .hdrow.sel { background: var(--accent-wash); border-left-color: var(--accent); }
.hdrow.unread .who, .hdrow.unread .subj { font-weight: 700; }
.hdrow .r1 { display: flex; align-items: center; gap: 6px; font-size: 13.5px; } .hdrow .who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdrow .age { font-size: 11.5px; color: var(--muted); }
.hdrow .subj { font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdrow .prev { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hdrow .prev.hit mark { background: color-mix(in srgb, #fbbc04 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.hdrow .r3 { display: flex; align-items: center; gap: 5px; margin-top: 6px; flex-wrap: wrap; } .hdrow .r3 .sp { flex: 1; }
.cat { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); } .cat.ai { color: var(--ai-text); }
.tagx { font-size: 11px; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.st { font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; color: var(--muted); }
.st.pending { color: #b06000; } .st.closed { color: var(--good-text); } .st.snoozed { color: var(--ai-text); }
.sla { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 8px; }
.sla.ok { color: var(--muted); } .sla.warn { background: rgba(249,171,0,.2); color: var(--warning-text); } .sla.breach { background: var(--critical); color: #fff; }
.prio.urgent { color: var(--critical); margin-right: 4px; } .prio.high { color: var(--warning); margin-right: 4px; }
.mood { font-size: 13px; }
.hdnone { padding: 40px 20px; text-align: center; color: var(--muted); }
.hdticket { container-type: inline-size; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.hdempty { margin: auto; text-align: center; color: var(--muted); } .hdempty .big { font-size: 42px; opacity: .4; }
.hdempty kbd, .hdempty code { font: inherit; font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.hdtop { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.hdtitle { flex: 1; min-width: 220px; } .hdtitle h2 { margin: 0; font-size: 17px; font-weight: 500; }
.hdctl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hdctl select { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); padding: 5px 6px; max-width: 170px; }
.hdctl .tbbtn { height: 30px; padding: 0 12px; font-size: 12.5px; }
.hdticket .warnbar { margin: 8px 16px 0; }
.hdbody { display: grid; grid-template-columns: minmax(0, 1fr) 290px; flex: 1; min-height: 0; }
.hdconv { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.hdai { display: flex; gap: 10px; margin: 10px 16px 0; padding: 10px 12px; border-radius: 10px; background: rgba(139,92,246,.07); border: 1px solid rgba(139,92,246,.25); font-size: 13.5px; }
.hdthread { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.hdmsg { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); max-width: 92%; }
.hdmsg.out { align-self: flex-end; background: var(--accent-wash); border-color: transparent; }
.hdmsg.note { background: rgba(249,171,0,.12); border-color: rgba(249,171,0,.4); align-self: stretch; max-width: none; }
.hdmsg .mh { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 12.5px; margin-bottom: 6px; } .hdmsg .mh .linkbtn { margin: 0; }
.hdmsg .mb { white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; word-break: break-word; }
.hdmsg .translated { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--text-2); }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .att { font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; } .att em { color: var(--muted); font-style: normal; }
.hdcompose { border-top: 1px solid var(--line); padding: 10px 16px 12px; background: var(--surface); }
.hdcompose.notemode { background: rgba(249,171,0,.10); border-top: 2px solid #f9ab00; }
.hdcompose.notemode textarea { background: rgba(249,171,0,.12); border-color: rgba(249,171,0,.6); }
.chead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.chead .ctabs { margin: 0; }
.chead .cto { flex: 1; min-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chead .chelp { margin-left: auto; font-size: 12.5px; }
.notebanner { margin: 0 0 8px; padding: 7px 10px; border-radius: 8px; background: rgba(249,171,0,.18); color: var(--text); font-size: 13px; }
.typingbar { margin: 0 0 8px; padding: 7px 10px; border-radius: 8px; background: rgba(217,48,37,.08); border: 1px solid rgba(217,48,37,.3); font-size: 13px; }
.aigroup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 18px; background: rgba(139,92,246,.06); }
.aglabel { font-size: 12.5px; font-weight: 600; color: var(--ai-text); padding: 0 4px; }
.aimore { position: relative; }
.aimenu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30; min-width: 250px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 5px; display: flex; flex-direction: column; }
.aimenu[hidden] { display: none; }
.aimenu button { text-align: left; border: 0; background: none; font: inherit; font-size: 13.5px; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text); }
.aimenu button:hover, .aimenu button:focus-visible { background: rgba(139,92,246,.1); }
.hdcompose kbd, .howto kbd, .note kbd { font: 11px/1 ui-monospace, monospace; padding: 2px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.btn kbd { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: inherit; }
.howto li { margin-bottom: 8px; line-height: 1.5; }
.alertbtn { margin-left: 6px; }
.ctabs { display: flex; gap: 4px; margin-bottom: 8px; } .ctabs button { border: 0; background: none; font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 14px; color: var(--muted); cursor: pointer; }
.ctabs button.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.hdcompose textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.5; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; background: var(--surface); color: var(--text); min-height: 120px; }
.hdcompose textarea:focus { outline: none; border-color: var(--accent); }
.aidraftnote { margin-top: 4px; color: var(--ai-text); }
.cbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; } .cbar .sp { flex: 1; }
.cbar select { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); padding: 5px 8px; }
.aib { border-color: rgba(139,92,246,.5); color: var(--ai-text); } .aiinstr { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 16px; padding: 5px 10px; width: 210px; background: var(--surface); color: var(--text); }
.hdcust { overflow-y: auto; padding: 14px; font-size: 13px; background: var(--page); }
.cuhead { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; } .cuhead b { font-size: 14px; }
.custstats.mini { grid-template-columns: 1fr 1fr; gap: 8px; } .custstats.mini b { font-size: 15px; }
.cuorder { padding: 7px 0; border-bottom: 1px solid var(--line); } .cuorder > div:first-child { display: flex; gap: 6px; align-items: center; } .cuorder .sp { flex: 1; }
.cuearlier { display: block; padding: 4px 0; font-size: 12.5px; }
.taginput { width: 100%; box-sizing: border-box; font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--text); }
.hdevents .note { padding: 2px 0; font-size: 11.5px; }
.custbtn { display: none !important; }
@media (max-width: 1200px) { .hd { grid-template-columns: 200px 300px minmax(0, 1fr); } .hdbody { grid-template-columns: minmax(0, 1fr); }
  .hdcust { display: none; } .hdbody.showcust .hdcust { display: block; border-left: 0; border-top: 1px solid var(--line); } .custbtn { display: inline-flex !important; } }
/* phones / small tablets: views become a scrolling chip row instead of disappearing */
@media (max-width: 900px) { .hd { grid-template-columns: minmax(0, 1fr); height: auto; } .hd > * { min-width: 0; max-width: 100%; } .hdlist { max-height: 45vh; } .hdticket { min-height: 70vh; }
  .hdviews { display: block; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; overflow-x: auto; white-space: nowrap; }
  .hdviews .hdvhead, .hdviews .tshead, .hdviews .hdvfoot, .hdviews nav:not([data-hd-views]) { display: none; }
  .hdviews nav[data-hd-views] { display: flex; gap: 6px; }
  .hdviews nav[data-hd-views] .hdv { flex: none; border: 1px solid var(--line); border-radius: 16px; padding: 4px 10px; } }

/* reply quality bar, previews, dialogs */
.qbar { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; min-height: 0; }
.qbar:empty { display: none; }
.qi { font-size: 12px; line-height: 1.35; padding: 3px 9px; border-radius: 12px; background: var(--page); color: var(--muted); max-width: 100%; }
.qi.error { background: rgba(217,48,37,.10); color: var(--critical-text); }
.qi.warn { background: rgba(249,171,0,.14); color: var(--warning-text); }
.qi.ok { background: rgba(30,142,62,.10); color: var(--good-text); }
.hddlg { border: 0; border-radius: 16px; padding: 20px 22px; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.25); box-sizing: border-box; }
.hddlg::backdrop { background: rgba(32,33,36,.45); }
.dlgx { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.dlghead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 28px 12px 0; } .dlghead b { font-size: 16px; }
.dlgfoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.mailframe { width: 100%; height: 460px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mailframe.small { height: 220px; }
.score { font-weight: 700; padding: 2px 10px; border-radius: 12px; } .score.good { background: rgba(30,142,62,.12); color: var(--good-text); }
.score.mid { background: rgba(249,171,0,.16); color: var(--warning-text); } .score.bad { background: rgba(217,48,37,.12); color: var(--critical-text); }
.revlist { margin: 0 0 8px; padding-left: 20px; line-height: 1.5; }
.revtext { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; font-family: inherit; background: var(--page); border-radius: 10px; padding: 12px 14px; margin: 6px 0 0; }
.sigform { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.sigform label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.sigform input[type=text], .sigform input:not([type]) { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.sigmode { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; } .sigmode label { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-size: 13.5px; }
@media (max-width: 600px) { .sigform { grid-template-columns: 1fr; } .mailframe { height: 380px; } }
.cbar2 { margin-top: 6px; } .cbar2 .linkbtn { font-size: 12.5px; }
.mailframe.sigframe { height: 300px; }
.chan { margin-right: 4px; }
.visitor { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--muted); } .visitor.on { color: var(--good-text); font-weight: 600; }
.shot { display: inline-block; margin: 6px 6px 0 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--page); }
.shot img { display: block; max-width: 260px; max-height: 200px; object-fit: contain; }
.setup { padding-left: 20px; line-height: 1.6; font-size: 13.5px; } .setup li { margin-bottom: 8px; }
.snippet { white-space: pre-wrap; word-break: break-all; background: var(--page); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; margin: 6px 0; }

/* saved replies manager */
.rp { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 16px; align-items: start; }
.rplist { padding: 12px; position: sticky; top: 12px; max-height: calc(100vh - 140px); display: flex; flex-direction: column; }
.rpideas { margin: 4px 0 8px; }
.rpidea-box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: color-mix(in srgb, var(--accent, #1a73e8) 5%, transparent); }
.rpidea-box summary { cursor: pointer; font-weight: 600; }
.rpidea-box .badge { background: var(--accent, #1a73e8); color: #fff; border-radius: 9px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
.rpidea { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-top: 1px solid var(--line); }
.rpidea a { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.rpidea.sel a b { color: var(--accent, #1a73e8); }
.rpidea-box .tbbtn { margin-top: 8px; }
.rpwhy { border-left: 3px solid var(--accent, #1a73e8); padding: 6px 10px; background: color-mix(in srgb, var(--accent, #1a73e8) 6%, transparent); border-radius: 6px; font-size: 13px; }
.rphead { display: flex; gap: 8px; } .rphead input { flex: 1; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 20px; padding: 7px 14px; background: var(--surface); color: var(--text); }
.rpsort { display: flex; align-items: center; gap: 6px; margin: 10px 2px 4px; } .rpsort select { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 14px; padding: 3px 8px; background: var(--surface); color: var(--text); }
.rpsort span { margin-left: auto; }
.rprows { overflow-y: auto; margin: 0 -4px; }
.rprow { display: block; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none; margin: 1px 4px; }
.rprow:hover { background: var(--page); } .rprow.sel { background: var(--nav-active, #d3e3fd); }
.rprow b { display: block; font-weight: 500; font-size: 13.5px; } .rprow .note { font-size: 12px; } .chk { color: var(--warning-text); }
.rpedit { padding: 16px 18px; min-height: 420px; }
.rpform { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; } .rpform .wide { grid-column: 1 / -1; }
.rpform label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.rpform input, .rpform select { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.rpform textarea { font: inherit; font-size: 14px; line-height: 1.55; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; resize: vertical; }
.rpform textarea:focus, .rpform input:focus { outline: none; border-color: var(--accent); }
.vars { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .vars .sp, .rpbtns .sp { flex: 1; }
.varchip { font: inherit; font-size: 12px; border: 1px solid var(--line); background: var(--page); color: var(--text); border-radius: 12px; padding: 2px 9px; cursor: pointer; font-family: ui-monospace, monospace; }
.rpbtns { display: flex; gap: 8px; align-items: center; } .tbbtn.danger { color: var(--critical-text); }
.rpedit .mailframe { height: 520px; margin-top: 6px; }
@media (max-width: 900px) { .rp { grid-template-columns: 1fr; } .rplist { position: static; max-height: 50vh; } .rpform { grid-template-columns: 1fr; } }
.mpick { position: relative; }
.rpick { position: fixed; z-index: 1000; width: min(420px, 80vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 8px; }
.rpick[hidden] { display: none; }
.rpick input { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--surface); color: var(--text); }
.mlist { max-height: 300px; overflow-y: auto; margin: 6px 0; }
.mitem { padding: 7px 9px; border-radius: 8px; cursor: pointer; } .mitem b { display: block; font-weight: 500; font-size: 13.5px; } .mitem .note { font-size: 12px; }
.mitem.on, .mitem:hover { background: var(--nav-active, #d3e3fd); }
.mmanage { display: block; padding: 4px 6px 0; }

/* key delivery */
.kdgrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.kdact { width: 1%; } .kdact > * { display: flex; justify-content: center; width: 100%; box-sizing: border-box; margin: 3px 0; white-space: nowrap; }
.bad { color: var(--critical-text); font-weight: 600; } .warnc { color: var(--warning-text); font-weight: 600; } .okc { color: var(--good-text); }
.barlist { display: flex; flex-direction: column; gap: 10px; }
.bl { display: grid; grid-template-columns: 1fr; gap: 3px; }
.bln { font-size: 13px; } .blv { font-size: 12px; color: var(--muted); }
.blb { height: 8px; background: var(--page); border-radius: 4px; overflow: hidden; } .blb span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
@media (max-width: 1000px) { .kdgrid { grid-template-columns: 1fr; } }
.rating { display: inline-block; margin: 4px 8px 0 0; font-size: 12px; padding: 2px 9px; border-radius: 10px; background: var(--page); }
.rating.r3 { color: var(--good-text); background: rgba(30,142,62,.10); } .rating.r1 { color: var(--critical-text); background: rgba(217,48,37,.10); }

/* carousel studio */
.cs { display: grid; grid-template-columns: minmax(260px, 320px) 1fr; gap: 16px; align-items: start; }
.csside h2, .csmain h2 { font-size: 15px; margin: 0 0 10px; }
.csl { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; flex: 1; }
.csl select, .csl textarea, .csl input, .cshead input, .cshead select, .csed input, .csed textarea, .csed select, .cscap select {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.csrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .csrow .sp, .cshead .sp { flex: 1; }
.cslist { display: flex; flex-direction: column; gap: 2px; }
.csitem { display: block; padding: 7px 9px; border-radius: 8px; color: var(--text); text-decoration: none; } .csitem:hover { background: var(--page); }
.csitem.sel { background: var(--nav-active, #d3e3fd); } .csitem b { display: block; font-weight: 500; font-size: 13.5px; }
.cshead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; } .cshead input { flex: 1 1 240px; font-weight: 600; }
.csslides { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.csslide { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--page); }
.csslide canvas { width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.csed { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; } .csed textarea { resize: vertical; }
.csemoji { width: 54px; text-align: center; }
.csadd { border: 2px dashed var(--line); border-radius: 12px; background: none; color: var(--muted); font: inherit; cursor: pointer; min-height: 120px; }
.cscap { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
@media (max-width: 900px) { .cs { grid-template-columns: 1fr; } }
.csed .csrow { flex-wrap: nowrap; } .cskind { flex: 1 1 auto; min-width: 0; }
.cstools { display: inline-flex; gap: 2px; flex: none; }
.cstools button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 15px; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; }
.cstools button:hover { background: var(--surface); color: var(--text); }
.csimg { border-top: 1px solid var(--line); padding-top: 6px; } .csimg summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.csimg textarea { width: 100%; box-sizing: border-box; margin: 6px 0; font-size: 12.5px; }

/* content studio */
.opps { display: flex; flex-wrap: wrap; gap: 6px; } .opps .chip { font-family: inherit; }
.themecard { display: flex; flex-direction: column; gap: 3px; text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; cursor: pointer; font: inherit; color: var(--text); }
.themecard:hover { border-color: var(--accent); } .themecard b { font-size: 13.5px; font-weight: 600; }
.ctabs2 { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; }
.ctabs2 button { border: 0; background: none; font: inherit; font-size: 14px; color: var(--muted); padding: 8px 14px; cursor: pointer; border-bottom: 3px solid transparent; }
.ctabs2 button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.ctpane .csl input, .ctpane .csl textarea { width: 100%; box-sizing: border-box; }
.serp { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; background: var(--surface); }
.serp .serpu { font-size: 12px; color: var(--muted); } .serp .serpt { font-size: 19px; color: #1a0dab; margin: 3px 0; } .serp .serpd { font-size: 13px; color: var(--muted); }
@media (prefers-color-scheme: dark) { .serp .serpt { color: #8ab4f8; } }
.artframe { height: 560px; margin: 8px 0; } .htmled { width: 100%; box-sizing: border-box; font: 12.5px/1.5 ui-monospace, monospace; }
.faq { border-bottom: 1px solid var(--line); padding: 6px 0; } .faq summary { cursor: pointer; font-weight: 500; } .faq p { margin: 6px 0 0; color: var(--muted); }
.pst.approved { color: var(--good-text); font-weight: 600; } .pst.published { color: var(--accent); }
[data-len].bad { color: var(--critical-text); font-weight: 700; }

.rpick .mitem { display: block; }
.ctabs [role=tab][aria-selected=true] { font-weight: 600; }
/* the customer panel hides by the space the conversation really has (not the window width) */
@container (max-width: 820px) {
  .hdbody { grid-template-columns: minmax(0, 1fr); }
  .hdcust { display: none; }
  .hdbody.showcust .hdcust { display: block; border-left: 0; border-top: 1px solid var(--line); }
  .custbtn { display: inline-flex !important; }
}
.hdvhead { flex-wrap: wrap; gap: 4px; }
.hdvhead .tbbtn { white-space: nowrap; padding: 3px 8px; font-size: 12px; }
.aigroup .aiinstr { flex: 1 1 240px; min-width: 200px; width: auto; }
.vtyping { padding: 4px 18px 8px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.vtyping[hidden] { display: none; }
.vtyping .dots, .typingbar .dots { display: inline-flex; gap: 3px; }
.vtyping .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: hdblink 1.2s infinite; }
.vtyping .dots i:nth-child(2) { animation-delay: .2s; } .vtyping .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes hdblink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vtyping .dots i { animation: none; opacity: .6; } }
.seenmark { font-size: 11.5px; color: var(--muted); text-align: right; margin-top: 4px; }
.statusbtn.away { background: rgba(249,171,0,.15); }
.afterbar { margin-top: 6px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cuearlrow { display: flex; align-items: baseline; gap: 6px; } .cuearlrow .cuearlier { flex: 1; min-width: 0; } .cuearlrow .linkbtn { font-size: 12px; white-space: nowrap; }
.oldbar { margin: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
/* reply box: compact like a chat app — the conversation keeps the space, Send is always visible */
.hdthread { min-height: 140px; }
.hdcompose { flex: none; padding: 8px 14px 10px; }
.hdcompose textarea { min-height: 70px; resize: none; }
.hdcompose .chead { margin-bottom: 6px; }
.hdcompose .cbar { flex-wrap: wrap; margin-top: 6px; }
.hdcompose .sendbtn { font-weight: 600; padding: 0 18px; }
.hdcompose .qbar:empty, .hdcompose .aidraftnote:empty { display: none; }
.instrrow { margin-top: 6px; } .instrrow .aiinstr { width: 100%; box-sizing: border-box; }
.aimenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.aimore .aimenu { left: auto; right: 0; }
/* compact ticket header */
.hdctl select, .hdctl .tbbtn { height: 30px; font-size: 12.5px; }
.hdticket { overflow: hidden; }
.hdbody { grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.hdconv { min-height: 0; overflow: hidden; }
.hdcust { overflow-y: auto; }
@media (max-width: 900px) { .hdticket, .hdbody, .hdconv { overflow: visible; } .hdbody { grid-template-rows: auto; } }
@media (max-width: 1440px) and (min-width: 901px) { .hd { grid-template-columns: 190px 300px minmax(0, 1fr); } }
.hdai { padding: 7px 10px; margin-top: 8px; }
.hdai b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hdai b:hover { -webkit-line-clamp: unset; }
.hdthread { min-height: 90px; }
.hdcompose { max-height: 75%; overflow-y: auto; }
.hdcompose .cbar { position: sticky; bottom: -10px; background: var(--surface); padding: 4px 0 2px; z-index: 2; }
.hdcompose.notemode .cbar { background: #fff6e0; }
@container (max-width: 620px) {
  .chead .cto { display: none; }
  .hdtitle h2 { font-size: 16px; }
  .hdcompose .iconbtn { padding: 0 9px; }
}
/* menu fully hidden (desktop): content uses the whole width; ☰ in the top bar brings it back */
@media (min-width: 901px) {
  html.navhidden { --sbw: 0px; }
  html.navhidden .sidenav { display: none; }
  html.navhidden .mobonly[data-nav-open] { display: grid; }
}
.snhide { border: 0; background: none; font: inherit; cursor: pointer; color: var(--muted); width: 100%; text-align: left; }
.snhide:hover { color: var(--text); }
@media (min-width: 901px) { html.navhidden .app { grid-template-columns: minmax(0, 1fr); } }
.hdcompose .sendgrp { margin-left: auto; display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.undobar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 12px; border-radius: 10px;
  background: #202124; color: #fff; font-size: 14px; }
.undobar span { flex: 1; } .undobar .btn.ghost { background: #fff; color: #202124; border: 0; height: 30px; padding: 0 14px; } .undobar .linkbtn { color: #8ab4f8; }
.cuorder.mention { border-left: 3px solid #f9ab00; padding-left: 8px; }
.mwarn { font-size: 12px; color: #b06000; margin-top: 3px; }
.nsopts { display: flex; flex-direction: column; gap: 8px; align-items: stretch; } .nsopts .tbbtn { justify-content: flex-start; text-align: left; height: auto; padding: 9px 12px; }
.bulkbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; background: var(--accent-wash); border-bottom: 1px solid var(--line); font-size: 13px; }
.bulkbar[hidden] { display: none; }
.bulkbar .tbbtn { height: 28px; padding: 0 9px; font-size: 12.5px; } .bulkbar select { font: inherit; font-size: 12.5px; border-radius: 14px; border: 1px solid var(--line); padding: 3px 6px; background: var(--surface); color: var(--text); }
.hdrow .pick { margin: 0 6px 0 0; vertical-align: middle; opacity: 0; transition: opacity .1s; }
.hdrow:hover .pick, .hdrow .pick:checked, .hdrows.picking .pick, .hdrow .pick:focus-visible { opacity: 1; }
@media (hover: none) { .hdrow .pick { opacity: 1; } }
.filebar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.filebar[hidden] { display: none; }
.filechip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 4px 3px 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.filechip em { color: var(--muted); font-style: normal; }
.hdcompose.dropping { outline: 2px dashed var(--accent); outline-offset: -4px; background: var(--accent-wash); }
a.att { text-decoration: none; color: var(--text); }
/* Claude autopilot */
.apstatus { padding: 14px 16px; margin-bottom: 16px; }
.apsteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.apstep { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.apstep b { color: var(--text); font-size: 14px; } .apstep.on { border-color: rgba(139,92,246,.5); background: rgba(139,92,246,.06); }
.apstatus b.ok { color: var(--good); }
.aptable select { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--surface); color: var(--text); max-width: 260px; }
.apgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.aprule { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.aprule select, .aprule textarea { font: inherit; font-size: 13.5px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); color: var(--text); }
.aprule .btn { justify-self: start; }
.aprulerow { display: flex; gap: 8px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.aprulerow .txt { flex: 1; white-space: pre-wrap; }
@media (max-width: 900px) { .apsteps, .apgrid { grid-template-columns: 1fr; } }
/* Claude in the conversation */
.clpanel { margin: 8px 16px 0; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(139,92,246,.35); background: rgba(139,92,246,.06); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.clpanel .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.aichip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: var(--surface-2); }
.aichip.risk-medium { background: rgba(249,171,0,.2); } .aichip.risk-high { background: rgba(217,48,37,.15); color: var(--critical-text); font-weight: 600; }
.aichip.simple { background: rgba(30,142,62,.12); } .aichip.complex { background: rgba(217,48,37,.08); }
.clpanel .train { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; border-top: 1px dashed rgba(139,92,246,.35); }
.clpanel .train b { flex: 1 1 260px; }
.rowchip { font-size: 11px; padding: 1px 6px; border-radius: 8px; background: rgba(139,92,246,.12); color: var(--ai-text); }
.rowchip.risk { background: rgba(217,48,37,.12); color: #c5221f; }
.rejtext { width: 100%; box-sizing: border-box; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; background: var(--surface); color: var(--text); }
.clsum { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .clsum:hover { -webkit-line-clamp: unset; }
.aphint { margin-left: 10px; } .cardhead .aphint { flex: 1; }
/* phone: list OR conversation, never both stacked */
.phoneback { display: none; }
@media (max-width: 900px) {
  .hd:not(.phone-ticket) .hdticket { display: none; }
  .hd.phone-ticket .hdviews, .hd.phone-ticket .hdlist { display: none; }
  .hd.phone-ticket .hdticket { min-height: 0; }
  .phoneback { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600;
    font-size: 14px; padding: 8px 14px; border-radius: 18px; margin: 0 0 8px; cursor: pointer; }
  .hdlist { max-height: none; }
}
/* More menu: a sheet at the bottom on small screens (never off-screen) */
@media (max-width: 600px) {
  .aimenu { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; min-width: 0; max-height: 70vh; overflow-y: auto; z-index: 60;
    box-shadow: 0 -6px 30px rgba(0,0,0,.25); }
  .aimenu button { padding: 12px 12px; font-size: 15px; }
}
.clpanel .row .clsum { flex: 1 1 0; min-width: 0; }
.rphead .btn { white-space: nowrap; }
@media (max-width: 900px) { .rplist { max-height: none; } .rprows { max-height: 55vh; overflow-y: auto; } }
.rplist .rprows { flex: 1 1 auto; min-height: 120px; } .rplist .rpideas { flex: none; max-height: 45%; overflow-y: auto; }
.searchnote { padding: 7px 14px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }

@media (max-width: 900px) { .hd:not(.phone-ticket) .hdviews .hdvhead { display: flex; padding: 8px 10px 2px; justify-content: flex-start; } .hdviews .hdvhead > b { display: none; } }
.undobar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; width: min(560px, calc(100vw - 24px)); box-shadow: 0 8px 28px rgba(0,0,0,.3); z-index: 80; margin: 0; }
.clpanel { max-height: 38%; overflow-y: auto; flex: none; }
:root[data-theme="dark"] .chip.risk-high, :root[data-theme="dark"] .rowchip.risk { color: #f28b82; background: rgba(242,139,130,.16); }
:root[data-theme="dark"] .chip.risk-medium { color: #fdd663; background: rgba(253,214,99,.14); }
:root[data-theme="dark"] .mwarn { color: #fdd663; }
:root[data-theme="dark"] .hdcompose.notemode .cbar { background: #2b2616; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip.risk-high, :root:not([data-theme="light"]) .rowchip.risk { color: #f28b82; background: rgba(242,139,130,.16); }
  :root:not([data-theme="light"]) .chip.risk-medium { color: #fdd663; background: rgba(253,214,99,.14); }
  :root:not([data-theme="light"]) .mwarn { color: #fdd663; }
  :root:not([data-theme="light"]) .hdcompose.notemode .cbar { background: #2b2616; }
}
.ahdlg .ahch { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0; }
.ahdlg .ahch label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.ahdlg .ahtext { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); color: var(--text); }
.ahdlg .ahtime { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 14px; }
.ahdlg .ahwhen { font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; background: var(--surface); color: var(--text); }
/* Publishing */
.pub { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.pubcomp, .pubq { padding: 14px 16px; }
.pubch { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.pubchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 16px; font-size: 13.5px; cursor: pointer; }
.pubchip:has(input:checked) { background: var(--accent-wash); border-color: var(--accent); }
.pubcomp textarea, .pubvars textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); color: var(--text); }
.pubcount { margin: 4px 0; } .pubcount .over, .pubvars .over { color: var(--bad, #d93025); font-weight: 600; }
.pubrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; } .pubrow .sp { flex: 1; }
.pubvars { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pubtime { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 14px; }
.pubtime input[type=datetime-local] { font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; background: var(--surface); color: var(--text); }
.pubtime .chip { cursor: pointer; border: 1px solid var(--line); margin: 0 3px; }
.publist { display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow-y: auto; }
.pubitem { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.pubitem.failed { border-color: rgba(217,48,37,.5); background: rgba(217,48,37,.05); }
.pubmeta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .pubmeta .sp { flex: 1; }
.pubtag { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--surface-2); }
.pubtext { white-space: pre-wrap; font-size: 13.5px; margin: 6px 0; max-height: 7.5em; overflow: hidden; }
.pubact { display: flex; gap: 12px; font-size: 13px; } .linkbtn.danger { color: var(--bad, #d93025); }
@media (max-width: 1000px) { .pub { grid-template-columns: 1fr; } }
.calpost { display: block; font-size: 11.5px; padding: 2px 5px; margin-top: 2px; border-radius: 5px; background: rgba(26,115,232,.1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calpost.published { background: rgba(30,142,62,.12); } .calpost.failed { background: rgba(217,48,37,.12); }
.ahbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 14px; margin: 0 0 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; } .ahbar .sp { flex: 1; }
.pubstats { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.srep { padding: 14px 16px; margin-bottom: 16px; }
.srep h3 { font-size: 14px; margin: 12px 0 6px; } .srep ul { margin: 0; padding-left: 18px; } .srep li { margin-bottom: 4px; font-size: 13.5px; }
.srephead { font-size: 15px; font-weight: 600; margin: 4px 0 6px; }
.srepgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 800px) { .srepgrid { grid-template-columns: 1fr; } }
.hdsearch { display: flex; gap: 6px; align-items: center; }
.hdsearch input[type=search] { flex: 1; min-width: 0; }
.hdsearch select { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 16px; padding: 6px 8px; background: var(--surface); color: var(--text); max-width: 130px; }
.hdsearch select.on { border-color: var(--accent); background: var(--accent-wash); }
.hddates { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 12px 8px; font-size: 12.5px; }
.hddates[hidden] { display: none; }
.hddates input { font: inherit; font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; background: var(--surface); color: var(--text); }
.pubchip.off { opacity: .6; cursor: help; } .pubchip.off em { font-style: normal; font-size: 11.5px; color: var(--muted); }
/* publishing: images */
.pubmediabox { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.pubmediabox.drag { border-color: var(--accent, #1a73e8); background: rgba(26,115,232,.06); }
.pubmhead { display: flex; align-items: center; gap: 8px; }
.pubthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 8px; }
.pubthumbs:empty { display: none; }
.pubthumb { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg2, #f6f6f6); }
.pubthumb img, .pubthumb video, .pubthumb > .spin { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.pubthumb > .spin { width: 18px; height: 18px; margin: 45% auto; aspect-ratio: auto; }
.pubthumb figcaption { display: flex; align-items: center; gap: 2px; font-size: 11px; padding: 2px 4px; }
.pubthumb button { border: 0; background: none; cursor: pointer; padding: 2px 4px; color: inherit; font-size: 12px; }
.pubthumbs:not(:empty) + .pubdrop { margin-top: 6px; }
.pubmedia { display: flex; gap: 4px; margin-top: 6px; align-items: center; }
.pubmedia img { width: 44px; height: 55px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.pubmedia span { font-size: 12px; opacity: .7; }
.puberr { color: #d93025; font-size: 12.5px; margin: 4px 0; }
.pubchip em { font-style: normal; font-size: 11px; opacity: .7; }
.pubact { align-items: center; justify-content: flex-start; flex-wrap: wrap; }
.pubact > * { margin: 0 !important; flex: none; width: auto; }
.pubmhead .tbbtn { white-space: nowrap; }
/* KPI rows: balanced columns for the number of cards (no lonely card on a second row) */
@media (min-width: 1180px) {
  .tiles:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
  .tiles:has(> :nth-child(4):last-child), .tiles:has(> :nth-child(7):last-child), .tiles:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, 1fr); }
  .tiles:has(> :nth-child(5):last-child), .tiles:has(> :nth-child(9):last-child), .tiles:has(> :nth-child(10):last-child) { grid-template-columns: repeat(5, 1fr); }
  .tiles:has(> :nth-child(6):last-child), .tiles:has(> :nth-child(11):last-child), .tiles:has(> :nth-child(12):last-child) { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 761px) and (max-width: 1179px) {
  .tiles:has(> :nth-child(6):last-child), .tiles:has(> :nth-child(9):last-child) { grid-template-columns: repeat(3, 1fr); }
  .tiles:has(> :nth-child(4):last-child), .tiles:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, 1fr); }
}
/* three tables side by side: let them scroll inside the card instead of cutting columns off */
.grid.g3 .card table.dt { min-width: 0; }
.grid.g3 .card .tablewrap, .grid.g3 .card { overflow-x: auto; }
.grid.g3 table.dt th, .grid.g3 table.dt td { padding-left: 6px; padding-right: 6px; font-size: 12.5px; }
.grid.g3 .bar-inline { max-width: 28px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.alert.techgroup { display: block; background: transparent; border: 1px dashed var(--line); }
.alert.techgroup summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.alert.techgroup summary::-webkit-details-marker { display: none; }
.alert.techgroup .d { margin: 6px 0 0 28px; }
/* inbox: the conversation keeps most of the height; the composer grows while you type in it */
.hdcompose { max-height: 58%; }
.hdcompose:not(:focus-within) textarea { max-height: 140px; overflow-y: auto; }
.hdcompose:focus-within { max-height: 70%; }
/* phone: period + comparison on one compact row; "By" (auto works well) and labels hidden */
@media (max-width: 760px) {
  .filterform { display: flex; flex-wrap: nowrap; gap: 6px; width: 100%; }
  .filterform label.g, .filterform .views { display: none; }
  .filterform label.cmp > span { display: none; }
  .filterform label.cmp { flex: 1 1 45%; min-width: 0; }
  .filterform label.cmp select { width: 100%; min-width: 0; text-overflow: ellipsis; }
  .filterform .daterange { flex: 1 1 55%; min-width: 0; }
  .filterform .daterange select { min-width: 0; width: 100%; }
  .filterform .daterange:has(.custom.on) { flex-wrap: wrap; }
  .pagebar { gap: 6px; }
}
.alert.techgroup summary { display: block; }
.alert.techgroup summary .ic { display: inline-flex; margin-right: 6px; vertical-align: -2px; }
.calimg { width: 18px; height: 22px; object-fit: cover; border-radius: 3px; vertical-align: middle; }
.foldsec { margin-top: 16px; }
.foldsec > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 8px 4px; }
.foldsec > summary:hover { color: var(--text); }
/* phone: an open conversation shows Close · Customer · ⋯ (status, assignee, priority, topic, snooze fold away) */
.hdctl .hdmore { display: none; }
@media (max-width: 760px) {
  .hdctl .hdmore { display: inline-flex; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hdctl:not(.open) > select, .hdctl:not(.open) > [data-notsupport], .hdctl:not(.open) > [data-translate-all] { display: none; }
}
/* inbox rules */
.ruleitem { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.ruleitem.off { opacity: .55; }
.rulemain { flex: 1; min-width: 0; }
.ruletools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rulerow { display: flex; gap: 8px; align-items: center; margin: 12px 0 6px; flex-wrap: wrap; }
.rulecond { display: flex; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.rulecond input { flex: 1; min-width: 180px; }
.ruleacts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.ruleacts label { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.rulex { margin: 6px 0 0 18px; }
.starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.startercard { text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.startercard:hover { border-color: var(--accent); }
.startercard .note { overflow-wrap: anywhere; }
.alert .askbtn { flex: none; align-self: center; white-space: nowrap; font-size: 12.5px; }
/* ads fix list */
.fixitem { display: flex; gap: 14px; align-items: center; border-top: 1px solid var(--line); padding: 10px 0; }
.fixitem:first-of-type { border-top: 0; }
.fiximpact { flex: none; width: 92px; font-size: 18px; font-weight: 600; text-align: right; }
.fiximpact span { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.fixitem.winner .fiximpact, .fixitem.shift .fiximpact { color: #188038; }
.fixitem.negative .fiximpact, .fixitem.campaign .fiximpact, .fixitem.product .fiximpact { color: #d93025; }
.fixbody { flex: 1; min-width: 0; }
.fixact { flex: none; display: flex; gap: 6px; align-items: center; }
@media (max-width: 760px) { .fixitem { flex-wrap: wrap; } .fiximpact { width: auto; text-align: left; } }
/* customer timeline */
ol.tl { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--line); }
ol.tl li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0 6px 12px; position: relative; }
ol.tl .tlic { position: absolute; left: -13px; background: var(--surface); width: 22px; text-align: center; }
ol.tl .tlt { flex: none; width: 120px; padding-left: 10px; }
ol.tl .tltx { flex: 1; min-width: 0; }
ol.tl .tlam { flex: none; }
ol.tl .tl-refund .tlam, ol.tl .tl-failed .tltx { color: #d93025; }
@media (max-width: 760px) { ol.tl li { flex-wrap: wrap; } ol.tl .tlt { width: auto; } }
/* competitor prices */
.pricetbl td.cheap a { color: #188038; font-weight: 600; }
.pricetbl .editurl { padding: 0 4px; font-size: 11px; opacity: .5; }
.pricetbl td:hover .editurl { opacity: 1; }
.pill.bad { background: rgba(217,48,37,.12); color: var(--critical-text); }

.dismissible { position: relative; padding-right: 38px; }
.dismissx { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); border: 0; background: transparent; color: inherit;
  font-size: 20px; line-height: 1; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; opacity: .7; }
.dismissx:hover { opacity: 1; background: rgba(0,0,0,.06); }

/* approve posts (social media manager) */
.smmrow { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.smmrun { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 320px; justify-content: flex-end; }
.smmrun input { flex: 1 1 220px; min-width: 0; }
.smmpost { margin-top: 16px; }
.smmtop { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.smmtitle { font-size: 15px; }
.smmslides { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.smmslides a { flex: none; scroll-snap-align: start; }
.smmslides img { width: 270px; height: auto; border-radius: 10px; display: block; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.smmwhy { margin: 8px 0 4px; }
.smmlbl { display: block; font-weight: 600; margin: 12px 0 4px; }
.smmpost textarea { width: 100%; box-sizing: border-box; font: inherit; line-height: 1.45; }
.smmtags { margin: 4px 0 0; word-break: break-word; }
.smmwhen { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.smmact { display: flex; gap: 10px; margin-top: 14px; }
.smmact .btn { flex: 1 1 auto; min-height: 48px; font-size: 16px; }
.smmact .tbbtn { min-height: 48px; }
@media (max-width: 640px) { .smmslides img { width: 76vw; } }

/* ---- audit 2026-11-05: touch targets, focus, hover-only controls, phone layouts ---- */
:where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.palx { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--muted); font-size: 18px; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }
.palbox { position: relative; }
.palbox input { padding-right: 52px; }
.toast { z-index: 1000; }
@media (hover: none), (pointer: coarse) {
  .linkbtn, .iconbtn, .tbbtn, .cstools button, .pubthumb button, .dlgx, .dismissx, .npfilter button, .hdvhead .tbbtn, .bulkbar .tbbtn { min-height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; }
  .linkbtn { padding: 0 8px; }
  .hdrow .pick { width: 20px; height: 20px; }
  .pricetbl .editurl { opacity: 1; }
  input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; }
}
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.userrow { display: grid; grid-template-columns: 1.1fr 1.6fr .9fr 1.3fr 1fr .9fr 2.4fr; gap: 8px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); }
.userrow input, .userrow select { max-width: 100%; }
.userrow .uacts { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 900px) { .userrow { grid-template-columns: 1fr 1fr; } .userrow .uacts { grid-column: 1 / -1; } }
@media (max-width: 520px) { .userrow { grid-template-columns: 1fr; } }
.minisearch input { width: min(220px, 100%); }

/* setup checklist (Overview) */
.setuplist { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.setuplist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); counter-increment: s; }
.setuplist li:first-child { border-top: 0; }
.setuplist li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-wash); color: var(--accent); font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.setuplist li > div { flex: 1; min-width: 0; }
.setuplist .tbbtn { flex: none; }
.warnc { color: var(--warning-text); font-weight: 600; }

/* settings tabs */
.stabs { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.stab { border: 0; background: none; font: inherit; font-weight: 500; color: var(--text-2); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 40px; }
.stab.on { color: var(--accent); border-bottom-color: var(--accent); }
/* phone bottom bar */
.phonebar { display: none; }
@media (max-width: 760px) {
  .phonebar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); }
  .phonebar a, .phonebar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 10.5px; color: var(--text-2); background: none; border: 0; padding: 6px 2px; min-height: 48px; text-decoration: none; }
  .phonebar a span, .phonebar button span { font-size: 18px; line-height: 1; }
  .phonebar a.on { color: var(--accent); font-weight: 600; }
  main { padding-bottom: 76px !important; }
  .hd { padding-bottom: 60px; }
}

.guidebar { font-size: 12.5px; color: var(--text-2); background: var(--accent-wash); border-radius: 8px; padding: 6px 10px; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.guidechip { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.guidebar .linkbtn { margin-left: 0; }

/* approvals */
.aprow { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.aprow:first-of-type { border-top: 0; }
.apmain { display: flex; gap: 12px; align-items: center; flex: 1 1 320px; min-width: 0; }
.apthumbs { display: flex; gap: 4px; flex: none; } .apthumbs img { width: 44px; height: 55px; object-fit: cover; border-radius: 6px; }
.apacts { display: flex; gap: 8px; flex-wrap: wrap; } .apacts .btn, .apacts .tbbtn { min-height: 40px; }
