:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --surface-3: #e8e4da;
  --ink: #16213a;
  --ink-2: #4a5468;
  --ink-3: #7b8395;
  --line: #e3dfd6;
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --accent-soft: #e6ecfd;
  --healthy: #22895c;
  --watch: #c9900e;
  --needs: #d86a22;
  --critical: #cf3b3b;
  --na: #a3a8b4;
  --add-bg: #e5f4ec;
  --del-bg: #fbe7e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(22 33 58 / 0.05), 0 6px 24px -12px rgb(22 33 58 / 0.18);
  --shadow-lg: 0 24px 60px -20px rgb(22 33 58 / 0.35);
  --font: 'IBM Plex Sans', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0d1424;
    --surface: #141d31;
    --surface-2: #1a2540;
    --surface-3: #22304f;
    --ink: #eef1f7;
    --ink-2: #b4bccd;
    --ink-3: #7e889e;
    --line: #253150;
    --accent: #6f8fff;
    --accent-ink: #0d1424;
    --accent-soft: #1d2a52;
    --healthy: #3cc489;
    --watch: #e8b23a;
    --needs: #f08a45;
    --critical: #f06262;
    --na: #5d6780;
    --add-bg: #14352a;
    --del-bg: #3a1c22;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px -14px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 30px 70px -20px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0d1424;
  --surface: #141d31;
  --surface-2: #1a2540;
  --surface-3: #22304f;
  --ink: #eef1f7;
  --ink-2: #b4bccd;
  --ink-3: #7e889e;
  --line: #253150;
  --accent: #6f8fff;
  --accent-ink: #0d1424;
  --accent-soft: #1d2a52;
  --healthy: #3cc489;
  --watch: #e8b23a;
  --needs: #f08a45;
  --critical: #f06262;
  --na: #5d6780;
  --add-bg: #14352a;
  --del-bg: #3a1c22;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px -14px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 30px 70px -20px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
[dir='rtl'] { text-align: right; }

