:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e4e6eb;
  --border-strong: #cfd3da;
  --text: #0f1729;
  --text-2: #4a5263;
  --muted: #7a8193;
  --accent: #2a78d6;
  --accent-hover: #1c5cab;
  --accent-soft: #e9f2fd;
  --danger: #c93636;
  --danger-soft: #fdeeee;
  --success: #137a36;
  --success-soft: #e6f5eb;
  --warning: #9a5b00;
  --warning-soft: #fdf3e1;
  --chart: #2a78d6;
  --grid: #e7e8ec;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 41, 0.05);
  --shadow-lg: 0 18px 50px rgba(15, 23, 41, 0.18);
  --sidebar: 236px;
  --font: "IBM Plex Sans Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 8px; }
code, pre, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
[v-cloak] { display: none; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: #0f1729;
  color: #c9cfdb;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: #fff; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent);
  display: grid; place-items: center; color: #fff; flex-shrink: 0;
}
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.brand-sub { font-size: 11.5px; color: #8b93a7; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: #c9cfdb; font-weight: 500; text-decoration: none;
}
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav a.active { background: rgba(42, 120, 214, 0.22); color: #fff; }
.nav a.active svg { color: #7fb2ee; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px; }
.user-box { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #26324d; color: #fff;
  display: grid; place-items: center; font-weight: 600; flex-shrink: 0;
}
.user-box .name { color: #fff; font-weight: 500; font-size: 13px; }
.user-box button { margin-inline-start: auto; background: none; border: 0; color: #8b93a7; cursor: pointer; padding: 6px; border-radius: 6px; }
.user-box button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.main { flex: 1; min-width: 0; }
.topbar-mobile { display: none; }
.page { padding: 28px 32px 60px; max-width: 1320px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-head .hint { color: var(--muted); font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--surface-2); border-color: #b9bfc9; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #efb6b6; }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #a92b2b; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(15, 23, 41, 0.05); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-icon { width: 34px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn-wa { color: #128c4b; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 500; font-size: 13px; color: var(--text-2); }
.field .help { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); outline: none; transition: border-color 0.12s, box-shadow 0.12s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.select { padding-inline-end: 8px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42, 120, 214, 0.15); }
.input-sm, .select-sm { height: 32px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.search { position: relative; }
.search svg { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-inline-start: 34px; }
.error-box { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; }
.info-box { background: var(--accent-soft); color: #164b8c; border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; }
.warn-box { background: var(--warning-soft); color: var(--warning); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; }
.info-box ol, .warn-box ol { margin: 6px 0 0; padding-inline-start: 20px; }

/* ---------- Pills & badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
a.pill-link { color: var(--text); text-decoration: none; }
a.pill-link:hover { border-color: var(--border-strong); background: #eef1f6; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-ok { background: var(--success-soft); color: var(--success); }
.badge-err { background: var(--danger-soft); color: var(--danger); }
.badge-off { background: #eef0f3; color: var(--muted); }
.badge-info { background: var(--accent-soft); color: #1c5cab; }
.tag { display: inline-block; padding: 0 8px; border-radius: 6px; background: #eef1f6; color: var(--text-2); font-size: 12px; margin: 2px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: start; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 10px 14px;
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2);
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: #f7f9fc; }
.table tbody tr.selected td { background: var(--accent-soft); }
.table .num { font-variant-numeric: tabular-nums; }
.cell-name { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.table th:first-child, .table td:first-child { padding-inline-start: 18px; }
.w-check { width: 42px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .search { flex: 1; min-width: 220px; }
.toolbar .select { width: auto; min-width: 150px; }
.bulkbar { display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: var(--accent-soft); border-bottom: 1px solid #cfe1f8; flex-wrap: wrap; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); gap: 10px; flex-wrap: wrap; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--text-2); font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 41, 0.45); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto;
}
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; flex-wrap: wrap; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast {
  background: #0f1729; color: #fff; padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; animation: toast-in 0.18s ease-out;
}
.toast.error { background: #8f1f1f; }
.toast svg { flex-shrink: 0; margin-top: 2px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon-wrap { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { max-width: 420px; margin: 0 auto 16px; }

/* ---------- Stat tiles & charts ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .value { font-size: 28px; font-weight: 600; margin-top: 4px; line-height: 1.2; }
.stat .foot { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.colchart { position: relative; height: 200px; margin: 16px 0 0; padding-inline-start: 34px; }
.colchart .gridline { position: absolute; inset-inline: 34px 0; border-top: 1px solid var(--grid); }
.colchart .gridline span { position: absolute; inset-inline-start: -34px; top: -9px; font-size: 11px; color: var(--muted); width: 28px; text-align: end; font-variant-numeric: tabular-nums; }
.colchart .cols { position: absolute; top: 0; bottom: 0; inset-inline-start: 34px; inset-inline-end: 0; display: flex; align-items: flex-end; }
.colchart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; cursor: default; }
.colchart .bar { width: 60%; max-width: 24px; background: var(--chart); border-radius: 4px 4px 0 0; min-height: 0; }
.colchart .bar.zero { background: transparent; }
.colchart .col:hover .bar { background: var(--accent-hover); }
.colchart .col:hover { background: rgba(42, 120, 214, 0.05); }
.colchart .tip {
  display: none; position: absolute; bottom: calc(100% - 4px); background: #0f1729; color: #fff; padding: 5px 9px; border-radius: 6px;
  font-size: 12px; white-space: nowrap; z-index: 2; pointer-events: none; transform: translateY(-4px);
}
.colchart .col:hover .tip { display: block; }
.colchart-x { display: flex; padding-inline-start: 34px; margin-top: 6px; }
.colchart-x span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.hbars { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 44px; align-items: center; gap: 12px; position: relative; }
.hbar .name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.hbar .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 12px; position: relative; }
.hbar .fill { height: 12px; background: var(--chart); border-start-end-radius: 4px; border-end-end-radius: 4px; min-width: 2px; }
.hbar .fill.zero { background: var(--grid); min-width: 2px; }
.hbar .count { font-weight: 600; font-variant-numeric: tabular-nums; text-align: end; }
.hbar:hover .fill:not(.zero) { background: var(--accent-hover); }
.hbar .tip {
  display: none; position: absolute; inset-inline-start: 50%; top: -30px; background: #0f1729; color: #fff; padding: 4px 9px;
  border-radius: 6px; font-size: 12px; white-space: nowrap; z-index: 2; pointer-events: none;
}
.hbar:hover .tip { display: block; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.feed .txt { min-width: 0; flex: 1; }
.feed .txt > div:first-child { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.feed .meta { color: var(--muted); font-size: 12px; }

.steps { counter-reset: step; display: grid; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .num { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }

/* ---------- Projects ---------- */
.proj-card { overflow: hidden; display: block; text-decoration: none !important; color: inherit; }
.proj-card .proj-bar { height: 4px; }
.proj-name { font-size: 16px; font-weight: 600; color: var(--text); text-decoration: none; }
a.proj-name:hover { color: var(--accent); text-decoration: none; }
.proj-count { font-size: 26px; font-weight: 600; margin-top: 10px; line-height: 1.2; }
.proj-count span { font-size: 13px; font-weight: 500; color: var(--muted); }
.proj-none { border-style: dashed; }
.proj-none:hover { border-color: var(--accent); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.kcol { width: 280px; flex-shrink: 0; background: #eceef2; border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.kcol.drop { background: #dde9f8; outline: 2px dashed var(--accent); outline-offset: -2px; }
.kcol-head { padding: 12px 14px 8px; }
.kcol-head .title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.kcol-head .count { margin-inline-start: auto; background: rgba(15, 23, 41, 0.08); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.kcol-head .sum { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kcol-body { padding: 4px 10px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: grab; box-shadow: var(--shadow); }
.kcard:hover { border-color: #b8c7dc; }
.kcard.dragging { opacity: 0.45; }
.kcard .n { font-weight: 600; }
.kcard .s { color: var(--muted); font-size: 12.5px; }
.kcard .f { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); gap: 8px; }
.kcard .v { color: var(--text); font-weight: 600; }
.kmore { text-align: center; font-size: 12px; color: var(--muted); padding: 4px; }

/* ---------- Contact detail ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.info-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.info-list .k { color: var(--muted); font-size: 12.5px; }
.info-list .v { font-weight: 500; word-break: break-word; }
.contact-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.contact-head .avatar { width: 48px; height: 48px; font-size: 18px; background: var(--accent-soft); color: var(--accent); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin-bottom: 10px; font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 14px; top: 30px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .ic { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.timeline .ic.note { background: #fff7e6; color: #9a5b00; border-color: #f5dfb3; }
.timeline .ic.call, .timeline .ic.whatsapp { background: var(--success-soft); color: var(--success); border-color: #c4e6cf; }
.timeline .ic.stage { background: var(--accent-soft); color: var(--accent); border-color: #cfe1f8; }
.timeline .body { flex: 1; min-width: 0; }
.timeline .text { white-space: pre-wrap; word-break: break-word; }
.timeline .note-text { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-top: 4px; }
.timeline .meta { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.timeline .meta button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font-size: 12px; }
.timeline .meta button:hover { color: var(--danger); }
.composer { border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.composer .textarea { border: 0; border-radius: 0; min-height: 70px; box-shadow: none; }
.composer-foot { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: var(--surface-2); border-top: 1px solid var(--border); flex-wrap: wrap; }
.seg { display: inline-flex; background: #e9ecf1; border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 500; }

/* ---------- Integrations ---------- */
.intro { display: flex; gap: 16px; align-items: flex-start; }
.intro .big-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.src-card { padding: 16px 18px; }
.src-card .top { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.src-card .ttl { font-weight: 600; font-size: 15px; }
.src-card .sub { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.kv { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.kv .k { color: var(--muted); }
.copy-field { display: flex; gap: 6px; }
.copy-field .input { direction: ltr; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); }
pre.code { direction: ltr; text-align: left; background: #0f1729; color: #d7e1f2; border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 8px 0 0; line-height: 1.55; }
.map-table td, .map-table th { padding: 8px 12px; }
.map-table .sample { color: var(--muted); font-size: 12.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.endpoint { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.endpoint:last-child { border-bottom: 0; }
.method { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; min-width: 56px; text-align: center; }
.m-get { background: #e6f5eb; color: #137a36; }
.m-post { background: #e9f2fd; color: #1c5cab; }
.m-patch { background: #fdf3e1; color: #9a5b00; }
.m-delete { background: #fdeeee; color: #c93636; }
.endpoint code { direction: ltr; unicode-bidi: isolate; }
.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #cfd3da; border-radius: 999px; transition: 0.15s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; inset-inline-start: 2px; transition: 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { inset-inline-start: 18px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 80% -10%, #dbe9fb 0%, transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; padding: 30px 28px; }
.auth-card .brand-logo { width: 46px; height: 46px; border-radius: 12px; margin-bottom: 14px; }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { padding: 50px; display: grid; place-items: center; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; inset-inline-start: 0; top: 0; z-index: 40; transform: translateX(100%); transition: transform 0.2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar-mobile { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #0f1729; color: #fff; position: sticky; top: 0; z-index: 30; }
  .topbar-mobile button { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
  .scrim { position: fixed; inset: 0; background: rgba(15, 23, 41, 0.4); z-index: 35; }
  .page { padding: 18px 16px 50px; }
  .grid-2, .grid-3, .form-grid, .info-list { grid-template-columns: 1fr; }
  .toolbar .select { flex: 1; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .value { font-size: 22px; }
  .hbar { grid-template-columns: 96px 1fr 36px; }
}
