:root {
  --pb-yellow: #FFC800;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #1c2430;
  --muted: #7b8698;
  --line: #e8ecf3;
  --line-soft: #f0f3f8;
  --primary: #2f6bed;
  --primary-dark: #2357cc;
  --primary-soft: #eaf1fe;
  --brand: #f47a1f;
  --brand-2: #ffab52;
  --in: #eef3ff;
  --out: #fff6d6;
  --green: #16a34a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20,30,50,.05), 0 1px 3px rgba(20,30,50,.05);
  --shadow-md: 0 4px 16px rgba(20,30,50,.08);
  --sidebar-w: 240px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--line-soft); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.brand-badge {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  object-fit: cover; box-shadow: 0 2px 6px rgba(244,122,31,.30);
}
.brand-text { font-size: 16px; font-weight: 600; color: var(--ink); }
.brand-text b { font-weight: 700; color: var(--brand); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: #56607180; color: #5a6473; font-weight: 500; font-size: 14.5px;
}
.nav-item:hover { background: var(--line-soft); text-decoration: none; color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-ico { display: inline-flex; width: 20px; height: 20px; }
.nav-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Mobile top bar (hidden on desktop) */
.mobile-bar { display: none; }
.scrim { display: none; }

.main { flex: 1 1 auto; min-width: 0; }
.content { max-width: 1200px; margin: 0 auto; padding: 28px 30px 64px; }

h1 { font-size: 23px; font-weight: 700; margin: 0 0 22px; letter-spacing: -.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 26px 0 12px; color: #3a4453; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card .num { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.card .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 11px 15px; border-bottom: 1px solid var(--line-soft); }
th { background: #fafbfd; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #fafbfd; }
tr:last-child td { border-bottom: none; }
td.tags { color: var(--muted); font-size: 13px; max-width: 220px; white-space: normal; word-break: break-word; }
/* Широкие таблицы прокручиваются ВНУТРИ своей области, не распирая страницу шире контейнера. */
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Buttons ---------- */
button, .btn, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-weight: 600; cursor: pointer; font-size: 14px;
  font-family: inherit; line-height: 1.2; transition: background .12s, box-shadow .12s;
}
button:hover, .btn:hover, a.btn:hover { background: var(--primary-dark); text-decoration: none; }
button.ghost, a.ghost {
  background: #fff; color: #45505f; border-color: var(--line);
}
button.ghost:hover, a.ghost:hover { background: var(--line-soft); }
button.send { font-size: 15px; padding: 12px 22px; margin-top: 10px; width: 100%; }
button.mini { padding: 6px 10px; font-size: 13px; }
button.danger { background: #fff; color: #d03a34; border-color: #f3c6c4; }
button.danger:hover { background: #fdecec; }
.btn-link { align-self: center; color: var(--muted); padding: 8px 4px; }
.btn-link:hover { color: var(--ink); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.filters input, .filters select, .addtag input {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 14px; color: var(--ink); font-family: inherit;
}
.filters input:focus, .filters select:focus, input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.filters label.date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.filters label.date input { font-size: 13px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }

/* ---------- Pager ---------- */
.pager { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager .cur { padding: 7px 12px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.pager a:hover { text-decoration: none; background: var(--line-soft); }
.pager .cur { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }

/* ---------- Feed ---------- */
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 15px; margin-bottom: 8px; box-shadow: var(--shadow); }
.feed .txt { color: #333; font-size: 14px; margin: 3px 0; }
.feed time { color: var(--muted); font-size: 12px; }
.badge { display: inline-block; min-width: 20px; height: 20px; text-align: center; border-radius: 6px; font-weight: 700; margin-right: 4px; padding: 0 4px; }
.badge.in { background: var(--in); color: var(--primary); }
.badge.out { background: var(--out); color: #8a6d00; }

/* ---------- Chat ---------- */
.back { display: inline-block; margin-bottom: 10px; color: var(--muted); font-size: 14px; }
.back:hover { color: var(--ink); }
.chat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); max-height: 640px; overflow-y: auto; }
.msg { margin-bottom: 12px; display: flex; flex-direction: column; }
.msg.in { align-items: flex-start; }
.msg.out { align-items: flex-end; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.msg.in .bubble { background: var(--in); border-bottom-left-radius: 4px; }
.msg.out .bubble { background: var(--out); border-bottom-right-radius: 4px; }
.msg time { color: var(--muted); font-size: 11px; margin: 2px 6px; }
.mtype { color: var(--muted); font-size: 12px; margin-right: 4px; }

/* ---------- Key-value ---------- */
.kv th { background: none; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 500; width: 42%; }
.kv td { font-weight: 500; }

/* ---------- Tags ---------- */
.taglist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary); padding: 3px 4px 3px 11px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.tag form { display: inline; margin: 0; }
.tag button { background: rgba(47,107,237,.16); color: var(--primary); border-radius: 50%; width: 18px; height: 18px; padding: 0; line-height: 1; font-size: 13px; }
.tag button:hover { background: rgba(47,107,237,.28); }
.addtag { display: flex; gap: 6px; }
.addtag button { width: 40px; }

/* ---------- Events ---------- */
.events { list-style: none; padding: 0; margin: 0; }
.events li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.events time { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* ---------- Dialogs ---------- */
.dialogs { list-style: none; padding: 0; margin: 0; }
.dialogs li { margin-bottom: 8px; }
.dialogs a { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 16px; box-shadow: var(--shadow); color: var(--ink); transition: box-shadow .12s, border-color .12s; }
.dialogs a:hover { text-decoration: none; box-shadow: var(--shadow-md); border-color: #d7deea; }
.d-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.d-head time { margin-left: auto; color: var(--muted); font-size: 12px; }
.d-last { color: #59616e; font-size: 14px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Funnel steps ---------- */
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.step-idx { background: var(--primary); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.step-msg { white-space: pre-wrap; background: var(--line-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; }
.step-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kbtn { background: var(--line-soft); padding: 5px 12px; border-radius: 8px; font-size: 13px; }
.kbtn.correct { background: #dcfce7; color: var(--green); font-weight: 600; }
.branching { margin-top: 10px; }
.branching summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.branching .kv { margin-top: 8px; }
.branching td { white-space: pre-wrap; }

/* ---------- Broadcast form ---------- */
.bcast section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.bcast label { display: block; margin-bottom: 13px; font-size: 13px; color: var(--muted); font-weight: 500; }
.bcast label select, .bcast label input[type=text], .bcast label input[type=datetime-local], .bcast label input[type=file], .bcast label textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; color: var(--ink);
  font-family: inherit; background: #fff;
}
.bcast label.chk { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.bcast label.chk input { width: auto; margin: 0; }
.estimate { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 15px; display: flex; align-items: center; gap: 12px; }
.estimate b { font-size: 20px; }
.estimate .ghost { margin-left: auto; }

/* ---------- Funnel status badge ---------- */
.fb { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.fb.done { background: #dcfce7; color: #16a34a; }
.fb.active { background: #fff2cc; color: #a86b00; }
.fb.warn { background: #fde2e1; color: #c0392b; }
.fb.none { background: var(--line-soft); color: #9aa0a8; }
.d-head .fb { margin-left: 2px; }

/* ---------- Notice ---------- */
.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.notice.ok { background: #dcfce7; color: #166534; }
.notice.warn { background: #fef3c7; color: #92400e; }

/* ---------- Test box ---------- */
.test-box { background: #f8fafc; border: 1px dashed #d6deea; border-radius: var(--radius-sm); padding: 14px; margin-bottom: 14px; }
.test-box label { margin-bottom: 8px; }

/* ---------- Bulk bar ---------- */
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); padding: 11px 15px; border-radius: var(--radius-sm); box-shadow: var(--shadow); margin-bottom: 12px; }
.bulkbar input { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; }

/* ---------- Message preview ---------- */
.preview-msg { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); white-space: pre-wrap; word-wrap: break-word; }
.preview-photo { margin-bottom: 10px; }
.preview-photo img { max-width: 360px; max-height: 360px; border-radius: 12px; box-shadow: var(--shadow); }

/* ---------- Actions bar ---------- */
.actions-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.actions-bar form.inline { display: inline; margin: 0; }

/* ---------- Misc rows ---------- */
.row2 { display: flex; gap: 12px; }
.row2 > label { flex: 1; }
.prof-link { font-size: 13px; font-weight: 500; margin-left: 8px; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-actions form.inline { display: inline-flex; gap: 4px; margin: 0; align-items: center; }
.row-actions input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; width: 130px; }
.del-user { display: inline; margin-left: 10px; }
h1 .del-user button { vertical-align: middle; }

/* ---------- User chip / logout ---------- */
.user-chip { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 11px; border-radius: var(--radius-sm); background: var(--line-soft); }
.user-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info span { font-size: 11px; color: var(--muted); }
.logout { margin-left: auto; width: 32px; height: 32px; flex: 0 0 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: #6b7482; }
.logout svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logout:hover { background: #fdecec; color: #d03a34; border-color: #f3c6c4; text-decoration: none; }

/* ---------- Login page ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 360px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; box-shadow: var(--shadow-md); }
.login-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 14px; }
.login-card h1 { text-align: center; font-size: 20px; margin: 0 0 18px; }
.login-card label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.login-card input { display: block; width: 100%; margin-top: 5px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; }

/* ---------- Pages (links) ---------- */
.url-cell { max-width: 420px; }
.url-cell a { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ---------- Saved filters ---------- */
.saved-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.saved-chips .chip { display: inline-flex; align-items: center; gap: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 4px 6px 4px 12px; font-size: 13px; box-shadow: var(--shadow); }
.saved-chips .chip a { font-weight: 600; color: var(--primary); }
.saved-chips .chip form { display: inline; margin: 0; }
.saved-chips .chip button { background: var(--line-soft); color: #8a929e; border-radius: 50%; width: 18px; height: 18px; padding: 0; line-height: 1; font-size: 13px; }
.saved-chips .chip button:hover { background: #fde2e1; color: #c0392b; }
.filters-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 15px 14px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.save-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.save-filter input[type=text] { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.save-filter .chk { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Collapsible filters ---------- */
.filters-box { margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--shadow); }
.filters-box > summary { list-style: none; cursor: pointer; padding: 11px 15px; font-weight: 600; font-size: 14px; color: #45505f; user-select: none; }
.filters-box > summary::-webkit-details-marker { display: none; }
.filters-box > summary::before { content: "▸"; margin-right: 8px; color: var(--muted); }
.filters-box[open] > summary::before { content: "▾"; }
.filters-box .filters { padding: 0 15px 14px; margin: 0; }

/* ---------- Bulk bar extras ---------- */
.bulkbar .chk { font-size: 13px; color: var(--ink); }
.bulkbar .sep { flex: 1; }
.bulkbar .selall-filter { background: var(--primary-soft); padding: 5px 10px; border-radius: 8px; color: var(--primary); }

/* ---------- Pager ---------- */
.pager-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; }
.pager a, .pager .cur { min-width: 34px; text-align: center; padding: 7px 10px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.pager a:hover { text-decoration: none; background: var(--line-soft); }
.pager .cur { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.pager .dots { padding: 7px 4px; color: var(--muted); }
.page-size { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.page-size a, .page-size .cur { padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line); background: #fff; }
.page-size a:hover { text-decoration: none; background: var(--line-soft); }
.page-size .cur { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

/* ---------- Activity timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-dot { position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); border: 2px solid var(--card); }
.tl-in .tl-dot { background: var(--primary); }
.tl-out .tl-dot { background: var(--brand); }
.tl-event .tl-dot { background: #22c55e; }
.tl-head { display: flex; gap: 10px; align-items: baseline; }
.tl-head time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tl-detail { color: #59616e; font-size: 13px; margin-top: 2px; white-space: pre-wrap; word-wrap: break-word; }

/* ---------- Folders / list edit ---------- */
.folder-head { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.folder-head h2 { margin: 0; }
.edit-pop { position: relative; display: inline-block; }
.edit-pop > summary { list-style: none; display: inline-flex; padding: 6px 10px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); color: #45505f; cursor: pointer; font-size: 13px; }
.edit-pop > summary::-webkit-details-marker { display: none; }
.edit-pop[open] > summary { background: var(--line-soft); }
.pop-form { position: absolute; z-index: 20; top: 110%; right: 0; display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 12px; width: 240px; }
.pop-form input, .pop-form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }

/* ---------- Reply box ---------- */
.reply-box { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.reply-box textarea { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; resize: vertical; }
.reply-box button { white-space: nowrap; }

/* ---------- Formatting toolbar ---------- */
.fmt-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.fmt-toolbar button { padding: 5px 10px; background: #fff; color: #45505f; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; min-width: 30px; }
.fmt-toolbar button:hover { background: var(--line-soft); }
.fmt-hint { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* ---------- Email links block ---------- */
.email-links { background: var(--primary-soft); border: 1px solid #cfe0fb; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.email-links h2 { margin-top: 0; }
.email-links table { box-shadow: none; border: 1px solid var(--line); }

/* ---------- Link clicks ---------- */
.clicks { display: inline-block; min-width: 30px; padding: 2px 10px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); font-weight: 700; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .mobile-bar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 14px;
  }
  .mobile-bar #burger { background: none; color: var(--ink); border: none; font-size: 22px; padding: 2px 6px; }
  .brand-mini { font-weight: 700; color: var(--brand); }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 40; height: 100vh;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: var(--shadow-md);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,22,35,.4); z-index: 35; }
  .content { padding: 20px 16px 56px; }
}
