/* NABAT HQ 3 design system.
   Layout: a slim Night rail on the computer, a tab bar on the phone; white paper cards on a warm near-white ground;
   gold on ONE thing per screen (what needs you); Night panels for numbers. Logical properties everywhere so Arabic mirrors. */
:root {
  --bg: #F6F5F1; --paper: #FFFFFF; --ink: #0A0F0C; --ink-2: #565C57; --ink-3: #8A8F8A;
  --line: #E6E2D9; --line-2: #D9D4C8; --soft: #F0EDE6; --hover: #F7F5F0;
  --gold: #E8B04A; --gold-ink: #241805; --gold-text: #8A5A12; --gold-wash: #FBF1DC;
  --rail: #0A0F0C; --rail-ink: #8E978F; --rail-hover: #18211B; --rail-on: #1E2721;
  --ok: #2F8F5B; --ok-wash: #E3F2E9; --warn: #B7791F; --warn-wash: #FBF0DA; --bad: #B4412F; --bad-wash: #F9E4DF; --info: #3D6AA8; --info-wash: #E5EDF8;
  --night: #0A0F0C; --night-2: #131A15; --night-line: #223027; --night-ink: #F2EEE6; --night-dim: #8E978F;
  --scrim: rgba(10, 15, 12, .38);
  --shadow-1: 0 1px 2px rgba(10, 15, 12, .05);
  --shadow-2: 0 1px 2px rgba(10, 15, 12, .05), 0 10px 30px rgba(10, 15, 12, .07);
  --shadow-3: 0 24px 60px rgba(10, 15, 12, .22);
  --f-head: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0A0F0C; --paper: #111712; --ink: #F2EEE6; --ink-2: #AEB4AD; --ink-3: #7A817B;
  --line: #222B24; --line-2: #2E3930; --soft: #161D17; --hover: #151C16;
  --gold-text: #E8B04A; --gold-wash: #2A2312;
  --rail: #050806; --rail-ink: #7F8880; --rail-hover: #121813; --rail-on: #1A221C;
  --ok: #5CC48A; --ok-wash: #13271B; --warn: #E3A84A; --warn-wash: #2A2212; --bad: #E58571; --bad-wash: #2E1814; --info: #7FA6E0; --info-wash: #162033;
  --night: #0D1310; --night-2: #141B16; --night-line: #26322A;
  --scrim: rgba(0, 0, 0, .55);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 600; margin: 0; line-height: 1.25; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.num { font-family: var(--f-head); font-variant-numeric: tabular-nums; }
.dim { color: var(--ink-2); }
.dim3 { color: var(--ink-3); }
html[dir="rtl"] .num, .ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 84px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0; z-index: 30; }
.rail .logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; text-decoration: none; }
.rail .logo img { width: 40px; height: 40px; border-radius: 11px; }
.rail a.nav { width: 68px; padding: 8px 0 6px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--rail-ink); text-decoration: none; font-size: 10.5px; font-family: var(--f-head); letter-spacing: .01em; position: relative; }
.rail a.nav:hover { background: var(--rail-hover); color: #D5D9D3; }
.rail a.nav.on { background: var(--rail-on); color: var(--gold); }
.rail a.nav svg { width: 21px; height: 21px; }
.rail a.nav .soon { position: absolute; inset-block-start: 5px; inset-inline-end: 9px; width: 5px; height: 5px; border-radius: 50%; background: #3A453D; }
.rail .grow { flex: 1; }
.rail .badge { position: absolute; inset-block-start: 3px; inset-inline-end: 10px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--gold-ink); font-size: 10px; display: grid; place-items: center; font-family: var(--f-head); font-weight: 600; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-block-end: 1px solid transparent; }
.topbar.scrolled { border-block-end-color: var(--line); }
.topbar-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 28px; }
.content { max-width: 1280px; width: 100%; margin: 0 auto; padding: 8px 28px 64px; display: flex; flex-direction: column; gap: 18px; }

.ws-btn { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 7px 10px 7px 8px; cursor: pointer; font-weight: 600; box-shadow: var(--shadow-1); white-space: nowrap; }
.ws-btn:hover { border-color: var(--line-2); }
.ws-dot { width: 20px; height: 20px; border-radius: 6px; flex: none; display: grid; place-items: center; font-size: 10px; font-family: var(--f-head); font-weight: 700; color: #0A0F0C; }
.ws-dot.all { background: conic-gradient(#E8B04A 0 20%, #3E8E9E 0 40%, #C2552F 0 60%, #7A5BB0 0 80%, #4A7BD0 0); }
.ask { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 8px 12px; color: var(--ink-3); cursor: pointer; text-align: start; box-shadow: var(--shadow-1); }
.ask:hover { border-color: var(--line-2); }
.ask span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask svg, .ws-btn svg { width: 16px; height: 16px; flex: none; }
.ws-btn svg { color: var(--ink-3); }
kbd { font-family: var(--f-body); font-size: 11px; border: 1px solid var(--line); border-block-end-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--ink-3); background: var(--soft); }
.tb-gap { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; font-weight: 500; }
.pill.practice { background: var(--warn-wash); color: var(--warn); }
.pill.live { background: var(--ok-wash); color: var(--ok); }
.pill .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); box-shadow: var(--shadow-1); flex: none; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-btn { font-family: var(--f-head); font-weight: 600; font-size: 13px; }
.kill { display: inline-flex; align-items: center; gap: 7px; background: var(--bad-wash); color: var(--bad); border: 1px solid transparent; border-radius: 11px; padding: 8px 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.kill:hover { border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.kill.on { background: var(--bad); color: #fff; }
.kill svg { width: 16px; height: 16px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: var(--f-head); font-weight: 600; flex: none; }

/* phone chrome */
.m-top, .tabbar { display: none; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block-start: 6px; }
.page-head h1 { font-size: 30px; letter-spacing: -.01em; }
.page-head .sub { color: var(--ink-2); margin-block-start: 4px; }
.fresh { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12px; }
.fresh button { border: 0; background: none; cursor: pointer; color: var(--ink-2); padding: 4px; border-radius: 6px; display: grid; place-items: center; }
.fresh button:hover { background: var(--soft); }
.fresh svg { width: 15px; height: 15px; }
.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.banner { display: flex; align-items: center; gap: 12px; border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; }
.banner svg { width: 18px; height: 18px; flex: none; }
.banner .grow { flex: 1; min-width: 0; }
.banner.practice { background: var(--warn-wash); color: var(--warn); }
.banner.practice b { color: var(--ink); font-weight: 600; }
.banner.paused { background: var(--bad); color: #fff; }
.banner.err { background: var(--bad-wash); color: var(--bad); }
.banner .btn { flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; white-space: nowrap; line-height: 1.4; }
.btn:hover { border-color: var(--line-2); background: var(--hover); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--gold)); }
.btn.gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--soft); color: var(--ink); }
.btn.sm { font-size: 12px; padding: 4px 9px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkish { border: 0; background: none; padding: 0; color: var(--gold-text); font-weight: 600; cursor: pointer; font-size: 13px; }
.linkish:hover { text-decoration: underline; }

/* ---------- cards ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: var(--shadow-1); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-h h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-h .count { font-family: var(--f-head); font-size: 12px; color: var(--ink-3); font-weight: 500; }
.card-h .hint { font-size: 12px; color: var(--ink-3); }
.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.g-2 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }

/* KPI tiles */
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; box-shadow: var(--shadow-1); text-align: start; }
.kpi .l { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kpi .l svg { width: 15px; height: 15px; opacity: .8; }
.kpi .v { font-family: var(--f-head); font-size: 34px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .v small { font-size: 16px; color: var(--ink-3); font-weight: 500; }
.kpi .s { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.kpi.hi { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); box-shadow: 0 8px 24px color-mix(in srgb, var(--gold) 35%, transparent); cursor: pointer; }
.kpi.hi .l, .kpi.hi .s { color: #4A3410; }
.kpi .bar { height: 4px; border-radius: 4px; background: var(--soft); overflow: hidden; margin-block: 6px 2px; }
.kpi .bar i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.kpi .bar i.warn { background: var(--warn); }

/* waiting items */
.items { display: flex; flex-direction: column; gap: 10px; }
.item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 13px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); transition: opacity .2s, transform .2s; }
.item:hover { border-color: var(--line-2); }
.item.leaving { opacity: 0; transform: translateX(8px); }
html[dir="rtl"] .item.leaving { transform: translateX(-8px); }
.item .t { font-weight: 600; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.item .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--ink-2); }
.item .meta .ws { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; color: var(--ink); }
.item .meta .ws i { width: 8px; height: 8px; border-radius: 3px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 1px 8px; border-radius: 6px; background: var(--soft); color: var(--ink-2); font-weight: 500; }
.chip.money, .chip.late { background: var(--bad-wash); color: var(--bad); }
.chip.held, .chip.deal { background: var(--warn-wash); color: var(--warn); }
.chip.content { background: var(--info-wash); color: var(--info); }
.chip.practice { background: var(--warn-wash); color: var(--warn); }
.acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acts .sp { flex: 1; }
.confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--bad-wash); border-radius: 9px; padding: 8px 10px; font-size: 13px; color: var(--bad); }
.confirm input { flex: 1; min-width: 140px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 7px; padding: 5px 8px; font: inherit; font-size: 12.5px; }
.menu { position: absolute; z-index: 60; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-3); padding: 6px; min-width: 190px; display: flex; flex-direction: column; }
.menu button { border: 0; background: none; text-align: start; padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.menu button:hover { background: var(--soft); }
.menu button small { color: var(--ink-3); }
.menu hr { border: 0; border-block-start: 1px solid var(--line); margin: 4px 2px; width: auto; }
.menu input[type=date] { margin: 4px 6px 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--paper); color: var(--ink); font: inherit; }
.more-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 0; }
.fold { border-block-start: 1px dashed var(--line); padding-block-start: 10px; display: flex; flex-direction: column; gap: 8px; }
.fold > button.fold-h { border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 500; text-align: start; }
.fold > button.fold-h svg { width: 14px; height: 14px; transition: transform .15s; }
.fold.open > button.fold-h svg { transform: rotate(90deg); }
html[dir="rtl"] .fold.open > button.fold-h svg { transform: rotate(-90deg); }
.mini-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 13px; }
.mini-item:hover { background: var(--hover); }
.mini-item .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item .age { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 10px; color: var(--ink-2); }
.empty .big { font-family: var(--f-head); font-size: 17px; color: var(--ink); }
.empty svg { width: 30px; height: 30px; color: var(--ok); }

