:root {
  --brand: #5b21b6; --brand-2: #7c3aed; --ink: #1f2937; --muted: #6b7280; --line: #e5e7eb; --bg: #f6f5fb; --card: #fff;
  --ok: #047857; --warn: #b45309; --bad: #b91c1c; --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Noto Sans Gujarati", "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 8px; padding: 8px 14px; background: var(--brand); color: #fff; font-weight: 600; }
button.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
button.small { padding: 4px 10px; font-size: 13px; }
button.danger { background: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #fff; }
.top b { font-size: 18px; }
.top small { opacity: .85; }
.wrap { display: flex; min-height: calc(100vh - 56px); }
nav.side { width: 230px; flex: 0 0 230px; background: #fff; border-right: 1px solid var(--line); padding: 10px; }
nav.side button.item, nav.side summary { display: block; width: 100%; text-align: left; background: transparent; color: var(--ink); font-weight: 500; padding: 9px 12px; border-radius: 8px; }
nav.side button.item:hover, nav.side summary:hover { background: #f3f0ff; }
nav.side button.item.on { background: #ede9fe; color: var(--brand); font-weight: 700; }
nav.side details { margin: 2px 0; }
nav.side summary { cursor: pointer; list-style: none; }
nav.side summary::after { content: "▾"; float: right; color: var(--muted); }
nav.side details:not([open]) summary::after { content: "▸"; }
nav.side details .sub { padding-left: 10px; }
main { flex: 1; padding: 18px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h2, .card h3 { margin: 0 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.box .n { font-size: 26px; font-weight: 700; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
.row > button { flex: 0 0 auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.scroll { overflow-x: auto; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2ff; color: #3730a3; }
.pill.ok { background: #d1fae5; color: var(--ok); }
.pill.warn { background: #fef3c7; color: var(--warn); }
.pill.bad { background: #fee2e2; color: var(--bad); }
.muted { color: var(--muted); }
.msg { padding: 10px 12px; border-radius: 8px; margin: 10px 0; background: #eef2ff; }
.msg.bad { background: #fee2e2; color: var(--bad); }
.msg.ok { background: #d1fae5; color: var(--ok); }
.key { font-family: Consolas, monospace; background: #111827; color: #a7f3d0; padding: 12px; border-radius: 8px; word-break: break-all; }
.center { max-width: 420px; margin: 40px auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.switch { display: inline-flex; align-items: center; gap: 8px; }
.switch input { width: auto; }
.hide { display: none !important; }
@media (max-width: 760px) {
  .wrap { flex-direction: column; }
  nav.side { width: 100%; flex: none; border-right: 0; border-bottom: 1px solid var(--line); }
  main { padding: 12px; }
}
