/* مانیتور دامین — استایل اصلی */

:root {
  --bg: #0e1420;
  --bg-2: #121a28;
  --surface: #182233;
  --surface-2: #1e2a3d;
  --border: #253449;
  --border-strong: #324560;
  --text: #e8edf5;
  --text-2: #c2cbd9;
  --muted: #8a99b2;
  --accent: #e8b84a;
  --accent-2: #f3cf7a;
  --accent-ink: #1a1300;
  --accent-soft: rgba(232, 184, 74, 0.14);
  --green: #3dd68c; --green-soft: rgba(61, 214, 140, 0.14);
  --amber: #f5c044; --amber-soft: rgba(245, 192, 68, 0.14);
  --orange: #ff9a4d; --orange-soft: rgba(255, 154, 77, 0.14);
  --rose: #ff6b7a; --rose-soft: rgba(255, 107, 122, 0.14);
  --sky: #4cc2ff; --sky-soft: rgba(76, 194, 255, 0.14);
  --violet: #b48cff; --violet-soft: rgba(180, 140, 255, 0.14);
  --slate: #8a99b2; --slate-soft: rgba(138, 153, 178, 0.14);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 248px;
  --font: 'Vazirmatn', 'Vazir', 'Tahoma', system-ui, sans-serif;
}
[data-theme="light"] {
  --bg: #f1f4f9;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --border: #dfe5ee;
  --border-strong: #c8d1de;
  --text: #16202e;
  --text-2: #334155;
  --muted: #64748b;
  --accent: #b47f0e;
  --accent-2: #d49a1f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(180, 127, 14, 0.12);
  --green: #15a35f; --green-soft: rgba(21, 163, 95, 0.12);
  --amber: #c98a0b; --amber-soft: rgba(201, 138, 11, 0.12);
  --orange: #e2690c; --orange-soft: rgba(226, 105, 12, 0.12);
  --rose: #e0304a; --rose-soft: rgba(224, 48, 74, 0.12);
  --sky: #0b82c4; --sky-soft: rgba(11, 130, 196, 0.12);
  --violet: #7c4ddb; --violet-soft: rgba(124, 77, 219, 0.12);
  --slate: #64748b; --slate-soft: rgba(100, 116, 139, 0.12);
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--accent); }
a.link:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.4; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
code, pre, .ltr, .mono { direction: ltr; unicode-bidi: isolate; }
code { font-family: var(--font); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
pre.code-block { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; overflow: auto; font-size: 13px; text-align: left; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.domain-name { direction: ltr; unicode-bidi: isolate; display: inline-block; font-weight: 600; letter-spacing: 0.01em; }
.text-green { color: var(--green); } .text-amber { color: var(--amber); } .text-rose { color: var(--rose); }
.text-sky { color: var(--sky); } .text-orange { color: var(--orange); } .text-accent { color: var(--accent); }
.hidden { display: none !important; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; } .mt-lg { margin-top: 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; background: linear-gradient(to left, var(--bg-2) var(--sidebar-w), var(--bg) var(--sidebar-w)); }
.sidebar {
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); padding: 4px 8px 14px; }
.brand-mark { width: 28px; height: 28px; color: var(--accent); flex-shrink: 0; }
.brand-lg { font-size: 20px; justify-content: center; padding-bottom: 20px; }
.brand-lg .brand-mark { width: 34px; height: 34px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500;
  transition: background .12s, color .12s;
}
.nav a svg { width: 18px; height: 18px; opacity: .8; flex-shrink: 0; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-2); }
[data-theme="light"] .nav a.active { color: var(--accent); }
.nav a.active svg { opacity: 1; }
.nav .count { margin-inline-start: auto; font-size: 11px; background: var(--surface-2); border-radius: 999px; padding: 0 7px; color: var(--muted); }
.nav-section { font-size: 11px; color: var(--muted); padding: 12px 12px 4px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.user-chip:hover { background: var(--surface); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; color: var(--accent); border: 1px solid var(--border-strong); flex-shrink: 0; }
.user-chip .meta { line-height: 1.3; min-width: 0; display: flex; flex-direction: column; }
.user-chip .meta .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .meta .role { font-size: 11px; color: var(--muted); }

.sidebar-bg { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 26px; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 19px; }
.topbar .crumb { color: var(--muted); font-size: 13px; }
.topbar .actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.content { padding: 22px 26px 60px; max-width: 1360px; width: 100%; }
.btn.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer; white-space: nowrap; line-height: 1.4;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.loading { opacity: .6; cursor: progress; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--rose-soft); border-color: transparent; color: var(--rose); }
.btn-danger:hover { background: var(--rose); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-icon { padding: 7px; width: 34px; height: 34px; }
.btn-icon.btn-sm { width: 28px; height: 28px; padding: 5px; }
.btn-block { width: 100%; }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-2); font-weight: 500; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 8px 11px; width: 100%; min-width: 0;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(14px) 50%, calc(14px + 5px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 28px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-section { grid-column: span 2; margin-top: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 14px; }
.check { flex-direction: row; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex-direction: row; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(-16px); }
.help { font-size: 12px; color: var(--muted); font-weight: 400; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-head .actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-main { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* ---------- stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; transition: border-color .12s; }
.stat:hover { border-color: var(--border-strong); }
.stat .v { font-size: 24px; font-weight: 800; line-height: 1.2; }
.stat .l { font-size: 12px; color: var(--muted); }
.stat.c-green .v { color: var(--green); } .stat.c-amber .v { color: var(--amber); } .stat.c-rose .v { color: var(--rose); }
.stat.c-sky .v { color: var(--sky); } .stat.c-orange .v { color: var(--orange); } .stat.c-accent .v { color: var(--accent); }

/* ---------- badges & chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-orange { background: var(--orange-soft); color: var(--orange); }
.badge-rose { background: var(--rose-soft); color: var(--rose); }
.badge-sky { background: var(--sky-soft); color: var(--sky); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-slate { background: var(--slate-soft); color: var(--slate); }
.badge-accent { background: var(--accent-soft); color: var(--accent-2); }
[data-theme="light"] .badge-accent { color: var(--accent); }
.badge-lg { font-size: 14px; padding: 5px 14px 5px 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); direction: ltr; }
.chip.ok { border-color: rgba(61,214,140,.35); } .chip.warn { border-color: rgba(245,192,68,.45); } .chip.danger { border-color: rgba(255,107,122,.5); color: var(--rose); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.pill-fav { color: var(--accent); }

/* confidence bar */
.conf { display: inline-flex; align-items: center; gap: 7px; min-width: 70px; }
.conf .bar { width: 46px; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.conf .bar i { display: block; height: 100%; background: var(--green); }
.conf.c-mid .bar i { background: var(--amber); }
.conf.c-low .bar i { background: var(--rose); }
.conf .n { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ---------- lifecycle bar (شاخص اصلی پنل) ---------- */
.lifecycle { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.lifecycle .seg { position: relative; height: 8px; border-radius: 4px; background: var(--border); }
.lifecycle .seg.past { background: var(--border-strong); }
.lifecycle .seg.now { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lifecycle .seg.now.s-available { background: var(--sky); box-shadow: 0 0 0 3px var(--sky-soft); }
.lifecycle .seg.now.s-pending_delete { background: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.lifecycle .seg.now.s-redemption { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.lifecycle .seg.now.s-expired { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.lifecycle .seg.now.s-active { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.lifecycle.lg { gap: 6px; }
.lifecycle.lg .seg { height: 10px; }
.lifecycle-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; font-size: 11px; color: var(--muted); text-align: center; }
.lifecycle-labels span.now { color: var(--text); font-weight: 700; }
.lifecycle-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.lifecycle-wrap { padding: 16px 18px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-weight: 600; color: var(--muted); font-size: 12px; background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.table th a { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.table th a.sorted { color: var(--accent); }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.row-link { cursor: pointer; }
.table td.actions { white-space: nowrap; text-align: left; }
.table td .sub { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.table .w-check { width: 28px; }
.table .w-check input { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; }
.table tr.selected { background: var(--accent-soft) !important; }
.table-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.table.compact th, .table.compact td { padding: 7px 10px; }
.src-table td.ok-cell { width: 26px; }
.src-ok { color: var(--green); } .src-err { color: var(--rose); } .src-skip { color: var(--muted); }
td.conflict { background: var(--amber-soft); }

/* key-value list */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; font-size: 13px; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }

/* ---------- filter bar & tabs ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.toolbar .search input { padding-inline-start: 34px; }
.toolbar .search svg { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tabs a { padding: 8px 12px; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 500; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs a .n { font-size: 11px; background: var(--surface-2); border-radius: 999px; padding: 0 7px; color: var(--muted); }
.tabs a.active .n { background: var(--accent-soft); color: var(--accent-2); }
.pager { display: flex; gap: 4px; align-items: center; margin-inline-start: auto; }
.pager a, .pager span { padding: 4px 10px; border-radius: 6px; font-size: 12px; border: 1px solid var(--border); }
.pager a:hover { border-color: var(--muted); }
.pager .cur { background: var(--accent-soft); color: var(--accent-2); border-color: transparent; font-weight: 700; }
.bulk-bar { display: none; align-items: center; gap: 8px; padding: 10px 14px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.bulk-bar.on { display: flex; }

/* ---------- alerts & toasts ---------- */
.alert { padding: 11px 14px; border-radius: 8px; border: 1px solid; font-size: 13px; margin-bottom: 12px; }
.alert-success { background: var(--green-soft); border-color: rgba(61,214,140,.4); color: var(--green); }
.alert-danger { background: var(--rose-soft); border-color: rgba(255,107,122,.5); color: var(--rose); }
.alert-warning { background: var(--amber-soft); border-color: rgba(245,192,68,.5); color: var(--amber); }
.alert-info { background: var(--sky-soft); border-color: rgba(76,194,255,.4); color: var(--sky); }
.toasts { position: fixed; bottom: 18px; left: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.toast { padding: 11px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; animation: toast-in .2s ease-out; }
.toast .ic { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.toast.success .ic { background: var(--green); } .toast.danger .ic { background: var(--rose); } .toast.warning .ic { background: var(--amber); } .toast.info .ic { background: var(--sky); }
.toast button { margin-inline-start: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-right: 18px; }
.timeline::before { content: ''; position: absolute; right: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 2px 0 14px; }
.tl-item::before { content: ''; position: absolute; right: -18px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.tl-item.ev-status_changed::before, .tl-item.ev-status_initial::before { border-color: var(--accent); background: var(--accent); }
.tl-item.ev-field_changed::before { border-color: var(--sky); }
.tl-item.ev-check_failed::before { border-color: var(--rose); }
.tl-item.ev-registered::before { border-color: var(--green); background: var(--green); }
.tl-item .when { font-size: 11px; color: var(--muted); }
.tl-item .what { font-size: 13px; }
.tl-item .diff { font-size: 12px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tl-item .diff .old { color: var(--muted); text-decoration: line-through; }
.tl-item .diff .arrow { color: var(--muted); }
.tl-item .diff .new { color: var(--text); font-weight: 600; }

/* attention list (داشبورد) */
.attn { display: flex; flex-direction: column; }
.attn-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) 120px minmax(160px, 1fr) 120px; gap: 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.attn-row:last-child { border-bottom: 0; }
.attn-row:hover { background: var(--surface-2); }
.attn-row .when { font-size: 12px; color: var(--muted); text-align: left; }
.attn-row .when strong { display: block; color: var(--text); font-size: 13px; }

/* domain profile header */
.profile-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.profile-head .title { display: flex; flex-direction: column; gap: 6px; }
.profile-head .title h1 { font-size: 26px; direction: ltr; unicode-bidi: isolate; text-align: right; }
.profile-head .meta-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.profile-head .actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
svg.inline { width: 16px; height: 16px; vertical-align: -3px; }
.conflict-box { border: 1px solid rgba(245,192,68,.5); background: var(--amber-soft); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.conflict-box ul { margin: 6px 0 0; padding-inline-start: 18px; }
.days-big { font-size: 28px; font-weight: 800; line-height: 1.1; }
.days-big + .small { margin-top: 2px; }

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 180px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow); padding: 6px; display: none; z-index: 30; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 6px; background: none; border: 0; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; text-align: right; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--text); }
.dropdown-menu .danger { color: var(--rose); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 10, 20, .6); z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-bg.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; width: 100%; max-width: 440px; box-shadow: var(--shadow); padding: 20px; }
.modal h3 { margin-bottom: 8px; }
.modal .buttons { display: flex; gap: 8px; justify-content: flex-start; margin-top: 16px; }

/* empty states */
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .5; margin-bottom: 8px; }
.empty .btn { margin-top: 12px; }

/* details/raw */
details.raw { border: 1px solid var(--border); border-radius: 8px; }
details.raw summary { cursor: pointer; padding: 9px 12px; font-size: 13px; color: var(--text-2); }
details.raw pre { margin: 0; padding: 12px; border-top: 1px solid var(--border); max-height: 360px; overflow: auto; font-size: 12px; white-space: pre-wrap; text-align: left; }

/* ---------- auth / install ---------- */
.auth-body { display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 500px at 70% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 30px 28px; box-shadow: var(--shadow); }
.auth-card h3 { margin: 14px 0 8px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.install-card { max-width: 640px; }
.check-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; }
.check-list li::before { content: '●'; margin-inline-end: 8px; }
.check-list li.ok::before { color: var(--green); } .check-list li.bad::before { color: var(--rose); } .check-list li.warn::before { color: var(--amber); }
.auth-foot { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center; }

/* settings */
.settings-nav { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-size: 13px; }
.settings-nav a:hover { background: var(--surface); }
.src-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.src-row:last-child { border-bottom: 0; }
.src-row .desc { font-size: 12px; color: var(--muted); }
.key-row { grid-column: span 2; margin-top: -4px; }

/* notifications & bell */
.nav .count.count-hot { background: var(--rose); color: #fff; }
.bell-wrap .btn { position: relative; }
.bell-badge { position: absolute; top: -4px; left: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.bell-menu { min-width: 340px; max-width: 90vw; padding: 0; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.bell-list { max-height: 360px; overflow: auto; }
.bell-item { display: flex; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); align-items: flex-start; font-size: 13px; color: var(--text-2); }
.bell-item:last-child { border-bottom: 0; }
.bell-item:hover { background: var(--surface-2); }
.bell-item.unread { color: var(--text); }
.bell-item .ic { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.bell-item .t { font-weight: 600; }
.bell-item .d { direction: ltr; unicode-bidi: isolate; font-size: 12px; color: var(--muted); }
.bell-item .w { font-size: 11px; color: var(--muted); margin-inline-start: auto; white-space: nowrap; }
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: var(--accent-soft); }
[data-theme="light"] .notif.unread { background: #fff8e6; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 8px; flex-shrink: 0; }
.notif form { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid-main { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; right: 0; width: min(300px, 86vw); transform: translateX(100%); transition: transform .2s; z-index: 60; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .sidebar-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }
  .sidebar-bg.open { display: block; }
  .btn.menu-btn { display: inline-flex; }
  .shell { background: var(--bg); }
  .topbar, .content { padding-left: 14px; padding-right: 14px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-section { grid-column: span 1; }
  .attn-row { grid-template-columns: 1fr 1fr; }
  .attn-row .lifecycle { grid-column: span 2; }
  .kv { grid-template-columns: 100px 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .check-list { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar .actions, .btn { display: none !important; }
  .shell { display: block; }
  body { background: #fff; color: #000; }
}