/* systems */
.sys-list { display: flex; flex-direction: column; }
.sys { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 2px; border-block-end: 1px solid var(--line); }
.sys:last-child { border-block-end: 0; }
.sys .nm { display: flex; align-items: center; gap: 9px; font-weight: 600; min-width: 0; }
.sys .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys .st { font-size: 12px; color: var(--ink-2); margin-inline-start: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ink-3); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.dot.blocked, .dot.error { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.dot.off { background: var(--ink-3); }
.lock { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink-3); border-radius: 8px; }
.lock svg { width: 15px; height: 15px; }

.switch { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); border: 0; cursor: pointer; flex: none; padding: 0; transition: background .18s; }
.switch::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: inset-inline-start .18s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { inset-inline-start: 19px; }
.switch[disabled] { opacity: .45; cursor: not-allowed; }

/* night chart card */
.night { background: var(--night); color: var(--night-ink); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; border: 1px solid var(--night-line); min-width: 0; }
.night::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 120%; background: radial-gradient(closest-side, rgba(232, 176, 74, .14), transparent); pointer-events: none; }
.night .l { color: var(--night-dim); font-size: 12.5px; }
.night .v { font-family: var(--f-head); font-size: 38px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.night .v small { font-size: 13px; font-weight: 500; margin-inline-start: 8px; color: #7FD3A0; }
.night .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.night .legend { display: flex; gap: 14px; font-size: 12px; color: var(--night-dim); }
.night .legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-inline-end: 6px; vertical-align: middle; }
.night svg.chart { width: 100%; height: 150px; display: block; overflow: visible; }
.night .ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--night-dim); direction: ltr; }
.night .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-block-start: 1px solid var(--night-line); padding-block-start: 12px; }
.night .stats b { display: block; font-family: var(--f-head); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.night .stats span { font-size: 11.5px; color: var(--night-dim); }

/* companies */
.cos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.co { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; background: var(--paper); text-align: start; }
.co:hover { border-color: var(--line-2); background: var(--hover); }
.co .h { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.co .h .ws-dot { width: 22px; height: 22px; }
.co .n { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.co .lights { display: flex; gap: 4px; align-items: center; font-size: 11.5px; color: var(--ink-3); }
.co .lights .dot { width: 7px; height: 7px; box-shadow: none; }

/* feed + upcoming */
.feed { display: flex; flex-direction: column; max-height: 360px; overflow: auto; margin-inline: -4px; padding-inline: 4px; }
.feed .f { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-block-end: 1px solid var(--line); font-size: 13px; }
.feed .f:last-child { border-block-end: 0; }
.feed .f .ic { width: 26px; height: 26px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; color: var(--ink-2); }
.feed .f .ic svg { width: 14px; height: 14px; }
.feed .f .ic.bad { background: var(--bad-wash); color: var(--bad); }
.feed .f .ic.ok { background: var(--ok-wash); color: var(--ok); }
.feed .f .x { overflow-wrap: anywhere; line-height: 1.45; }
.feed .f .w { font-size: 11.5px; color: var(--ink-3); }
.up { display: flex; flex-direction: column; }
.up .u { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-block-end: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.up .u:last-child { border-block-end: 0; }
.up .u .when { font-family: var(--f-head); font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.up .u .what { min-width: 0; }
.up .u .what b { font-weight: 600; }
.up .u .what span { display: block; font-size: 11.5px; color: var(--ink-3); }
.brief-lines { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.brief-lines li { font-size: 13.5px; line-height: 1.6; padding-inline-start: 14px; position: relative; }
.brief-lines li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.brief-lines li.focus { background: var(--gold-wash); border-radius: 9px; padding: 8px 10px 8px 24px; }
html[dir="rtl"] .brief-lines li.focus { padding: 8px 24px 8px 10px; }
.brief-lines li.focus::before { inset-inline-start: 10px; inset-block-start: 1.15em; }

/* ---------- control centre ---------- */
.cc-sum { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-sum .pill { background: var(--paper); border-color: var(--line); color: var(--ink-2); }
.cc-sum .pill b { color: var(--ink); font-family: var(--f-head); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.ws-sec { display: flex; flex-direction: column; gap: 12px; }
.ws-sec > h2 { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.ws-sec > h2 .ws-dot { width: 24px; height: 24px; }
.ws-sec > h2 small { font-family: var(--f-body); font-weight: 400; font-size: 12.5px; color: var(--ink-3); }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 12px; }
.scard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-1); min-width: 0; }
.scard.is-blocked { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.scard.is-off { background: color-mix(in srgb, var(--paper) 70%, var(--soft)); }
.scard .top { display: flex; align-items: flex-start; gap: 10px; }
.scard .top .dot { margin-block-start: 7px; }
.scard .top .nm { flex: 1; min-width: 0; }
.scard .top h3 { font-size: 15px; }
.scard .top .who { font-size: 12px; color: var(--ink-3); }
.scard .desc { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.fact { background: var(--soft); border-radius: 9px; padding: 7px 10px; min-width: 0; }
.fact .k { font-size: 11px; color: var(--ink-3); }
.fact .v { font-size: 13px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.fact .v.ok { color: var(--ok); }
.fact .v.bad { color: var(--bad); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--paper); }
.stepper button { border: 0; background: none; width: 30px; height: 30px; cursor: pointer; font-size: 16px; color: var(--ink-2); }
.stepper button:hover { background: var(--soft); }
.stepper .val { min-width: 34px; text-align: center; font-family: var(--f-head); font-weight: 600; }
.limit-row, .queue-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.limit-row .grow, .queue-row .grow { flex: 1; min-width: 0; }
.note { font-size: 12.5px; color: var(--ink-2); background: var(--soft); border-radius: 9px; padding: 8px 10px; display: flex; gap: 8px; align-items: flex-start; }
.note svg { width: 15px; height: 15px; flex: none; margin-block-start: 2px; }
.note.bad { background: var(--bad-wash); color: var(--bad); }
.note.warn { background: var(--warn-wash); color: var(--warn); }
.log { display: flex; flex-direction: column; }
.log .r { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-block-end: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.log .r:last-child { border-block-end: 0; }
.log .r .w { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- drawer, palette, toast ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 80; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(560px, 100vw); background: var(--bg); z-index: 90; box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
html[dir="rtl"] .drawer { animation-name: slide-rtl; }
@keyframes slide-rtl { from { transform: translateX(-30px); opacity: 0; } }
.drawer-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-block-end: 1px solid var(--line); background: var(--paper); }
.drawer-h h2 { font-size: 18px; flex: 1; }
.drawer-b { flex: 1; overflow: auto; padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.q-group h3 { font-size: 13px; color: var(--ink-2); font-weight: 500; display: flex; justify-content: space-between; align-items: center; margin-block-end: 8px; }
.q-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); margin-block-end: 6px; }
.q-row .n { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.q-row .m { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.palette { position: fixed; inset-block-start: 12vh; inset-inline: 0; margin: 0 auto; width: min(620px, calc(100vw - 32px)); background: var(--paper); border-radius: 16px; z-index: 95; box-shadow: var(--shadow-3); overflow: hidden; border: 1px solid var(--line); }
.palette input { width: 100%; border: 0; border-block-end: 1px solid var(--line); padding: 16px 18px; font: inherit; font-size: 16px; background: transparent; color: var(--ink); outline: none; }
.palette .res { max-height: 50vh; overflow: auto; padding: 6px; }
.palette .res button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 10px 12px; border-radius: 9px; cursor: pointer; text-align: start; font-size: 14px; }
.palette .res button.on, .palette .res button:hover { background: var(--soft); }
.palette .res button svg { width: 17px; height: 17px; color: var(--ink-3); }
.palette .res button small { margin-inline-start: auto; color: var(--ink-3); font-size: 12px; }
.toasts { position: fixed; inset-block-end: 22px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
html[dir="rtl"] .toasts { transform: translateX(50%); }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 10px 12px 10px 16px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-3); font-size: 13.5px; max-width: min(560px, calc(100vw - 32px)); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
.toast.err { background: var(--bad); color: #fff; }
.toast button { border: 0; background: color-mix(in srgb, var(--bg) 16%, transparent); color: inherit; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.toast .tag { font-size: 11px; padding: 1px 7px; border-radius: 5px; background: var(--warn); color: #1d1404; font-weight: 600; }

/* soon + settings */
.soon-hero { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; box-shadow: var(--shadow-1); }
.soon-hero .ic { width: 64px; height: 64px; border-radius: 18px; background: var(--night); color: var(--gold); display: grid; place-items: center; }
.soon-hero .ic svg { width: 30px; height: 30px; }
.soon-hero h2 { font-size: 24px; }
.soon-hero p { color: var(--ink-2); margin-block-start: 6px; max-width: 62ch; }
.step-tag { display: inline-block; font-family: var(--f-head); font-size: 12px; padding: 3px 9px; border-radius: 7px; background: var(--gold-wash); color: var(--gold-text); font-weight: 600; margin-block-end: 8px; }
.list-plain { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.set { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-block-end: 1px solid var(--line); }
.set:last-child { border-block-end: 0; }
.set h3 { font-size: 14px; }
.set p { font-size: 13px; color: var(--ink-2); margin-block-start: 2px; }
.set input[type=text] { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; background: var(--paper); color: var(--ink); width: 110px; }

/* ---------- fonts: titles and numbers stay Alexandria; body type is Bade's pick ---------- */
html[data-font="readex"] { --f-body: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif; }
html[data-font="almarai"] { --f-body: "Inter", "Almarai", "IBM Plex Sans Arabic", system-ui, sans-serif; }
html[data-font="alexandria"] { --f-body: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif; }
html[data-font="alexandria"] body { font-weight: 300; }
html[data-font="alexandria"] b, html[data-font="alexandria"] strong { font-weight: 600; }
html[lang="ar"] body { font-size: 15px; line-height: 1.7; }
html[lang="ar"] .item .t { font-size: 15px; }
body { text-rendering: optimizeLegibility; font-feature-settings: "kern" 1; }
.fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; margin-block-start: 12px; }
.fontcard { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--paper); cursor: pointer; text-align: start; display: flex; flex-direction: column; gap: 6px; }
.fontcard:hover { border-color: var(--line-2); }
.fontcard.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
.fontcard .fn { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-head); font-weight: 600; font-size: 13px; }
.fontcard .fn small { font-family: var(--f-body); font-weight: 500; font-size: 11px; color: var(--gold-text); }
.fontcard .ar-s { font-size: 16px; line-height: 1.6; direction: rtl; }
.fontcard .en-s { font-size: 14px; line-height: 1.5; direction: ltr; color: var(--ink-2); }

/* ---------- connected platforms ---------- */
.ptile { --s: 30px; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .28); display: inline-grid; place-items: center; color: #fff; flex: none; position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.ptile b { font-family: var(--f-head); font-weight: 700; font-size: calc(var(--s) * .36); letter-spacing: -.02em; line-height: 1; direction: ltr; }
.ptile > i { position: absolute; inset-block-end: -3px; inset-inline-end: -3px; width: calc(var(--s) * .36); height: calc(var(--s) * .36); min-width: 9px; min-height: 9px; border-radius: 50%; border: 2px solid var(--paper); background: var(--ink-3); }
.ptile.connected > i { background: var(--ok); }
.ptile.problem > i { background: var(--bad); }
.ptile.account > i { background: var(--warn); }
.ptile.missing { opacity: .35; filter: grayscale(1); }
.ptiles { display: flex; flex-wrap: wrap; gap: 8px; }
.pstrip { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.pmore { font-size: 11px; color: var(--ink-3); font-family: var(--f-head); }
.cbar { display: flex; flex-wrap: wrap; gap: 6px; }
.cpill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--ink-2); white-space: nowrap; font-weight: 500; }
.cpill i, .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); display: inline-block; flex: none; }
.cpill.connected { background: var(--ok-wash); color: var(--ok); } .cpill.connected i, .sdot.connected { background: var(--ok); }
.cpill.problem { background: var(--bad-wash); color: var(--bad); } .cpill.problem i, .sdot.problem { background: var(--bad); }
.cpill.account { background: var(--warn-wash); color: var(--warn); } .cpill.account i, .sdot.account { background: var(--warn); }
.cpill.missing { background: var(--soft); color: var(--ink-3); }
.co-card { cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.co-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.co-card .go { width: 18px; height: 18px; color: var(--ink-3); }
html[dir="rtl"] .co-card .go { transform: scaleX(-1); }
.pgroup { display: flex; flex-direction: column; gap: 8px; }
.pgroup h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 500; margin-block-start: 6px; }
html[lang="ar"] .pgroup h3 { letter-spacing: 0; font-size: 13px; }
.prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
.prow.problem { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.prow.missing { background: color-mix(in srgb, var(--paper) 60%, var(--soft)); }
.prow.missing .ptile { opacity: .45; filter: grayscale(1); }
.pmain { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pname { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.pname a, .pname .ltr { font-size: 12.5px; color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.pname a:hover { color: var(--gold-text); text-decoration: underline; }
.pnote { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.pmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--ink-3); }
.pmeta > span { display: inline-flex; align-items: center; gap: 4px; }
.pmeta svg { width: 12px; height: 12px; }
@media (max-width: 899px) {
  .prow { grid-template-columns: auto minmax(0, 1fr); }
  .prow > .cpill { grid-column: 2; justify-self: start; }
}

/* ---------- faces, sparklines, rings, health ---------- */
.face { --s: 22px; --c: #8A8F8A; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 22%, var(--paper)); color: color-mix(in srgb, var(--c) 70%, var(--ink)); font-family: var(--f-head); font-weight: 600; font-size: calc(var(--s) * .46); box-shadow: 0 0 0 2px var(--paper); overflow: hidden; line-height: 1; }
.face.person { background: var(--c); color: #fff; }
.face.claude { background: #F6E4DB; color: #B5522F; }
:root[data-theme="dark"] .face.claude { background: #3A2219; color: #F0A080; }
.face.claude svg { width: 62%; height: 62%; }
.face.hq { background: var(--night); }
.face.hq img { width: 100%; height: 100%; }
.face.more { background: var(--soft); color: var(--ink-2); font-size: calc(var(--s) * .4); }
.faces { display: inline-flex; align-items: center; }
.faces .face + .face { margin-inline-start: calc(var(--s) * -.3); }
.item .meta .who { display: inline-flex; align-items: center; gap: 6px; }
.sys-r { display: inline-flex; align-items: center; gap: 10px; }
.scard .top .who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.more-txt { border: 0; background: none; padding: 0; color: var(--ink-3); font-size: 12px; cursor: pointer; align-self: flex-start; margin-block-start: -4px; }
.more-txt:hover { color: var(--gold-text); text-decoration: underline; }
.item .full { font-size: 13px; color: var(--ink-2); background: var(--soft); border-radius: 8px; padding: 8px 10px; line-height: 1.55; overflow-wrap: anywhere; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.kv .spark { flex: none; direction: ltr; }
.kpi .ring b { font-size: 11px; }
.spark { display: block; overflow: visible; }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; }
.ring b { position: relative; font-family: var(--f-head); font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1; }
.ring small { position: relative; display: block; font-size: 11px; color: var(--ink-3); margin-block-start: 30px; position: absolute; }
.health { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.health > .ring b { font-size: 30px; }
.health > .ring small { margin-block-start: 52px; }
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 18px; }
.area { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.area-h { display: flex; justify-content: space-between; align-items: baseline; }
.area-h b { font-size: 13.5px; }
.area-h .num { font-weight: 600; }
.abar { height: 6px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.abar i { display: block; height: 100%; border-radius: 6px; }
.area-p { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.co .h { width: 100%; }
@media (max-width: 899px) {
  .health { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .areas { width: 100%; }
  .kv .spark { width: 72px; }
}

/* ---------- audits ---------- */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.rcard { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 6px; background: #F4EFE6; color: #121712; }
:root[data-theme="dark"] .rcard { background: var(--soft); color: var(--ink); }
.rcard h3 { font-size: 16px; line-height: 1.4; }
.rcard .acts { margin-block-start: 6px; }
.rtop { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.rx { margin-inline-start: auto; border: 0; background: none; color: #8a8f8a; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.rx:hover { background: rgba(180, 65, 47, .1); color: var(--bad); }
.rx svg { width: 14px; height: 14px; }
.rtop { gap: 8px; }
.rlang { font-family: var(--f-head); font-weight: 700; font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #8A5A12; color: #fff; }
.aform { display: flex; flex-direction: column; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.fld > span { font-weight: 600; }
.fld input, .fld textarea { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; background: var(--paper); color: var(--ink); width: 100%; }
.fgroup { display: flex; flex-direction: column; gap: 8px; background: var(--soft); border-radius: 12px; padding: 12px; }
.fgroup > b { font-size: 13.5px; }
.fld input:focus, .fld textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }

/* ---------- sales board ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-block-end: 10px; align-items: flex-start; scroll-snap-type: x proximity; }
.col { flex: 0 0 272px; background: var(--soft); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 230px); scroll-snap-align: start; border: 2px solid transparent; }
.col.over { border-color: var(--gold); background: var(--gold-wash); }
.col > header { display: flex; align-items: center; gap: 8px; padding: 4px 6px; }
.col > header i { width: 8px; height: 8px; border-radius: 50%; }
.col > header b { font-family: var(--f-head); font-weight: 600; font-size: 13.5px; flex: 1; }
.col > header .count { font-family: var(--f-head); font-size: 12px; color: var(--ink-3); }
.col .drop { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 2px; }
.col.closed { flex-basis: 200px; }
.closed-row { display: flex; justify-content: space-between; padding: 8px 10px; background: var(--paper); border-radius: 9px; font-size: 13px; }
.empty-col { font-size: 12.5px; padding: 10px 6px; }
.deal { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; display: flex; flex-direction: column; gap: 6px; cursor: grab; box-shadow: var(--shadow-1); transition: transform .12s, box-shadow .12s; }
.deal:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.deal.dragging { opacity: .5; }
.deal.late { border-inline-start: 3px solid var(--bad); }
.dtop { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.dtop b { font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.dnext { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dmeta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 11.5px; color: var(--ink-2); }
.dmeta > span { display: inline-flex; align-items: center; gap: 3px; }
.dmeta svg { width: 13px; height: 13px; }
.dch svg { width: 15px; height: 15px; }
.dlate { color: var(--bad); font-weight: 600; }
.dhead h3 { font-size: 20px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fld select { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; background: var(--paper); color: var(--ink); width: 100%; }
.nnote { background: var(--gold-wash); border-radius: 9px; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.nnote small { color: var(--ink-3); font-size: 11.5px; }
.tl { display: flex; flex-direction: column; }
.tl-r { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding: 7px 0; font-size: 13px; border-block-end: 1px solid var(--line); }
.tl-r:last-child { border-block-end: 0; }
.tl-r .tl-d { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); margin-block-start: 6px; }
.tl-r .tl-d.in { background: var(--ok); }
.tl-r small { color: var(--ink-3); font-size: 11.5px; }
.tl-r .dim { font-size: 12.5px; overflow-wrap: anywhere; }

/* ---------- inbox ---------- */
.ibox { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 14px; height: calc(100vh - 200px); min-height: 480px; }
.ilist, .ithread { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: var(--shadow-1); }
.itools { padding: 10px; display: flex; flex-direction: column; gap: 8px; border-block-end: 1px solid var(--line); }
.itools input { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font: inherit; background: var(--bg); color: var(--ink); }
.itools .seg button { padding: 4px 8px; font-size: 12px; }
.convs { overflow-y: auto; flex: 1; }
.conv { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 10px 12px; text-decoration: none; border-block-end: 1px solid var(--line); }
.conv:hover { background: var(--hover); }
.conv.on { background: var(--gold-wash); }
.conv.unread b { font-weight: 700; }
.cav { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.cav svg { width: 17px; height: 17px; }
.cmain { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ctop { display: flex; justify-content: space-between; gap: 8px; }
.ctop b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctop small { color: var(--ink-3); font-size: 11px; white-space: nowrap; }
.cprev { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmeta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11px; }
.thead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-block-end: 1px solid var(--line); }
.thead select { border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; font: inherit; font-size: 12.5px; background: var(--paper); color: var(--ink); }
.thead .back { display: none; }
html[dir="rtl"] .thead .back svg { transform: none; }
html[dir="ltr"] .thead .back svg { transform: scaleX(-1); }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { display: flex; flex-direction: column; gap: 3px; max-width: 78%; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg .bub { padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.in .bub { background: var(--paper); border: 1px solid var(--line); border-start-start-radius: 4px; }
.msg.out .bub { background: #DDF3E4; color: #12301C; border-start-end-radius: 4px; }
:root[data-theme="dark"] .msg.out .bub { background: #173A25; color: #E2F5E8; }
.msg small { font-size: 11px; color: var(--ink-3); }
.tnotes { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; border-block-start: 1px solid var(--line); max-height: 140px; overflow-y: auto; }
.reply { padding: 10px 14px; border-block-start: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.reply textarea { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; resize: vertical; background: var(--bg); color: var(--ink); }
@media (max-width: 899px) {
  .ibox { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ibox .ithread { display: none; }
  .ibox.has-thread .ilist { display: none; }
  .ibox.has-thread .ithread { display: flex; height: calc(100vh - 210px); }
  .m-hide { display: none !important; }
  .thead .back { display: grid; }
  .col { flex-basis: 82vw; max-height: none; }
  .frow { grid-template-columns: 1fr; }
}

/* ---------- content calendar ---------- */
.clegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.clegend span { display: inline-flex; align-items: center; gap: 5px; }
.clegend i { width: 9px; height: 9px; border-radius: 3px; }
.clegend svg { width: 13px; height: 13px; }
.cal { display: flex; flex-direction: column; gap: 6px; }
.cdow, .cgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cdow span { font-size: 11.5px; color: var(--ink-3); text-align: center; font-family: var(--f-head); }
.cday { min-height: 108px; background: var(--soft); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cday.empty { background: transparent; }
.cday.past { opacity: .6; }
.cday.today { background: var(--gold-wash); box-shadow: inset 0 0 0 2px var(--gold); opacity: 1; }
.cday .dn { font-family: var(--f-head); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cchip { display: flex; align-items: center; gap: 4px; border: 0; border-inline-start: 3px solid var(--c); background: var(--paper); border-radius: 6px; padding: 3px 5px; font-size: 11px; text-align: start; cursor: pointer; min-width: 0; color: var(--ink); }
.cchip:hover { box-shadow: var(--shadow-1); }
.cchip svg { width: 11px; height: 11px; flex: none; color: var(--ink-3); }
.cchip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmore { border: 0; background: none; color: var(--gold-text); font-size: 11px; font-weight: 600; cursor: pointer; text-align: start; padding: 0 4px; }
.agenda { display: none; flex-direction: column; gap: 12px; }
.aday h4 { font-size: 13px; color: var(--ink-2); margin-block-end: 6px; }
.arow { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 9px 10px; margin-block-end: 6px; cursor: pointer; text-align: start; font-size: 13px; color: var(--ink); }
.arow i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.arow svg { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
.arow span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow small { color: var(--ink-3); font-size: 11.5px; }
.chip.ok { background: var(--ok-wash); color: var(--ok); }
.chip.soft { background: var(--soft); color: var(--ink-2); }
.seg-sel { border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--ink-2); padding: 5px 8px; border-radius: 8px; cursor: pointer; }
@media (max-width: 899px) {
  .cal { display: none; }
  .agenda { display: flex; }
}

/* skeleton */
.sk { background: linear-gradient(90deg, var(--soft), var(--hover), var(--soft)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- phone ---------- */
@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail, .topbar { display: none; }
  .m-top { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
  .m-row { display: flex; align-items: center; gap: 10px; }
  .m-row .logo img { width: 32px; height: 32px; border-radius: 9px; display: block; }
  .m-row .ttl { flex: 1; font-family: var(--f-head); font-weight: 600; font-size: 16px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-row .icon-btn { width: 34px; height: 34px; }
  .chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .chips button i { width: 8px; height: 8px; border-radius: 3px; }
  .chips button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .content { padding: 4px max(16px, env(safe-area-inset-right, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); gap: 14px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-block-start: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--ink-3); text-decoration: none; padding: 4px 0; border: 0; background: none; cursor: pointer; font-family: var(--f-head); position: relative; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .on { color: var(--gold-text); }
  .tabbar .badge { position: absolute; inset-block-start: 0; inset-inline-start: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--gold); color: var(--gold-ink); font-size: 10px; display: grid; place-items: center; padding: 0 4px; font-weight: 600; }
  .page-head h1 { font-size: 24px; }
  .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g-main, .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .kpi { padding: 12px 13px; }
  .kpi .v { font-size: 28px; }
  .card { padding: 14px; border-radius: 14px; }
  .drawer { inset-block-start: auto; inset-inline: 0; width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0; animation-name: rise; }
  html[dir="rtl"] .drawer { animation-name: rise; }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
  .drawer-b { padding-block-end: calc(30px + env(safe-area-inset-bottom, 0px)); }
  .soon-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .set { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .log .r { grid-template-columns: minmax(0, 1fr) auto; }
  .log .r .w { grid-column: 1 / -1; }
  .toasts { inset-block-end: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .night svg.chart { height: 120px; }
}
@media (min-width: 900px) and (max-width: 1180px) {
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ask kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Social (Metricool-style centre, 29 Nov) ---------- */
.s-head .acts { gap: 10px; }
.s-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.s-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.s-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.s-tabs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.s-setup-in { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 18px; align-items: start; }
.s-setup h2 { font-size: 17px; margin: 0 0 4px; }
.s-setup p { margin: 0; font-size: 13px; }
.s-steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.s-steps li { counter-increment: st; background: var(--soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.s-steps li::before { content: counter(st); width: 24px; height: 24px; border-radius: 8px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-family: var(--f-head); font-weight: 600; font-size: 13px; }
.s-steps b { color: var(--ink); font-size: 13.5px; }
.s-connect { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.s-connect > div:first-child { display: flex; gap: 6px; }
.s-connect h2 { font-size: 16px; margin: 0; }
.s-connect p { margin: 2px 0 0; font-size: 13px; }
.s-connect .grow { flex: 1; min-width: 200px; }
.s-status { gap: 10px; }
.s-st-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.s-st-row .sp { flex: 1; }
.s-st-row .chip svg { width: 12px; height: 12px; }
.s-pages { min-width: 0; overflow-wrap: anywhere; }
.s-posting { background: var(--warn-wash); color: var(--warn); border-radius: 10px; padding: 8px 10px; }
.s-posting.on { background: var(--ok-wash); color: var(--ok); }
.s-posting b { font-weight: 600; }
.s-posting .confirm { flex-basis: 100%; }
.s-errs { font-size: 12.5px; color: var(--ink-2); }
.s-errs summary { cursor: pointer; color: var(--warn); font-weight: 600; }
.s-errs div { padding: 4px 0; overflow-wrap: anywhere; }
.pf { flex: none; vertical-align: -3px; }

.s-biz { gap: 12px; position: relative; overflow: hidden; }
.s-biz-h { display: flex; align-items: center; gap: 10px; }
.s-biz-h h3 { margin: 0; font-size: 16px; font-family: var(--f-head); }
.s-biz-h .sp { flex: 1; }
.s-bar { width: 10px; height: 28px; border-radius: 4px; background: var(--c); }
.s-plats { display: flex; gap: 6px; flex-wrap: wrap; }
.s-plats span { display: inline-flex; align-items: center; gap: 5px; background: var(--soft); border-radius: 8px; padding: 3px 8px; font-size: 12px; }
.s-plats b { font-family: var(--f-head); font-weight: 600; font-variant-numeric: tabular-nums; }
.s-biz-k { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.s-biz-k div { display: flex; flex-direction: column; min-width: 0; }
.s-biz-k small { font-size: 11.5px; color: var(--ink-3); }
.s-biz-k b { font-family: var(--f-head); font-size: 22px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.s-biz-k em { font-style: normal; font-size: 12px; font-weight: 600; }
.s-biz-k em.up { color: var(--ok); } .s-biz-k em.down { color: var(--bad); }
.s-biz-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; border-block-start: 1px solid var(--line); padding-block-start: 10px; }
.s-biz-empty { font-size: 13px; padding: 14px 0 6px; }

.s-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.s-chart text { font-size: 11px; fill: var(--ink-3); font-family: var(--f-body); }
.s-chart .g { stroke: var(--line); stroke-width: 1; }
.s-nochart { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; background: var(--soft); border-radius: 10px; padding: 26px 14px; justify-content: center; text-align: center; }
.s-nochart svg { width: 20px; height: 20px; flex: none; }
.s-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-2); }
.s-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }

.s-table-wrap { overflow-x: auto; margin-inline: -4px; }
.s-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.s-table th { text-align: start; font-size: 11.5px; color: var(--ink-3); font-weight: 500; padding: 6px 8px; border-block-end: 1px solid var(--line); white-space: nowrap; }
.s-table td { padding: 8px; border-block-end: 1px solid var(--line); white-space: nowrap; }
.s-table tr:last-child td { border-block-end: 0; }
.s-acc { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; max-width: 340px; }
.s-acc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-acc:hover span { text-decoration: underline; }
.s-ptable img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; flex: none; }
.s-ptable td:first-child small { display: block; margin-inline-start: 24px; }

.s-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.s-post { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--ink); text-decoration: none; background: var(--paper); transition: box-shadow .15s, transform .15s; }
.s-post:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.s-thumb { aspect-ratio: 4 / 5; background: var(--soft); position: relative; display: grid; place-items: center; overflow: hidden; }
.s-thumb img { width: 100%; height: 100%; object-fit: cover; }
.s-thumb > span { padding: 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.s-thumb i { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; background: var(--paper); border-radius: 7px; width: 24px; height: 24px; display: grid; place-items: center; }
.s-thumb em { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.s-thumb em svg { width: 18px; height: 18px; fill: #fff; }
.s-post-b { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 4px; }
.s-post-t { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-post-n { display: flex; flex-wrap: wrap; gap: 4px 9px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.s-post-d { font-size: 11.5px; }

.s-heat { display: grid; grid-template-columns: auto repeat(7, minmax(0, 1fr)); gap: 4px; font-size: 11px; align-items: center; }
.s-heat .h { text-align: center; color: var(--ink-3); }
.s-heat .r { color: var(--ink-3); padding-inline-end: 6px; white-space: nowrap; }
.s-heat .c { height: 26px; border-radius: 6px; background: color-mix(in srgb, var(--gold) calc(var(--a) * 100%), var(--soft)); }
.s-heat .c.best { box-shadow: inset 0 0 0 2px var(--ink); }

.s-row { cursor: pointer; }
.s-row-in { display: flex; align-items: center; gap: 12px; }
.s-row-in img, .s-row-in video, .s-row-txt { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; background: var(--soft); flex: none; display: grid; place-items: center; color: var(--ink-3); }
.s-row-in .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.s-row-in .go { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
[dir="rtl"] .s-row-in .go, [dir="rtl"] .s-biz-h .go { transform: scaleX(-1); }

.s-vs { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.s-vs > div:not(.s-vs-bar) { display: flex; flex-direction: column; }
.s-vs b { font-family: var(--f-head); font-size: 18px; }
.s-vs small { color: var(--ink-3); }
.s-vs-bar { flex: 1; height: 10px; border-radius: 6px; background: var(--gold); overflow: hidden; }
.s-vs-bar i { display: block; height: 100%; background: var(--ink); }
.s-sub { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-block-start: 4px; }

/* composer */
.drawer.wide { width: min(1000px, 100vw); }
.s-comp { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.s-comp-l { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.s-comp-r { position: sticky; inset-block-start: 0; }
.s-targets { display: flex; flex-wrap: wrap; gap: 8px; }
.s-tg { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; cursor: pointer; font-weight: 500; background: var(--paper); font-size: 13px; }
.s-tg input { margin: 0; accent-color: var(--ink); }
.s-tg.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.s-tg.off { opacity: .45; cursor: default; }
.s-tg.off small { font-size: 10.5px; background: var(--soft); border-radius: 5px; padding: 0 5px; }
.s-drop { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer; color: var(--ink-2); background: var(--paper); }
.s-drop svg { width: 26px; height: 26px; color: var(--ink-3); }
.s-drop b { color: var(--ink); font-size: 13.5px; }
.s-drop small { font-size: 12px; font-weight: 400; }
.s-drop.over, .s-drop:hover { border-color: var(--gold); background: var(--gold-wash); }
.s-media { display: flex; flex-wrap: wrap; gap: 8px; }
.s-media:empty { display: none; }
.s-m { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; position: relative; background: var(--soft); }
.s-m img, .s-m video { width: 100%; height: 100%; object-fit: cover; }
.s-m button { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.s-m button svg { width: 12px; height: 12px; }
.s-m.up { display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.s-m.up i { position: absolute; inset-inline-start: 0; inset-block-end: 0; height: 4px; background: var(--gold); }
.s-media.big { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.s-media.big img, .s-media.big video { width: 100%; border-radius: 10px; max-height: 360px; object-fit: contain; background: var(--soft); }
.s-confirm { display: flex; flex-direction: column; gap: 10px; background: var(--gold-wash); border-radius: 12px; padding: 12px; width: 100%; }
.s-confirm b { font-size: 14px; }
.s-phone { border: 1px solid var(--line); border-radius: 22px; background: var(--paper); overflow: hidden; box-shadow: var(--shadow-2); font-size: 12.5px; }
.s-ph-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.s-ph-top b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-av { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.s-ph-media { aspect-ratio: 4 / 5; background: var(--soft); display: grid; place-items: center; color: var(--ink-3); position: relative; }
.s-ph-media img, .s-ph-media video { width: 100%; height: 100%; object-fit: cover; }
.s-ph-media em { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; background: rgba(0,0,0,.6); color: #fff; font-style: normal; font-size: 11px; border-radius: 10px; padding: 1px 7px; }
.s-ph-icons { display: flex; gap: 12px; padding: 8px 12px 2px; font-size: 16px; }
.s-ph-icons .sp { flex: 1; }
.s-ph-cap { padding: 4px 12px 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.s-ph-cap.fb { padding: 0 12px 10px; }
.s-acc-list { display: flex; flex-direction: column; gap: 8px; }
.s-acc-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--paper); }
.s-acc-row svg { width: 18px; height: 18px; flex: none; }
.s-acc-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.s-acc-row select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12.5px; background: var(--paper); color: var(--ink); }

@media (max-width: 1100px) { .s-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .s-comp { grid-template-columns: 1fr; } .s-comp-r { position: static; max-width: 320px; } }
@media (max-width: 899px) {
  .s-two, .s-setup-in, .s-steps { grid-template-columns: 1fr; }
  .s-cards { grid-template-columns: 1fr; }
  .s-head .acts { width: 100%; justify-content: space-between; }
  .s-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.s-acc-x { width: 30px; height: 30px; flex: none; }
.s-acc-x svg { width: 14px; height: 14px; }
.s-acc-x:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.s-acc-row.off { opacity: .7; }
.s-gone summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
.s-gone .s-acc-list { margin-block: 8px; }
.s-gone p { font-size: 12px; margin: 4px 0 0; }
.ad-alerts { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.ad-alerts h2 svg { width: 17px; height: 17px; color: var(--warn); }
.ad-alerts .mini-item { align-items: flex-start; }
.ad-alerts .mini-item .t { flex: 1; line-height: 1.5; }
.ad-alerts .dot { width: 9px; height: 9px; border-radius: 3px; margin-block-start: 6px; flex: none; }
.ad-table td.ok { color: var(--ok); font-weight: 600; }
.ad-acc .s-bar { display: inline-block; vertical-align: -4px; margin-inline-end: 4px; }
.s-chart svg { max-height: 210px; }
.rp-hl { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.rp-table td.n { font-variant-numeric: tabular-nums; font-weight: 600; }
.rp-table td.dim3 { font-weight: 500; }
.rp-ch.up { color: var(--ok); } .rp-ch.down { color: var(--bad); }
.rp-g td { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; padding-block-start: 14px; }
.rp-best { display: flex; gap: 12px; align-items: center; background: var(--soft); border-radius: 12px; padding: 10px; }
.rp-best img { width: 54px; height: 66px; object-fit: cover; border-radius: 8px; flex: none; }
.rp-best > div { flex: 1; min-width: 0; font-size: 13px; }
.rp-best p { margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-made .mini-item svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.rp-made .mini-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-steps { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.g-script { width: 100%; min-height: 220px; font: 12px/1.45 Consolas, monospace; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--soft); color: var(--ink); resize: vertical; }
.g-num { width: 90px; border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; font: inherit; background: var(--paper); color: var(--ink); }
.gp-group textarea { font-size: 13px; }
.gp-group textarea.over, textarea.over { outline: 2px solid var(--bad); }
.g-ad { display: flex; flex-direction: column; gap: 2px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.g-ad small { color: var(--ink-2); font-size: 11.5px; }
.g-ad b { color: #1a0dab; font-size: 15px; font-weight: 500; }
[data-theme="dark"] .g-ad b { color: #8ab4f8; }
.g-ad span { color: var(--ink-2); }
.card-h h2 > svg { width: 18px; height: 18px; flex: none; }
.sm-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.sm-list { max-height: 72vh; overflow: auto; gap: 4px; }
.sm-chat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; border: 0; background: none; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--ink); font: inherit; width: 100%; }
.sm-chat .t { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sm-chat small { font-size: 11.5px; color: var(--ink-3); }
.sm-chat:hover { background: var(--hover); } .sm-chat.on { background: var(--gold-wash); }
.sm-main { min-height: 60vh; }
.sm-msgs { flex: 1; min-height: 320px; max-height: 58vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px; }
.sm-msg { display: flex; gap: 8px; align-items: flex-start; }
.sm-msg.me { justify-content: flex-end; }
.sm-av { width: 28px; height: 28px; border-radius: 50%; background: var(--night, #0A0F0C); color: var(--gold); display: grid; place-items: center; flex: none; }
.sm-av svg { width: 16px; height: 16px; }
.sm-bub { max-width: 78%; background: var(--soft); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
.sm-msg.me .sm-bub { background: var(--ink); color: var(--bg); }
.sm-bub p { margin: 0 0 6px; } .sm-bub ul { margin: 0 0 6px; padding-inline-start: 18px; } .sm-bub code { background: var(--paper); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.sm-bub .md-h { display: block; margin: 6px 0 4px; }
.sm-bub small { display: block; font-size: 11px; opacity: .6; margin-top: 4px; }
.sm-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .sm-files span { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; background: var(--paper); border-radius: 6px; padding: 2px 6px; } .sm-files svg { width: 13px; height: 13px; }
.sm-empty { margin: auto; text-align: center; color: var(--ink-2); max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13.5px; }
.sm-empty svg { width: 34px; height: 34px; color: var(--gold); }
.sm-working { display: flex; align-items: center; gap: 10px; background: var(--gold-wash); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.sm-working svg { width: 16px; height: 16px; flex: none; animation: sk 1.2s infinite; }
.sm-working span { flex: 1; min-width: 0; }
.sm-send { display: flex; gap: 8px; align-items: flex-end; }
.sm-send textarea { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: var(--paper); color: var(--ink); resize: vertical; min-height: 46px; }
.sm-foot { font-size: 12px; }
.sm-ctx { align-items: center; } .sm-ctx span { flex: 1; }
.ask-sami svg { width: 14px; height: 14px; color: var(--gold-text); }
@media (max-width: 899px) { .sm-wrap { grid-template-columns: 1fr; } .sm-list { max-height: 200px; } .sm-bub { max-width: 92%; } }
.gw-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gw-tier { background: var(--soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.gw-tier.off { opacity: .65; }
.gw-tier p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.gw-h { display: flex; align-items: center; gap: 8px; } .gw-h svg { width: 16px; height: 16px; color: var(--gold-text); } .gw-h .chip { margin-inline-start: auto; }
.sm-mode { align-self: flex-start; }
.sm-quick { background: var(--info-wash); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.sm-quick-h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; } .sm-quick-h svg { width: 15px; height: 15px; } .sm-quick-h .dim3 { flex: 1; }
.sm-quick p { margin: 0 0 6px; }
@media (max-width: 899px) { .gw-tiers { grid-template-columns: 1fr; } }
.pt-sws { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pt-sw { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-radius: 10px; padding: 10px; cursor: pointer; }
.pt-sw input { margin-top: 3px; accent-color: var(--ink); }
.pt-sw span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; } .pt-sw small { color: var(--ink-3); font-size: 12px; }
.pt-add { display: flex; gap: 8px; } .pt-add input { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font: inherit; background: var(--paper); color: var(--ink); }
.pt-mail { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
@media (max-width: 899px) { .pt-sws { grid-template-columns: 1fr; } }
.br-card { gap: 14px; }
.br-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
.br-form { display: flex; flex-direction: column; gap: 12px; }
.br-form input[type=color] { height: 40px; padding: 3px; cursor: pointer; }
.br-logo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .br-logo img { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: var(--soft); padding: 4px; }
.br-prev { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.br-mock { width: 240px; height: 150px; border-radius: 14px; overflow: hidden; display: flex; border: 1px solid var(--line); background: var(--bg); }
.br-mrail { width: 46px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; }
.br-mrail img { width: 26px; height: 26px; border-radius: 7px; object-fit: contain; }
.br-mrail i { width: 22px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25); }
.br-mmain { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.br-mmain b { font-family: var(--f-head); font-size: 15px; }
.br-mbtn { border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: #17120a; }
.br-mline { height: 8px; width: 100%; border-radius: 4px; background: var(--soft); } .br-mline.s { width: 60%; }
.br-mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1000px) { .br-grid { grid-template-columns: 1fr; } .br-mods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .br-mods { grid-template-columns: 1fr; } }
.br-mods .pt-sw input, .pt-sw input[type=checkbox] { width: auto; flex: none; padding: 0; border: 0; }

/* Find leads (29 Nov 2026) */
.lf-search { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; cursor: pointer; }
.lf-search:last-child { border-bottom: 0; }
.lf-search:hover { background: var(--paper-2, rgba(0,0,0,.03)); }
.lf-search .grow, .lf-row .grow { flex: 1; }
.lf-search svg { width: 16px; height: 16px; opacity: .5; }
[dir=rtl] .lf-search > svg:last-child { transform: scaleX(-1); }
.lf-job { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card, var(--paper)); }
.lf-job.run { border-color: var(--gold); }
.lf-job.ok { border-color: var(--ok); }
.lf-job.ok > svg { width: 20px; height: 20px; color: var(--ok); flex: none; }
.lf-job .spin { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); display: inline-block; }
.lf-owner { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.lf-owner select { width: auto; }
.lf-list { display: flex; flex-direction: column; }
.lf-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.lf-row.taken { opacity: .6; }
.lf-row .lf-c { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; margin-top: 4px; }
.lf-row .lf-c a { color: var(--info); text-decoration: none; }
.lf-row .btn, .lf-row .chip { flex: none; }
.lf-srow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.lf-srow .icon-btn { width: 30px; height: 30px; }
.lf-new { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px dashed var(--gold); border-radius: 12px; }
.lf-days { flex-wrap: wrap; }
.eng-row { align-items: center; }
.eng-row .pill { margin-inline-start: 6px; vertical-align: middle; }
.eng-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.eng-row .pill:not(.live) { background: var(--line); color: var(--ink-2, inherit); }

/* sign-in + client space (part 5) */
.si-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--paper); }
.si-card { width: 100%; max-width: 400px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 18px; padding: 28px 22px; display: flex; flex-direction: column; gap: 14px; }
.si-card h1 { font-size: 22px; margin: 0; }
.si-logo { width: 48px; height: 48px; border-radius: 12px; }
.si-code { font-size: 26px; letter-spacing: 8px; text-align: center; }
body.signin-mode .rail, body.signin-mode .tabbar, body.signin-mode #topbar { display: none !important; }
body.client-mode .rail, body.client-mode .tabbar { display: none !important; }
body.client-mode .content { margin-inline-start: 0 !important; max-width: 760px; margin: 0 auto; }
.cl-space { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.cl-space h2 { font-size: 20px; margin: 6px 0 0; }
.cl-h { font-size: 14px; margin: 8px 0 0; color: var(--ink-2, inherit); }
.cl-post { gap: 10px; }
.cl-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cl-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cl-media img, .cl-media video { width: 100%; border-radius: 10px; aspect-ratio: 1; object-fit: cover; background: var(--line); }
.cl-cap { white-space: pre-wrap; line-height: 1.6; }
.cl-change textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; background: var(--paper); color: var(--ink); }
.cl-rep { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.cl-rep:last-child { border-bottom: 0; }
.pp-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pp-row .grow { min-width: 160px; }
body.client-mode #topbar { display: none !important; }
body.client-mode #m-top { display: none !important; }
@media (max-width: 600px) { .pp-row .grow { flex: 1 1 100%; } .pp-row .switch { margin-inline-end: auto; } }
.pp-h { font-size: 15px; margin: 18px 0 2px; display: flex; gap: 8px; align-items: center; }
.pp-sub { font-size: 12.5px; margin-bottom: 4px; }
.pp-biz { display: inline-flex; gap: 4px; align-items: center; font-size: 12.5px; color: var(--ink-2, inherit); }
.pp-biz svg { width: 14px; height: 14px; }
.pp-add { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); }
.pp-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; }
.pp-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #0A0F0C; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.pp-biz-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.pp-bz { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pp-bz.on { border-color: var(--gold); background: var(--gold-wash, rgba(232,176,74,.12)); }
.pp-bz input { margin: 0; }
.rp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 4px 0 10px; } .rp-bar .fld { margin: 0; min-width: 150px; }
.pd-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; } .pd-row .grow { flex: 1; min-width: 180px; } .pd-form { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }

/* team chat */
.tc-box { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; height: calc(100vh - 210px); min-height: 420px; }
.tc-chans { display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.tc-ch { display: flex; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: start; }
.tc-ch.on { background: var(--card, #fff); box-shadow: 0 0 0 1px var(--line); font-weight: 600; }
.tc-ch .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-n { background: var(--gold); color: #0A0F0C; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.tc-main { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.tc-msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.tc-day { align-self: center; font-size: 11.5px; color: var(--ink-3, #888); background: var(--paper); border-radius: 999px; padding: 2px 10px; margin: 6px 0; }
.tc-msg { display: flex; }
.tc-msg.mine { justify-content: flex-end; }
.tc-bub { max-width: 78%; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.tc-msg.mine .tc-bub { background: var(--gold-wash, rgba(232,176,74,.14)); border-color: transparent; }
.tc-who { display: flex; gap: 6px; align-items: center; font-size: 12px; margin-bottom: 2px; }
.tc-who small { color: var(--ink-3, #888); }
.tc-del { margin-inline-start: auto; border: 0; background: none; cursor: pointer; opacity: .35; padding: 0; color: inherit; }
.tc-del:hover { opacity: 1; } .tc-del svg { width: 13px; height: 13px; }
.tc-text { white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
.tc-at { color: var(--gold-ink, #8A5A12); }
.tc-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.tc-form textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; background: var(--paper); color: var(--ink); min-height: 40px; }
@media (max-width: 760px) {
  .tc-box { grid-template-columns: 1fr; height: auto; }
  .tc-chans { flex-direction: row; overflow-x: auto; }
  .tc-ch { flex: none; }
  .tc-main { height: calc(100vh - 290px); min-height: 380px; }
}
