/* Higabox CRM Marketing — SPA styles (Notion-like: sidebar putih, system-ui) */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --bg-hover: #efefed;
  --border: #e9e9e7;
  --text: #37352f;
  --text-soft: #787774;
  --accent: #2383e2;
  --accent-soft: #e7f3f8;
  --green: #0f7b6c;
  --green-soft: #dbeddb;
  --yellow: #dfab01;
  --yellow-soft: #fdecc8;
  --red: #d44c47;
  --red-soft: #ffe2dd;
  --purple: #6940a5;
  --purple-soft: #e8deee;
  --radius: 8px;
  --shadow: 0 4px 16px rgba(15, 15, 15, 0.12);
  --sidebar-w: 220px;
}
* { box-sizing: border-box; }
/* v1.6: cegah scroll horizontal GLOBAL — overflow wajib dikandung di wrapper
   dalam (.tbl-holder / .kanban / .cal mobile). `clip` dipilih (bukan `hidden`)
   agar body tidak menjadi scroll container dan sticky sidebar tetap bekerja. */
html, body { margin: 0; padding: 0; height: 100%; overflow-x: clip; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
#app { display: flex; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 12px; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14.5px; }
.muted { color: var(--text-soft); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--bg-soft); border-right: 1px solid var(--border);
  padding: 12px 10px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
}
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px); border-bottom: 1px solid var(--border);
  padding: 10px 22px; display: flex; align-items: center; gap: 12px;
  min-height: 52px; flex-wrap: wrap;
}
/* v1.6: .view memakai seluruh lebar #main setelah sidebar (220px) — tanpa
   max-width 1200px yang meninggalkan dead-zone kosong kiri/kanan di desktop
   dan memaksa konten kalender/tabel meledak keluar container. Cap lembut
   min(100%,1760px) hanya untuk viewport ultrawide (>=1800px). */
.view { padding: 22px 26px; width: 100%; max-width: none; margin: 0; }
.view-full { max-width: none; }
@media (min-width: 1800px) { .view { width: min(100%, 1760px); margin: 0 auto; } }