/* ── shell ─────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 20px 14px; border-inline-end: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 2px 8px; }
.brand-text { display: flex; align-items: baseline; gap: 8px; }
.brand-text strong { font-size: 19px; letter-spacing: 0.06em; }
.brand-ar { color: var(--ink-3); font-size: 15px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a .icon { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.nav a .badge { margin-inline-start: auto; }
.sidebar-foot { margin-top: auto; padding: 0 8px; color: var(--ink-3); font-size: 12px; display: flex; flex-direction: column; gap: 6px; }

.content { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 36px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 420px; }
.search input { width: 100%; height: 38px; padding-block: 0; padding-inline: 36px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search .icon { position: absolute; inset-inline-start: 11px; top: 10px; width: 18px; height: 18px; color: var(--ink-3); }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.search-results a:hover, .search-results a.hl { background: var(--surface-2); }
.main { padding: 28px 36px 80px; max-width: 1280px; width: 100%; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-label, .sidebar-foot { display: none; }
  .topbar, .main { padding-left: 16px; padding-right: 16px; }
}

/* ── type & layout ─────────────────────────────────────── */
h1 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 14.5px; margin: 0; }
p { margin: 0; }
.muted { color: var(--ink-3); }
.sub { color: var(--ink-2); margin-top: 6px; }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ── controls ──────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background 0.12s, border-color 0.12s; }
.btn:hover { border-color: var(--ink-3); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { opacity: 0.9; border-color: var(--ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover { opacity: 0.92; border-color: var(--accent); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn-danger { color: var(--critical); }
.btn-danger:hover { border-color: var(--critical); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn { width: 36px; padding: 0; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span.label { font-weight: 500; font-size: 13px; }
.field .help { color: var(--ink-3); font-size: 12px; }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); outline: none; }
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.textarea.mono { font-family: var(--mono); font-size: 12.5px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-lg { height: 48px; font-size: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.switch { position: relative; width: 38px; height: 22px; flex: none; border-radius: 99px; background: var(--surface-3); border: 0; cursor: pointer; transition: background 0.15s; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transition: transform 0.15s; }
.switch.on { background: var(--healthy); }
.switch.on::after { transform: translateX(16px); }

.choice { display: grid; gap: 10px; }
.choice-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; text-align: start; width: 100%; }
.choice-card:hover { border-color: var(--ink-3); }
.choice-card.on { border-color: var(--accent); background: var(--accent-soft); }
.choice-card .dotsel { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink-3); flex: none; margin-top: 2px; }
.choice-card.on .dotsel { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); background: var(--accent); }
.choice-card .t { font-weight: 600; }
.choice-card .d { color: var(--ink-2); font-size: 13px; margin-top: 2px; }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill .icon { width: 13px; height: 13px; }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill-healthy, .pill-ok, .pill-auto, .pill-connected, .pill-verified, .pill-succeeded { background: color-mix(in srgb, var(--healthy) 14%, transparent); color: var(--healthy); }
.pill-watch, .pill-warn, .pill-pending, .pill-queued { background: color-mix(in srgb, var(--watch) 16%, transparent); color: var(--watch); }
.pill-needs_work, .pill-manual-s { background: color-mix(in srgb, var(--needs) 15%, transparent); color: var(--needs); }
.pill-critical, .pill-error, .pill-failed, .pill-rejected, .pill-rolled_back { background: color-mix(in srgb, var(--critical) 14%, transparent); color: var(--critical); }
.pill-approval, .pill-awaiting_approval, .pill-running { background: var(--accent-soft); color: var(--accent); }
.pill-manual, .pill-skipped, .pill-none { background: var(--surface-2); color: var(--ink-2); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--critical); color: #fff; font-size: 11px; font-weight: 700; }
.badge-muted { background: var(--surface-3); color: var(--ink-2); }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--na); display: inline-block; }
.dot-pass, .dot-ok { background: var(--healthy); }
.dot-warn { background: var(--watch); }
.dot-fail, .dot-error { background: var(--critical); }
.dot-live { background: var(--healthy); box-shadow: 0 0 0 0 color-mix(in srgb, var(--healthy) 60%, transparent); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.chip { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; color: var(--ink-2); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 10px 13px; border: 0; background: none; cursor: pointer; color: var(--ink-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.tab .count { font-size: 11.5px; color: var(--ink-3); background: var(--surface-2); border-radius: 99px; padding: 0 6px; }

/* ── data display ──────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; text-decoration: none; display: block; }
.stat .label { color: var(--ink-3); font-size: 12.5px; }
.stat .value { font-size: 26px; font-weight: 600; margin-top: 2px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
a.stat:hover { border-color: var(--ink-3); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ring { position: relative; flex: none; }
.ring svg { display: block; transform: rotate(-90deg); }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.ring .num b { font-size: var(--ring-font, 24px); font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ring .num small { display: block; font-size: 10px; color: var(--ink-3); margin-top: 3px; letter-spacing: 0.06em; text-transform: uppercase; }
.track { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.track > span { display: block; height: 100%; border-radius: 99px; }
.bar-row { display: grid; grid-template-columns: 36px 1fr 30px; align-items: center; gap: 8px; font-size: 12.5px; }
.bar-row .k { color: var(--ink-3); font-weight: 600; letter-spacing: 0.04em; }
.bar-row .v { text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; }

.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.site-card { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; text-decoration: none; transition: transform 0.15s ease, border-color 0.15s ease; }
.site-card:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.site-card .domain { font-weight: 600; font-size: 15.5px; word-break: break-all; }
.site-card .body { display: flex; align-items: center; gap: 16px; }
.site-card .bars { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.site-card .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 11px; font-size: 12.5px; color: var(--ink-2); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--ink-3); font-weight: 500; font-size: 12px; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: var(--surface-2); }
td.url { max-width: 360px; word-break: break-all; }
.table-wrap { overflow-x: auto; }

.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
a.list-item { text-decoration: none; }
a.list-item:hover { background: var(--surface-2); }

.checks { display: flex; flex-direction: column; }
.check { display: grid; grid-template-columns: 12px minmax(0, 1fr) 150px; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); align-items: start; }
.check:last-child { border-bottom: 0; }
.check .dot { margin-top: 6px; }
.check .title { font-weight: 600; }
.check .summary { color: var(--ink-2); margin-top: 2px; font-size: 13.5px; }
.check .points { text-align: end; font-variant-numeric: tabular-nums; }
.check .points .track { margin-top: 7px; }
.check details { margin-top: 6px; font-size: 12.5px; }
.check summary { cursor: pointer; color: var(--accent); }
.check details ul { margin: 6px 0 0; padding-inline-start: 18px; color: var(--ink-2); word-break: break-all; }
@media (max-width: 640px) { .check { grid-template-columns: 12px 1fr; } .check .points { grid-column: 2; text-align: start; } }

/* ── pipeline board ────────────────────────────────────── */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--surface-2); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px; font-weight: 600; font-size: 13px; }
.lane-head .hint { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.task-card { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; cursor: pointer; text-align: start; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.task-card:hover { border-color: var(--ink-3); }
.task-card .t { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.task-card .gain { color: var(--healthy); font-weight: 600; font-size: 12.5px; }

/* ── changes & diffs ───────────────────────────────────── */
.change { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.change + .change { border-top: 1px solid var(--line); }
.diff { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 360px; font-family: var(--mono); font-size: 12px; line-height: 1.55; background: var(--surface); }
.diff div { padding: 0 10px; white-space: pre-wrap; word-break: break-word; }
.diff .add { background: var(--add-bg); }
.diff .del { background: var(--del-bg); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--critical) 50%, transparent); }
.diff .ctx { color: var(--ink-3); }
.beforeafter { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.beforeafter > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.beforeafter .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: 4px; }
.beforeafter .after { background: var(--add-bg); border-color: transparent; }
@media (max-width: 700px) { .beforeafter { grid-template-columns: 1fr; } }
.reasons { font-size: 12px; color: var(--ink-3); }
.error-box { padding: 10px 12px; border-radius: 10px; background: var(--del-bg); color: var(--critical); font-size: 13px; }
.steps { margin: 0; padding-inline-start: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
pre.code { margin: 0; padding: 12px; background: var(--surface-2); border-radius: 10px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }

/* ── overlays ──────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgb(10 15 28 / 0.45); z-index: 50; display: flex; justify-content: flex-end; animation: fade 0.15s ease; }
.overlay.center { justify-content: center; align-items: center; padding: 20px; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: min(640px, 100vw); height: 100vh; background: var(--bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide 0.18s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0.5; } }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer-body { padding: 18px 22px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-head { padding: 18px 22px 0; }
.modal-body { padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 22px 18px; display: flex; gap: 10px; justify-content: flex-end; }

.menu { position: absolute; inset-inline-end: 0; top: 42px; min-width: 320px; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden; }
.menu-head { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.menu-list { max-height: 420px; overflow-y: auto; }
.notif { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.notif.unread { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.notif .t { font-weight: 600; }
.notif .b { color: var(--ink-2); white-space: pre-line; margin-top: 2px; }

.toasts { position: fixed; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: 420px; animation: slide 0.2s ease; }
.toast.error { background: var(--critical); color: #fff; }
.toast.success { background: var(--healthy); color: #fff; }

/* ── wizard ────────────────────────────────────────────── */
.wizard { max-width: 860px; }
.stepper { display: flex; gap: 6px; margin: 4px 0 24px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; padding-block: 7px; padding-inline: 8px 12px; border-radius: 99px; color: var(--ink-3); font-weight: 500; font-size: 13px; background: transparent; border: 0; cursor: default; }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; font-weight: 600; }
.step.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.step.active .n { background: var(--accent); color: var(--accent-ink); }
.step.done { color: var(--ink-2); cursor: pointer; }
.step.done .n { background: var(--healthy); color: #fff; }
.wizard-foot { display: flex; gap: 10px; margin-top: 22px; align-items: center; }
.detect { display: flex; gap: 16px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.message { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); white-space: pre-wrap; font-size: 14px; line-height: 1.7; }

/* ── agents timeline ───────────────────────────────────── */
.timeline { overflow-x: auto; }
.tl-grid { min-width: 860px; }
.tl-row { display: grid; grid-template-columns: 210px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-name { padding: 10px 16px; }
.tl-name .n { font-weight: 600; font-size: 13.5px; }
.tl-track { position: relative; height: 46px; background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / 24)); }
.tl-block { position: absolute; top: 11px; height: 24px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 600; display: flex; align-items: center; padding: 0 8px; white-space: nowrap; }
.tl-block.internal { background: var(--surface-3); color: var(--ink); }
.tl-block.weekly { background: var(--watch); color: #1b1300; }
.tl-block.event { background: transparent; color: var(--ink-3); border: 1px dashed var(--ink-3); }
.tl-head { display: grid; grid-template-columns: 210px 1fr; font-size: 11px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.tl-hours { display: grid; grid-template-columns: repeat(24, 1fr); }
.tl-hours span { padding: 8px 0 8px 4px; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--critical); opacity: 0.7; }

.log { font-family: var(--mono); font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.log div { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 3px 0; }
.log .t { color: var(--ink-3); }
.log .error { color: var(--critical); }
.log .warn { color: var(--watch); }
.log .success { color: var(--healthy); }

.empty { text-align: center; padding: 44px 20px; color: var(--ink-2); }
.empty h2 { margin-bottom: 6px; color: var(--ink); }
.empty .btn { margin-top: 14px; }
.progress { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 64px; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2), var(--bg), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.live-banner { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ink-2); margin-bottom: 18px; font-size: 13.5px; }
.notice { padding: 13px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ink-2); font-size: 13.5px; }
.notice b { color: var(--ink); }
.notice.warn { background: color-mix(in srgb, var(--watch) 14%, transparent); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sparkline { display: block; width: 100%; height: 120px; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-3); }
.chart-legend span::before { content: ''; display: inline-block; width: 10px; height: 3px; border-radius: 2px; background: var(--c); margin-inline-end: 6px; vertical-align: middle; }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

/* sign-in */
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.auth-card { width: min(420px, 100%); }

/* right-to-left (Arabic UI) */
[dir='rtl'] .switch.on::after { transform: translateX(-16px); }
[dir='rtl'] .drawer { animation-name: slide-rtl; }
@keyframes slide-rtl { from { transform: translateX(-30px); opacity: 0.5; } }
/* Time axes read left to right in Arabic dashboards too. */
.timeline { direction: ltr; }
[dir='rtl'] .timeline .tl-name { direction: rtl; }
.lang-btn { font-weight: 600; min-width: 38px; }
:root[lang='ar'] body { font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
