@font-face {
  font-family: "Vazirmatn";
  src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --brand: #0e9384;
  --brand-600: #0b7c70;
  --brand-50: #e6f6f4;
  --brand-100: #c7ebe6;

  --ink: #12201f;
  --ink-2: #465553;
  --ink-3: #7b8a88;

  --bg: #f4f6f7;
  --surface: #ffffff;
  --line: #e3e8ea;
  --line-2: #eef2f3;

  --warn: #b76e00;
  --warn-bg: #fff4e0;
  --danger: #c8332e;
  --danger-bg: #fdeceb;
  --ok: #1a8a5f;
  --ok-bg: #e6f5ee;
  --info: #2f6fed;
  --info-bg: #e9f0fe;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(18, 32, 31, 0.05), 0 6px 18px rgba(18, 32, 31, 0.05);
  --shadow-lg: 0 10px 40px rgba(18, 32, 31, 0.16);

  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Vazirmatn", "IRANSans", Tahoma, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }

/* ---------- shell ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar { display: none; }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}

.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.pad { padding: 16px; }

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}

.topbar h1 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  display: block;
  line-height: 1.4;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  flex: none;
}
.icon-btn:hover { background: var(--line-2); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- bottom nav ---------- */

.tabbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
}

.tabbar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  color: var(--ink-3);
  position: relative;
  min-height: 44px;
}

.tabbar button svg { width: 23px; height: 23px; }
.tabbar button.on { color: var(--brand); font-weight: 700; }

.tabbar .dot {
  position: absolute;
  top: 6px;
  inset-inline-start: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 12px; }

.card-h {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-2);
}
.card-h h2 { font-size: 14px; margin: 0; font-weight: 700; flex: 1; }
.card-h .more { font-size: 12px; color: var(--brand); font-weight: 500; }

.card-b { padding: 14px 16px; }