/* ---------- sidebar ---------- */
.brand {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px;
  padding: 6px 8px 14px;
}
.brand .logo { font-size: 18px; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
  color: var(--text); font-weight: 500; cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; font-size: 14px; font-family: inherit;
}
.nav-item:hover { background: var(--bg-hover); text-decoration: none; }
.nav-item.active { background: var(--bg-hover); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; }
.nav-item .count {
  margin-left: auto; background: var(--bg-hover); border-radius: 10px;
  font-size: 11px; padding: 1px 7px; color: var(--text-soft); font-weight: 600;
}
.nav-sep { border-top: 1px solid var(--border); margin: 8px 4px; }
.side-user {
  margin-top: auto; border-top: 1px solid var(--border); padding-top: 10px;
  display: flex; align-items: center; gap: 8px;
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex: 0 0 auto; overflow: hidden;
}
.avatar.big { width: 40px; height: 40px; font-size: 16px; }
.side-user .who { min-width: 0; }
.side-user .who .nm { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who .rl { font-size: 11px; color: var(--text-soft); }

/* v1.7: logout dibuat lebih tegas — merah, ikon jelas, dan label muncul saat hover/focus.
   v1.8: base & hover memakai compound selector .btn.logout-btn (spesifisitas 0,2,0)
   dan .btn.logout-btn:hover/:focus-visible (0,3,0) supaya TIDAK ditimpa generic
   .btn (0,1,0) / .btn:hover (0,2,0) yang di-declare lebih belakang di file ini —
   state normal & hover tetap block merah penuh, teks/ikon tetap putih. */
.btn.logout-btn {
  position: relative; min-width: 34px; min-height: 32px; justify-content: center;
  padding: 5px 9px; background: var(--red); border-color: var(--red); color: #fff;
  font-weight: 700; box-shadow: 0 1px 2px rgba(212, 76, 71, .22);
}
.btn.logout-btn:hover, .btn.logout-btn:focus-visible {
  background: #b93834; border-color: #b93834; color: #fff;
  text-decoration: none; box-shadow: 0 2px 7px rgba(212, 76, 71, .3);
}
.logout-btn:focus-visible { outline: 2px solid #8f2825; outline-offset: 2px; }
.logout-text { display: none; }
.logout-btn::after {
  content: attr(data-tooltip); position: absolute; right: 0; bottom: calc(100% + 8px);
  padding: 5px 8px; border-radius: 5px; background: #2f2f2c; color: #fff;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(3px);
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease; z-index: 60;
}
.logout-btn:hover::after, .logout-btn:focus-visible::after {
  opacity: 1; visibility: visible; transform: translateY(0);
}

/* ---------- cards, tables, misc ---------- */
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px;
}
.grid { display: grid; gap: 12px; }
/* v1.6: guard anti grid-blowout — tanpa min-width:0/minmax(0,1fr), track 1fr
   memakai minimum min-content isi (chip nowrap, tabel lebar) sehingga grid
   "meledak" keluar container dan memaksa scroll horizontal di body. */
.grid > * { min-width: 0; }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* v1.6: Pipeline per Stage (Beranda) — kelas khusus menggantikan inline
   repeat(7,minmax(115px,1fr)): kolom elastis penuh di desktop, degrade 4/2
   kolom di layar sempit (sebelumnya selalu 7x115px = min 877px → scroll). */
.pipeline-row { display: grid; gap: 12px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pipeline-row .card { margin-bottom: 0; }
@media (max-width: 1180px) { .pipeline-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pipeline-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .grid-4, .grid-5 { grid-template-columns: 1fr; } }

.stat .lbl { color: var(--text-soft); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .val { font-size: 24px; font-weight: 700; margin-top: 4px; }
.stat .sub { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

/* Warna per overview card (Beranda) — satu sumber via CSS class, tanpa inline berulang.
   Background lembut + accent border membuat tiap metric terbaca berbeda tanpa mengganggu tema. */
.stat.tone-green  { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 28%, var(--border)); border-top: 3px solid var(--green); }
.stat.tone-blue   { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, var(--border)); border-top: 3px solid var(--accent); }
.stat.tone-purple { background: var(--purple-soft); border-color: color-mix(in srgb, var(--purple) 28%, var(--border)); border-top: 3px solid var(--purple); }
.stat.tone-yellow { background: var(--yellow-soft); border-color: color-mix(in srgb, var(--yellow) 28%, var(--border)); border-top: 3px solid var(--yellow); }
.stat.tone-red    { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 28%, var(--border)); border-top: 3px solid var(--red); }
.stat.tone-green  .val { color: var(--green); }
.stat.tone-blue   .val { color: var(--accent); }
.stat.tone-purple .val { color: var(--purple); }
.stat.tone-yellow .val { color: #9a7200; }
.stat.tone-red    .val { color: var(--red); }
.stat.tone-green .lbl, .stat.tone-blue .lbl, .stat.tone-purple .lbl,
.stat.tone-yellow .lbl, .stat.tone-red .lbl { color: color-mix(in srgb, var(--text) 72%, var(--text-soft)); }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; color: var(--text-soft); font-weight: 600;
  border-bottom: 1px solid var(--border); padding: 8px 10px; white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr.rowlink { cursor: pointer; }
.tbl tr.rowlink:hover { background: var(--bg-soft); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
/* v1.6: pembungkus scroll tabel — overflow tabel lebar dikandung DI SINI,
   bukan merembes ke body/#main. Di layar lebar tabel muat (tanpa scroll);
   di container sempit wrapper-lah yang scroll. */
.tbl-holder { overflow-x: auto; }

/* ---------- badges ---------- */
.badge {
  display: inline-block; border-radius: 4px; padding: 1px 7px; font-size: 11.5px;
  font-weight: 600; white-space: nowrap; vertical-align: middle;
}
.b-b2b { background: var(--accent-soft); color: var(--accent); }
.b-b2c { background: var(--purple-soft); color: var(--purple); }
.b-pending { background: var(--yellow-soft); color: #8a6d00; }
.b-approved { background: var(--green-soft); color: var(--green); }
.b-revisi { background: var(--red-soft); color: var(--red); }
.b-stage { background: var(--bg-hover); color: var(--text-soft); }
.b-role { background: var(--accent-soft); color: var(--accent); }
.b-role-admin { background: var(--red-soft); color: var(--red); }
.b-role-spv { background: var(--purple-soft); color: var(--purple); }
.b-role-staff { background: var(--green-soft); color: var(--green); }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); border-radius: 6px; padding: 5px 12px;
  font-size: 13.5px; font-weight: 500; cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--bg-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1b74c9; }
.btn.danger { color: var(--red); border-color: #f3c2bf; }
.btn.danger:hover { background: var(--red-soft); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: var(--bg-hover); }
.btn.sm { padding: 2px 8px; font-size: 12.5px; }
.btn.blk { width: 100%; justify-content: center; }

input, select, textarea {
  font-family: inherit; font-size: 14px; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 70px; resize: vertical; }
label.f { display: block; margin-bottom: 10px; }
label.f span { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; color: var(--text-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.inline-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-controls input, .inline-controls select { width: auto; }
.err-box {
  background: var(--red-soft); color: var(--red); border-radius: 6px;
  padding: 8px 12px; margin: 10px 0; font-size: 13px; white-space: pre-wrap;
}

/* ---------- kanban ---------- */
.kanban {
  display: grid; grid-template-columns: repeat(7, minmax(215px, 1fr));
  gap: 10px; overflow-x: auto; align-items: start; padding-bottom: 12px;
}
@media (max-width: 900px) { .kanban { grid-template-columns: repeat(7, 235px); } }
.kcol { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.kcol.dragover { outline: 2px dashed var(--accent); outline-offset: -2px; }
.kcol-head {
  display: flex; align-items: center; gap: 6px; padding: 2px 4px 8px;
  font-weight: 600; font-size: 13px;
}
.kcol-head .cnt { color: var(--text-soft); font-weight: 500; font-size: 12px; }
.kcard {
  background: var(--bg); border: 1px solid var(--border); border-radius: 7px;
  padding: 8px 10px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 2px rgba(15,15,15,.04);
}
.kcard.dragging { opacity: .45; }
.kcard .nm { font-weight: 600; margin-bottom: 4px; font-size: 13.5px; }
.kcard .meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.kcard .age { margin-top: 4px; font-size: 11px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard .foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--text-soft); }
.kcard .select-wrap { margin-top: 8px; }
.kcard .select-wrap select { font-size: 12px; padding: 2px 6px; }
.kempty { color: var(--text-soft); font-size: 12px; text-align: center; padding: 10px 4px; border: 1px dashed var(--border); border-radius: 6px; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head .title { font-size: 17px; font-weight: 700; min-width: 150px; text-align: center; }
/* v1.6: kolom minmax(0,1fr) — kalender selalu pas container; nama event panjang
   (chip nowrap) di-ellipsis oleh .ev, tidak lagi melebarkan kolom. */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.cal .dow { background: var(--bg-soft); font-size: 11.5px; font-weight: 600; color: var(--text-soft); padding: 6px 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal .day { min-width: 0; min-height: 96px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px; }
.cal .day.out { background: var(--bg-soft); }
/* v1.6: di layar <=640px kalender scroll DI DALAM wrapper-nya (min track 64px
   supaya angka tanggal masih terbaca), bukan memaksa scroll di body. */
@media (max-width: 640px) {
  .cal { grid-template-columns: repeat(7, minmax(64px, 1fr)); overflow-x: auto; }
}
.cal .day .dnum { font-size: 11.5px; color: var(--text-soft); font-weight: 600; }
.cal .day.today .dnum { color: #fff; background: var(--accent); border-radius: 50%; display: inline-flex; width: 19px; height: 19px; align-items: center; justify-content: center; }
/* v1.5: cell tanggal dalam-bulan bisa diklik → add follow-up / project */
.cal .day.clickable { cursor: pointer; transition: background .12s; }
.cal .day.clickable:hover { background: var(--bg-soft); }
.cal .day.clickable:hover .dnum { color: var(--accent); }
.cal .day.dragover { outline: 2px dashed var(--accent); outline-offset: -2px; }
.ev {
  display: block; border-radius: 4px; padding: 1px 5px; font-size: 11px; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border: none; width: 100%; text-align: left; font-family: inherit;
}
.ev.fu { background: var(--accent-soft); color: var(--accent); }
.ev.act { background: var(--green-soft); color: var(--green); }
.ev .k { font-weight: 700; }
.ev.pc { background: var(--bg-hover); color: var(--text); }
.ev.pc.overdue { background: var(--red-soft); color: var(--red); }
.ev.pc.today { background: var(--yellow-soft); color: #8a6d00; }
.ev.pc.soon { background: var(--accent-soft); color: var(--accent); }
.ev.pc.normal { background: var(--green-soft); color: var(--green); }

/* ---------- sidebar group (v1.2) ---------- */
.nav-group {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-soft); padding: 10px 8px 4px;
}
.nav-item.sub { padding-left: 18px; font-size: 13.5px; color: var(--text); }

/* ---------- insights polish (v1.2) ---------- */
.chart-card { min-height: 60px; }
.empty-state {
  color: var(--text-soft); text-align: center; padding: 22px 10px;
  border: 1px dashed var(--border); border-radius: 6px; font-size: 13px;
}
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut {
  width: 150px; height: 150px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.donut-empty { background: var(--bg-hover); }
.donut-hole {
  width: 92px; height: 92px; border-radius: 50%; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1.1; text-align: center;
}
.donut-hole span { font-size: 11px; color: var(--text-soft); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }
.lg-item { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.lg-item .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 auto; align-self: center; }
@media (max-width: 640px) { .donut-wrap { justify-content: center; } }

/* ---------- funnel / bars ---------- */
.bar-row { display: grid; grid-template-columns: 110px 1fr 90px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.bar-row .bnm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--bg-soft); border-radius: 5px; height: 20px; overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; background: var(--accent); border-radius: 5px 0 0 5px; min-width: 2px; }
.bar-fill.g { background: var(--green); }
.bar-fill.p { background: var(--purple); }
.bar-fill.y { background: var(--yellow); }

/* ---------- detail page ---------- */
.detail-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.detail-head h1 { margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv .k { color: var(--text-soft); font-weight: 600; }
.notes-panel { display: grid; gap: 10px; min-width: 280px; width: min(100%, 360px); }
.inline-note-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; background: var(--bg-soft); }
.inline-note-card h3 { margin: 0; font-size: 13.5px; }
.inline-note-card textarea { min-height: 78px; background: var(--bg); }
.inline-note-card textarea[readonly] { opacity: .8; cursor: not-allowed; }
.note-actions { justify-content: flex-end; margin-top: 7px; }
.note-hint { margin-top: 6px; }
.list-item {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item .grow { flex: 1; min-width: 0; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: 0 0 auto; }
.sec-head { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.sec-head .sp { flex: 1; }
.attach {
  display: flex; align-items: center; gap: 8px; padding: 6px 2px;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.attach:last-child { border-bottom: none; }
.attach .grow { flex: 1; min-width: 0; overflow: hidden; }
.attach .fn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,15,15,.42); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px;
  overflow-y: auto;
}
.modal { background: var(--bg); border-radius: 10px; box-shadow: var(--shadow); width: 100%; max-width: 520px; padding: 18px 20px; }
.modal.wide { max-width: 680px; }
.modal h2 { margin-bottom: 14px; }

/* ---------- toast ---------- */
.toast-root { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.toast {
  background: #2f2f2c; color: #fff; border-radius: 8px; padding: 10px 14px;
  font-size: 13.5px; box-shadow: var(--shadow); animation: tin .18s ease-out;
}
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); padding: 16px; }
.login-card { width: 100%; max-width: 360px; }
.login-card .brand { justify-content: center; font-size: 18px; padding-bottom: 8px; }
.login-hint { font-size: 12px; color: var(--text-soft); text-align: center; margin-top: 12px; line-height: 1.6; }

/* ---------- state / loading ---------- */
.state { text-align: center; color: var(--text-soft); padding: 36px 12px; }
.spinner {
  width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; margin: 0 auto 10px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- topbar helpers ---------- */
.topbar h1 { margin: 0; font-size: 17px; }
.topbar .sp { flex: 1; }
.crumb { color: var(--text-soft); font-size: 13px; }
.crumb b { color: var(--text); }

/* ---------- responsive sidebar ---------- */
.side-toggle { display: none; }
@media (max-width: 820px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%);
    transition: transform .18s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: none; }
  .side-toggle { display: inline-flex; }
  .view { padding: 14px; }
  .side-scrim { position: fixed; inset: 0; background: rgba(15,15,15,.3); z-index: 40; }
}
