/* AutoWA BMR — tema gelap futuristik */
:root {
  --bg: #060912;
  --bg-2: #0a0f1c;
  --panel: rgba(17, 24, 42, 0.72);
  --panel-solid: #0f1627;
  --panel-2: rgba(255, 255, 255, 0.035);
  --line: rgba(148, 163, 214, 0.14);
  --line-strong: rgba(148, 163, 214, 0.26);
  --text: #e6ebf7;
  --muted: #8a96b3;
  --dim: #5d6987;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --pink: #f472b6;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  --ok: #34d399; --ok-bg: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, 0.12);
  --bad: #fb7185; --bad-bg: rgba(251, 113, 133, 0.13);
  --info: #60a5fa; --info-bg: rgba(96, 165, 250, 0.12);
  --bubble-in: #141c30; --bubble-out: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.2));
  --radius: 14px;
  --shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.8);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(34, 211, 238, 0.1), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(148, 163, 214, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 214, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 75%);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(139, 92, 246, 0.4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 214, 0.18); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- kerangka ---------- */
#app { position: relative; z-index: 1; }
.layout { display: grid; grid-template-columns: 248px 1fr; height: 100vh; height: 100dvh; }
.side {
  background: rgba(8, 12, 24, 0.82); backdrop-filter: blur(18px); border-right: 1px solid var(--line);
  padding: 16px 12px; overflow-y: auto; display: flex; flex-direction: column;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.brand .logo svg { width: 20px; height: 20px; }
.brand b { font-family: var(--display); font-size: 17px; letter-spacing: 0.2px; display: block; }
.brand small { color: var(--muted); font-size: 11px; }
.nav-group { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); padding: 16px 10px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: #b6c0da;
  font-size: 13.5px; position: relative; transition: background .15s, color .15s;
}
.nav a svg { width: 17px; height: 17px; flex: none; opacity: 0.8; }
.nav a span.l { flex: 1; }
.nav a:hover { background: rgba(148, 163, 214, 0.07); color: #fff; text-decoration: none; }
.nav a.active { background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(139, 92, 246, 0.12)); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px var(--cyan); }
.nav a.active svg { opacity: 1; color: var(--cyan); }
.count { background: rgba(251, 113, 133, 0.18); color: #fecdd3; border: 1px solid rgba(251, 113, 133, 0.35); border-radius: 999px; font-size: 10.5px; padding: 0 7px; line-height: 18px; min-width: 22px; text-align: center; font-family: var(--mono); }
.count.cyan { background: rgba(34, 211, 238, 0.14); color: #a5f3fc; border-color: rgba(34, 211, 238, 0.35); }
.side .me { margin-top: auto; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; }
.side .me .who { flex: 1; min-width: 0; font-size: 12.5px; }
.side .me .who small { color: var(--muted); display: block; }
.main { overflow-y: auto; padding: 22px 28px 40px; min-width: 0; }
.main.flush { padding: 0; overflow: hidden; }
.topbar { display: none; }

/* ---------- tipografi ---------- */
h1 { font-family: var(--display); font-size: 24px; font-weight: 600; margin: 0; letter-spacing: -0.2px; }
h2 { font-family: var(--display); font-size: 16px; font-weight: 600; margin: 0; }
h3 { font-size: 13px; font-weight: 600; margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); font-size: 13px; width: 100%; margin-top: -6px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- panel ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  backdrop-filter: blur(14px); box-shadow: var(--shadow); position: relative; min-width: 0;
}
.card.glow::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.45; pointer-events: none; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-bottom: 16px; }
.stat { padding: 16px; }
.stat .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat .v { font-family: var(--display); font-size: 28px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- tombol & input ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: rgba(148, 163, 214, 0.06);
  border-radius: 10px; padding: 7px 13px; cursor: pointer; font-size: 13px; white-space: nowrap; transition: all .15s; color: var(--text);
}
.btn:hover { border-color: rgba(34, 211, 238, 0.5); background: rgba(34, 211, 238, 0.08); text-decoration: none; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 6px 22px -8px rgba(99, 102, 241, 0.9); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); }
.btn.danger { color: var(--bad); border-color: rgba(251, 113, 133, 0.35); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: 0.45; cursor: default; filter: none; }
.icon-btn { width: 34px; height: 34px; padding: 0; justify-content: center; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time], input[type=url], input[type=tel], select, textarea {
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 11px; background: rgba(6, 9, 18, 0.6); width: 100%; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }
input::placeholder, textarea::placeholder { color: var(--dim); }
select option { background: var(--panel-solid); }
input[type=checkbox], input[type=radio] { accent-color: var(--cyan); width: 16px; height: 16px; }
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
label.field { display: block; margin-bottom: 12px; min-width: 0; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
label.check { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13px; }
.hint { font-size: 11.5px; color: var(--dim); margin-top: 4px; line-height: 1.45; }
.inline { display: inline-flex; width: auto; }
.money { position: relative; }
.money::before { content: "Rp"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 12px; }
.money input { padding-left: 32px; text-align: right; font-family: var(--mono); }

/* ---------- chip / status ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 2px 9px; border-radius: 999px; background: rgba(148, 163, 214, 0.1); color: var(--muted); white-space: nowrap; border: 1px solid transparent; font-weight: 500; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(52, 211, 153, 0.25); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(251, 191, 36, 0.25); }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(251, 113, 133, 0.25); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: rgba(96, 165, 250, 0.25); }
.badge.violet { background: rgba(139, 92, 246, 0.14); color: #c4b5fd; border-color: rgba(139, 92, 246, 0.3); }
.badge.cyan { background: rgba(34, 211, 238, 0.12); color: #67e8f9; border-color: rgba(34, 211, 238, 0.3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); display: inline-block; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2.4s infinite; }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.dot.bad { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
@keyframes pulse { 50% { opacity: 0.45; } }

/* ---------- tabel ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13px; }
th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); font-weight: 600; background: rgba(148, 163, 214, 0.04); position: sticky; top: 0; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(34, 211, 238, 0.04); }
tr.click { cursor: pointer; }
td.r, th.r { text-align: right; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 36px; height: 36px; opacity: 0.4; display: block; margin: 0 auto 10px; }

/* ---------- tab & segmen ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: rgba(148, 163, 214, 0.06); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 6px 13px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: rgba(34, 211, 238, 0.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35); }

/* ---------- notice ---------- */
.notice { padding: 11px 14px; border-radius: 12px; background: var(--info-bg); color: #bfdbfe; margin-bottom: 14px; font-size: 13px; border: 1px solid rgba(96, 165, 250, 0.22); line-height: 1.5; }
.notice.warn { background: var(--warn-bg); color: #fde68a; border-color: rgba(251, 191, 36, 0.25); }
.notice.bad { background: var(--bad-bg); color: #fecdd3; border-color: rgba(251, 113, 133, 0.28); }
.notice.ok { background: var(--ok-bg); color: #a7f3d0; border-color: rgba(52, 211, 153, 0.25); }

/* ---------- grafik ---------- */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { font-family: var(--display); font-size: 24px; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bar-h { height: 8px; border-radius: 99px; background: rgba(148, 163, 214, 0.1); overflow: hidden; min-width: 80px; }
.bar-h > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); box-shadow: 0 0 12px rgba(34, 211, 238, 0.5); }

/* ---------- kotak masuk ---------- */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 320px; height: 100%; }
.inbox.no-side { grid-template-columns: 340px minmax(0, 1fr); }
.chatlist { border-right: 1px solid var(--line); background: rgba(8, 12, 24, 0.55); display: flex; flex-direction: column; min-height: 0; }
.chatlist .filters { padding: 14px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.chatlist .items { overflow-y: auto; flex: 1; }
.chatitem { display: block; padding: 11px 14px; border-bottom: 1px solid var(--line); color: inherit; position: relative; }
.chatitem:hover { background: rgba(148, 163, 214, 0.05); text-decoration: none; }
.chatitem.active { background: linear-gradient(90deg, rgba(34, 211, 238, 0.12), transparent); }
.chatitem.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.chatitem .top { display: flex; gap: 6px; align-items: center; }
.chatitem .name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatitem .time { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.chatitem .last { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; display: flex; gap: 6px; }
.chatitem .last span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.chatitem .tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.chatview { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chatview .head { background: rgba(8, 12, 24, 0.6); border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; gap: 10px; align-items: center; backdrop-filter: blur(12px); }
.chatview .msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.chatview .tools { display: flex; gap: 6px; padding: 8px 12px 0; flex-wrap: wrap; border-top: 1px solid var(--line); background: rgba(8, 12, 24, 0.6); }
.chatview .compose { background: rgba(8, 12, 24, 0.6); padding: 10px 12px 12px; display: flex; gap: 8px; align-items: flex-end; }
.chatview .compose textarea { resize: none; min-height: 42px; max-height: 160px; }
.bubble { max-width: min(560px, 78%); padding: 8px 11px 5px; border-radius: 14px 14px 14px 4px; background: var(--bubble-in); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; font-size: 13.5px; }
.bubble.out { align-self: flex-end; background: var(--bubble-out); border-color: rgba(99, 102, 241, 0.35); border-radius: 14px 14px 4px 14px; }
.bubble.ai { border-color: rgba(34, 211, 238, 0.35); }
.bubble .meta { font-size: 10px; color: var(--muted); text-align: right; margin-top: 3px; font-family: var(--mono); }
.bubble .tr { font-size: 12px; color: #a5b4fc; border-left: 2px solid rgba(139, 92, 246, 0.5); padding-left: 8px; margin-top: 4px; font-style: italic; }
.bubble img, .bubble video { max-width: 100%; max-height: 320px; border-radius: 10px; display: block; margin-bottom: 4px; }
.bubble audio { max-width: 260px; display: block; }
.daysep { align-self: center; font-size: 11px; background: rgba(148, 163, 214, 0.08); color: var(--muted); padding: 3px 12px; border-radius: 999px; margin: 10px 0; border: 1px solid var(--line); }
.sidepanel { border-left: 1px solid var(--line); background: rgba(8, 12, 24, 0.55); overflow-y: auto; padding: 16px; }
.sidepanel .sec { margin-bottom: 18px; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; font-size: 12.5px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; word-break: break-word; }
.back { display: none; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(2, 4, 10, 0.72); backdrop-filter: blur(6px); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(99, 102, 241, 0.15); }
.modal.wide { max-width: 820px; }
.modal .mh { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
.modal .mb { padding: 18px; }
.modal .mf { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel-solid); }
@keyframes fade { from { opacity: 0; } }

#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 80; max-width: calc(100vw - 32px); }
.toast { background: rgba(15, 22, 39, 0.96); border: 1px solid var(--line-strong); color: #fff; padding: 11px 14px; border-radius: 12px; max-width: 360px; font-size: 13px; box-shadow: var(--shadow); animation: slide .2s; display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.toast.bad { border-color: rgba(251, 113, 133, 0.5); background: rgba(60, 14, 26, 0.96); }
.toast.warn { border-color: rgba(251, 191, 36, 0.5); background: rgba(52, 36, 8, 0.96); }
.toast.ok { border-color: rgba(52, 211, 153, 0.45); }
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }

.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 380px; padding: 28px; }
.login .brand { padding: 0 0 22px; }

.qr { display: flex; justify-content: center; padding: 12px; background: #fff; border-radius: 14px; margin: 6px 0 10px; }
.qr img { width: 230px; height: 230px; image-rendering: pixelated; display: block; }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, rgba(148,163,214,.06), rgba(148,163,214,.14), rgba(148,163,214,.06)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.copybox { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; background: rgba(6, 9, 18, 0.6); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; line-height: 1.55; }
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-grid .ph { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .ph button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; line-height: 1; }
.photo-grid .ph .n { position: absolute; left: 4px; bottom: 3px; font-size: 10px; background: rgba(0,0,0,.65); padding: 0 5px; border-radius: 4px; }
.banners { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 70; max-width: min(360px, calc(100vw - 32px)); }
.banners a { display: flex; gap: 8px; align-items: center; padding: 11px 14px; border-radius: 12px; background: rgba(60, 14, 26, 0.95); border: 1px solid rgba(251, 113, 133, 0.5); color: #fecdd3; font-size: 13px; box-shadow: 0 12px 30px -10px rgba(251, 113, 133, 0.45); }
.banners a:hover { text-decoration: none; filter: brightness(1.15); }

@media (max-width: 1280px) {
  .inbox { grid-template-columns: 300px minmax(0, 1fr); }
  .inbox .sidepanel { display: none; }
  .inbox.show-side .sidepanel { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(360px, 92vw); z-index: 45; box-shadow: -20px 0 60px rgba(0,0,0,.6); background: var(--panel-solid); }
}
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { display: none; position: fixed; inset: 0 22% 0 0; z-index: 50; background: rgba(8, 12, 24, 0.98); }
  .side.open { display: flex; }
  .topbar { display: flex; align-items: center; gap: 10px; background: rgba(8, 12, 24, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: 10px 16px; position: relative; z-index: 2; }
  .topbar button { background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; display: grid; }
  .topbar b { font-family: var(--display); }
  .main { padding: 16px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .inbox, .inbox.no-side { grid-template-columns: 1fr; }
  .inbox.has-chat .chatlist { display: none; }
  .inbox:not(.has-chat) .chatview { display: none; }
  .back { display: inline-flex; }
  h1 { font-size: 20px; }
  .stat .v { font-size: 22px; }
  .bubble { max-width: 88%; }
}

/* grid dua kolom yang turun jadi satu kolom di layar sempit */
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.split.wide-left { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.split.wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1100px) { .split, .split.wide-left, .split.wide-right { grid-template-columns: 1fr; } }