.section-t {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-t:first-child { margin-top: 4px; }

/* ---------- kpi ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  box-shadow: var(--shadow);
}
.kpi .lbl { font-size: 12px; color: var(--ink-3); }
.kpi .val { font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -0.5px; }
.kpi .delta { font-size: 11px; color: var(--ok); }
.kpi .delta.down { color: var(--danger); }

/* ---------- action cards ---------- */

.action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.action:active { transform: scale(0.995); }

.action .ic {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  flex: none;
}
.action .ic svg { width: 21px; height: 21px; }
.action .tx { flex: 1; min-width: 0; }
.action .tx b { display: block; font-size: 14px; font-weight: 700; }
.action .tx span { font-size: 12px; color: var(--ink-3); }
.action .chev { color: var(--ink-3); flex: none; }
.action .chev svg { width: 18px; height: 18px; }

/* ---------- chips ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.danger { background: var(--danger-bg); color: var(--danger); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.brand { background: var(--brand-50); color: var(--brand-600); }
.chip svg { width: 13px; height: 13px; }

/* ---------- tabs ---------- */

.tabs {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 60px;
  z-index: 20;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs button {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--line-2);
  white-space: nowrap;
  min-height: 36px;
}
.tabs button.on { background: var(--brand); color: #fff; font-weight: 700; }
.tabs button .n { font-size: 11px; opacity: 0.75; margin-inline-start: 4px; }

/* ---------- list rows ---------- */

.rows {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  width: 100%;
  text-align: start;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface);
}
.row:last-child { border-bottom: none; }
.row:hover { background: #fafbfb; }

.avatar {
  width: 44px; height: 44px;
  border-radius: 14px;
  flex: none;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 15px;
  background: var(--brand-50);
  color: var(--brand-600);
  position: relative;
}
.avatar .ch {
  position: absolute;
  bottom: -3px;
  inset-inline-start: -3px;
  width: 18px; height: 18px;
  border-radius: 6px;
  border: 2px solid var(--surface);
  display: grid; place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
}
.ch.tg { background: #2aabee; }
.ch.bale { background: #00a870; }
.ch.ig { background: #d62976; }

.row .body { flex: 1; min-width: 0; }
.row .ln1 { display: flex; align-items: center; gap: 6px; }
.row .ln1 b { font-size: 14px; font-weight: 700; }
.row .ln1 .time { margin-inline-start: auto; font-size: 11px; color: var(--ink-3); flex: none; }
.row .snippet {
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.row .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.row.unread { background: #f7fcfb; }
.row.unread .ln1 b::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  margin-inline-start: 6px;
  vertical-align: middle;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  background: var(--line-2);
  color: var(--ink);
  border: 1px solid transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: var(--danger-bg); color: var(--danger); }
.btn.sm { min-height: 36px; font-size: 13px; padding: 0 12px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

/* ---------- switch ---------- */

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  text-align: start;
}
.switch .tx { flex: 1; min-width: 0; }
.switch .tx b { display: block; font-size: 14px; }
.switch .tx span { font-size: 12px; color: var(--ink-3); }
.track {
  width: 46px; height: 28px;
  border-radius: 999px;
  background: #cfd7d8;
  flex: none;
  position: relative;
  transition: background 0.18s;
}
.track::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.18s;
}
.track.on { background: var(--brand); }
[dir="rtl"] .track.on::after { transform: translateX(-18px); }
.track.on.danger { background: var(--danger); }

/* ---------- chat ---------- */

/* chat keeps Telegram's physical sides: incoming left, outgoing right */
.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  direction: ltr;
}

.daysep {
  direction: rtl;
  align-self: center;
  font-size: 11px;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px 12px;
  border-radius: 999px;
  margin: 6px 0;
}

.bub {
  direction: rtl;
  text-align: right;
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.85;
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(18,32,31,0.04);
}
.bub .t { font-size: 10px; color: var(--ink-3); margin-top: 4px; display: block; }

.bub.in {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top-left-radius: 6px;
}
.bub.out {
  align-self: flex-end;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-top-right-radius: 6px;
}
.bub.out .t { color: var(--brand-600); opacity: 0.8; }

.bub .who {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-600);
  display: block;
  margin-bottom: 2px;
}
.bub.in .who { color: var(--ink-3); }

.voice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}
.voice .play {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  flex: none;
}
.voice .play svg { width: 16px; height: 16px; }
.voice .wave { flex: 1; height: 22px; display: flex; align-items: center; gap: 2px; }
.voice .wave i {
  flex: 1;
  background: var(--brand);
  opacity: 0.45;
  border-radius: 2px;
  display: block;
}
.voice .dur { font-size: 11px; color: var(--ink-3); flex: none; }

/* ---------- ai draft ---------- */

.draft {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 14px 14px;
}
.draft.flagged { background: #fffaf2; border-top-color: #f0dcbb; }

.draft .dh {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.draft .dh b { font-size: 13px; }

.draft .txt {
  font-size: 14px;
  line-height: 1.85;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 11px 13px;
  max-height: 190px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.draft textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1.5px solid var(--brand);
  border-radius: var(--r);
  padding: 11px 13px;
  background: var(--surface);
  outline: none;
  line-height: 1.85;
  font-size: 14px;
}

.draft .src {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.draft .src svg { width: 13px; height: 13px; flex: none; }

.draft .acts { display: flex; gap: 8px; margin-top: 10px; }
.draft .acts .btn { flex: 1; }
.draft .acts .btn.icon-only { flex: none; width: 44px; padding: 0; }

/* ---------- composer ---------- */

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-b));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.composer textarea {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 18px;
  padding: 10px 14px;
  max-height: 110px;
  min-height: 44px;
  resize: none;
  outline: none;
  line-height: 1.7;
}
.composer textarea:focus { border-color: var(--brand); background: var(--surface); }
.composer .send {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  flex: none;
}
.composer .send svg { width: 20px; height: 20px; }

.paused-bar {
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid #f5cfcd;
}
.paused-bar svg { width: 16px; height: 16px; flex: none; }

/* ---------- sheet ---------- */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 21, 0.42);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.scrim.on { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 61;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  transform: translateY(101%);
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: var(--shadow-lg);
  padding-bottom: var(--safe-b);
}
.sheet.on { transform: translateY(0); }

.sheet .grip {
  width: 40px; height: 4px;
  border-radius: 2px;
  background: #d4dbdc;
  margin: 10px auto 4px;
  flex: none;
}
.sheet .sh {
  padding: 6px 18px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-2);
  flex: none;
}
.sheet .sh h3 { font-size: 16px; margin: 0; flex: 1; font-weight: 700; }
.sheet .sb { overflow-y: auto; padding: 14px 18px 20px; }

/* ---------- data list ---------- */

.dl { display: flex; flex-direction: column; gap: 0; }
.dl > div {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.dl > div:last-child { border-bottom: none; }
.dl dt { color: var(--ink-3); flex: none; width: 44%; margin: 0; }
.dl dd { margin: 0; flex: 1; font-weight: 500; }

/* ---------- timeline / flow ---------- */

.flow { position: relative; padding-inline-start: 8px; }

.step {
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 14px;
}
.step::before {
  content: "";
  position: absolute;
  inset-inline-start: 19px;
  top: 42px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.step:last-child::before { display: none; }

.step .num {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: grid; place-items: center;
  flex: none;
  z-index: 1;
  font-weight: 700;
  font-size: 13px;
}
.step .num svg { width: 19px; height: 19px; }

.step .sc {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.step .sc b { font-size: 14px; display: block; }
.step .sc p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.step .sc .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- color modifiers (بعد از .avatar و .num تا اولویت داشته باشند) ---------- */

.ic.warn { background: var(--warn-bg); color: var(--warn); }
.ic.danger { background: var(--danger-bg); color: var(--danger); }
.ic.ok { background: var(--ok-bg); color: var(--ok); }
.ic.info { background: var(--info-bg); color: var(--info); }
.ic.brand { background: var(--brand-50); color: var(--brand); }
.avatar.ic svg, .num.ic svg { width: 20px; height: 20px; }
.avatar.dim { opacity: 0.45; }

/* ---------- misc ---------- */

.empty {
  text-align: center;
  padding: 54px 24px;
  color: var(--ink-3);
}
.empty svg { width: 46px; height: 46px; opacity: 0.35; margin-bottom: 10px; }
.empty b { display: block; color: var(--ink-2); font-size: 15px; }
.empty span { font-size: 13px; }

.note {
  font-size: 12px;
  color: var(--ink-3);
  padding: 10px 14px;
  background: var(--line-2);
  border-radius: var(--r);
  line-height: 1.7;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

.spark { display: flex; align-items: flex-end; gap: 5px; height: 62px; margin-top: 6px; }
.spark i {
  flex: 1;
  background: var(--brand-100);
  border-radius: 5px 5px 3px 3px;
  position: relative;
}
.spark i.hi { background: var(--brand); }
.spark-x { display: flex; gap: 5px; margin-top: 6px; }
.spark-x span { flex: 1; text-align: center; font-size: 10px; color: var(--ink-3); }

.toast {
  position: fixed;
  inset-inline: 16px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  z-index: 80;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.22s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.on { opacity: 1; transform: translateY(0); }
.toast svg { width: 18px; height: 18px; flex: none; }

.proto-badge {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  z-index: 90;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 0 0 0 10px;
  pointer-events: none;
}

/* ---------- desktop ---------- */

@media (min-width: 900px) {
  body { font-size: 15px; }

  .tabbar { display: none; }

  .main {
    padding-bottom: 0;
    height: 100vh;
    overflow: hidden;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: 248px;
    flex: none;
    background: var(--surface);
    border-inline-start: 1px solid var(--line);
    height: 100vh;
    position: sticky;
    top: 0;
    order: 2;
  }

  .shell { flex-direction: row-reverse; }

  .brandbox {
    padding: 18px 18px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line-2);
  }
  .brandbox .logo {
    width: 38px; height: 38px;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 700;
  }
  .brandbox b { font-size: 15px; display: block; line-height: 1.4; }
  .brandbox span { font-size: 11px; color: var(--ink-3); }

  .snav { padding: 10px; overflow-y: auto; flex: 1; }
  .snav button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 14px;
    color: var(--ink-2);
    text-align: start;
    margin-bottom: 2px;
    min-height: 44px;
  }
  .snav button svg { width: 20px; height: 20px; flex: none; }
  .snav button:hover { background: var(--line-2); }
  .snav button.on { background: var(--brand-50); color: var(--brand-600); font-weight: 700; }
  .snav button .dot {
    margin-inline-start: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: grid;
    place-items: center;
  }
  .snav .grp {
    font-size: 11px;
    color: var(--ink-3);
    padding: 14px 12px 6px;
    font-weight: 700;
  }

  .me {
    padding: 12px;
    border-top: 1px solid var(--line-2);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .scroll > .pad { max-width: 1040px; margin: 0 auto; padding: 22px; }

  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .kpi .val { font-size: 28px; }

  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .two-col .card + .card { margin-top: 12px; }

  .tabs { top: 0; }

  .bub { max-width: 620px; }

  .chat-scroll { padding: 22px 22px 10px; }

  .sheet {
    inset-inline: auto;
    inset-inline-end: 0;
    top: 0;
    bottom: 0;
    width: 420px;
    max-height: none;
    border-radius: 0;
    border-inline-start: 1px solid var(--line);
    transform: translateX(0);
    display: none;
  }
  [dir="rtl"] .sheet { transform: translateX(-101%); }
  .sheet.on { display: flex; transform: translateX(0) !important; }
  .sheet .grip { display: none; }

  .toast { inset-inline: auto; inset-inline-start: 22px; bottom: 22px; min-width: 280px; }
}
