/* ═══════════════════════════════════════════════════════════════════════
   Nexren Shield — "Pearl" design system (süt beyazı minimal)
   Near-white ground, hairline rules instead of shadows, one dark ink
   accent, generous whitespace. Elevation only where something genuinely
   floats (dropdown, dialog, toast). Light by default; data-theme="dark"
   mirrors the same restraint on a near-black ground.
   Retune the ramps in :root — everything else derives from them.
   ═══════════════════════════════════════════════════════════════════════ */
/* fonts are requested with <link> in the document head:
   an @import here would serialise a second round trip after this file. */

:root {
  --ink-950: #131417;
  --ink-900: #1c1e22;
  --ink-800: #2b2d33;
  --ink-700: #43464e;
  --ink-600: #5c5f66;
  --ink-500: #74777e;
  --ink-400: #8a8d94;
  --ink-300: #b6b8be;
  --ink-200: #d9dade;
  --ink-100: #ececee;
  --ink-50:  #f5f5f7;
  --paper:   #fbfbfc;
  --white:   #ffffff;

  --good: #17784d;  --good-soft: #eef7f2;
  --bad:  #b4372c;  --bad-soft:  #fbf0ee;
  --warn: #8a6320;  --warn-soft: #fbf5e9;
  --info: #2f5fa8;  --info-soft: #eaf1fb;

  --color-bg: var(--paper);
  --color-surface: var(--white);
  --color-surface-2: var(--ink-50);
  --color-text: var(--ink-950);
  --color-text-dim: var(--ink-600);
  --color-text-faint: var(--ink-400);
  --color-hairline: var(--ink-100);
  --color-hairline-strong: var(--ink-200);
  --color-accent: var(--ink-950);
  --color-accent-contrast: var(--white);
  --color-accent-soft: var(--ink-50);
  --code-bg: var(--ink-50);
  --code-text: var(--ink-900);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s8: 32px; --s10: 44px; --s12: 60px;

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;

  --lift-menu: 0 12px 32px rgba(19,20,23,.10), 0 2px 6px rgba(19,20,23,.05);
  --lift-modal: 0 32px 80px rgba(19,20,23,.20);

  /* Kabuk viewport'u kaplar. Eskiden 1280px'lik sabit bir kolondu ve
     geniş ekranlarda iki yanda 300-600px ölü alan bırakıyordu. Kenar
     payı viewport ile birlikte büyür ama uçlara yapışmaz. */
  --shell: 100%;
  --gutter: clamp(16px, 2.4vw, 48px);

  /* legacy aliases — inline styles in index.html / app.js still reference
     these names; mapping them here keeps every inline colour on-palette
     instead of silently falling back to an invalid value. */
  --primary: var(--color-accent);
  --primary-hover: var(--ink-800);
  --bg-main: var(--color-bg);
  --bg-card: var(--color-surface);
  --border: var(--color-hairline);
  --border-focus: var(--color-hairline-strong);
  --color-divider: var(--color-hairline);
  --color-divider-strong: var(--color-hairline-strong);
  --color-accent-2: var(--color-text-dim);
  --color-accent-400: var(--info);
  --color-accent-700: var(--color-accent);
}

:root[data-theme="dark"] {
  --color-bg: #0e0f11;
  --color-surface: #16171a;
  --color-surface-2: #1d1f23;
  --color-text: #f4f4f5;
  --color-text-dim: #a4a7ae;
  --color-text-faint: #74777e;
  --color-hairline: #26282d;
  --color-hairline-strong: #34373d;
  --color-accent: #f4f4f5;
  --color-accent-contrast: #0e0f11;
  --color-accent-soft: #1d1f23;
  --code-bg: #0a0b0d;
  --code-text: #d8dade;
  --good: #4ec38a;  --good-soft: rgba(78,195,138,.14);
  --bad:  #e8776a;  --bad-soft:  rgba(232,119,106,.14);
  --warn: #d6a44f;  --warn-soft: rgba(214,164,79,.14);
  --info: #7fa9e8;  --info-soft: rgba(127,169,232,.14);
  --primary-hover: var(--ink-200);
  --lift-menu: 0 12px 32px rgba(0,0,0,.55);
  --lift-modal: 0 32px 80px rgba(0,0,0,.7);
}

/* ── base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; color: var(--color-text); }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; letter-spacing: -.01em; }
h4 { font-size: 13.5px; }
p { margin: 0 0 var(--s3); color: var(--color-text-dim); line-height: 1.6; }
p:last-child { margin-bottom: 0; }
a { color: var(--color-text); text-underline-offset: 3px; }
small { font-size: 12px; }
:focus-visible { outline: none !important; }
::selection { background: var(--ink-200); }
:root[data-theme="dark"] ::selection { background: var(--ink-700); }
.muted, .hint { color: var(--color-text-faint); font-size: 13px; }
.dim { color: var(--color-text-dim); }
.mono { font-family: var(--font-mono); font-size: .92em; }
.eyebrow { margin: 0 0 5px; color: var(--color-text-faint); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.right { text-align: right; }

/* ═══════════════════════════════════════════════════════════════════
   TABLO SİSTEMİ — panelin 13 tablosunun tamamı bunun üzerinde durur

   Kurallar:
   1) `table-layout: fixed` + YÜZDELİK sütun genişlikleri. Piksel genişlik
      kullanmayın: kabuk artık viewport genişliğinde, sabit pikseller ya
      içeriği eziyor (IP hücresi 115px'e sıkışıp yan sütuna taşıyordu) ya
      da artan yerin tamamını tek bir serbest sütuna yığıyordu.
   2) Hücreler varsayılan olarak TEK SATIR ve taşan içerik üç noktayla
      kırpılır. Kırpılabilen her hücreye app.js `title` yazar, tam metin
      oradan okunur. Satır ritmi böylece her tabloda aynı kalır.
   3) Genişlik sınıfları `<th>` üzerine yazılır — `table-layout: fixed`
      sütun genişliğini yalnızca ilk satırdan okur, `<td>`lere dokunmak
      gerekmez (satırların çoğunu app.js üretiyor).
   4) Sütun yüzdeleri tablo başına %100'e tamamlanmalı. Serbest kalan
      sütun (`.c-flex`) genişlik almaz, artan yeri o toplar.
   5) Tablo `--tbl-min` altına inerse sarmalayıcı yatay kayar; sütunlar
      okunamayacak kadar ezilmez.
   ═══════════════════════════════════════════════════════════════════ */
table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
th, td {
  padding: var(--s3); border-bottom: 1px solid var(--color-hairline);
  text-align: left; vertical-align: middle;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
th { color: var(--color-text-faint); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding-bottom: var(--s2); }
td span { display: block; color: var(--color-text-faint); font-size: 12px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--color-surface-2); }
.row-clickable { cursor: pointer; }
tr.selected { background: var(--color-surface-2); }
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
/* Sütunlar bu genişliğin altında ezilmeye başlar; sarmalayıcı kaydırır.
   Yoğun tablolar --tbl-min'i kendi ihtiyacına göre yükseltir. */
.table-wrap > table { min-width: var(--tbl-min, 860px); }
.events-table-wrap { --tbl-min: 1100px; }

/* Sütun genişlikleri, hepsi yüzde ve hepsi <th> üzerinde. İki grup var:

   a) Sabit tipler — içeriği her tabloda aynı boyda olduğu için genişliği
      de her tabloda aynı: zaman damgası, IP, sayaç, HTTP yöntemi, rozet,
      aksiyon düğmesi.
   b) İçerik payları (.c-w*) — alan adı, yol, gerekçe gibi uzunluğu
      tablodan tabloya değişen sütunlar için. Bir tablonun payları
      ~%100'e tamamlanmalı; eksik kalan yeri tarayıcı sütunlara eşit
      dağıtır, bu yüzden yaklaşık olması yeterli. */
th.c-time   { width: 10%; }
th.c-ip     { width: 11%; }
th.c-date   { width: 11%; }
th.c-tag    { width:  9%; }
th.c-verb   { width:  6%; }
th.c-num    { width:  6%; }
th.c-act    { width:  7%; }   /* tek düğme */
th.c-act-sm { width:  5%; }   /* tek küçük düğme (yoğun log) */
th.c-act-lg { width: 14%; }   /* yan yana iki düğme */

th.c-w12 { width: 12%; } th.c-w16 { width: 16%; } th.c-w20 { width: 20%; }
th.c-w25 { width: 25%; } th.c-w30 { width: 30%; } th.c-w35 { width: 35%; }
th.c-w40 { width: 40%; } th.c-w45 { width: 45%; } th.c-w50 { width: 50%; }

/* Hücre tipleri. Taşma davranışı yukarıdaki varsayılandan gelir;
   bunlar yalnızca hizalama ve tipografi ekler. */
.cell-num, td.c-num { font-variant-numeric: tabular-nums; }
.cell-actions, td.c-act { text-align: right; }
.cell-actions .mini-btn + .mini-btn { margin-left: var(--s2); }
/* Hücre içindeki `code` rozeti kendi hücresini asla aşmaz — eski
   `max-width: none` uzun IPv4'lerin yan sütuna taşmasının sebebiydi. */
td code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
/* İki satırlı hücre: üstte soluk yardımcı bilgi, altta asıl değer. */
.cell-stack span { margin: 0 0 1px; font-size: 11px; }
.empty { text-align: center; color: var(--color-text-faint); padding: var(--s8); }

code {
  display: inline-block; max-width: 320px; overflow-wrap: anywhere;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--code-text); background: var(--code-bg);
  border: 1px solid var(--color-hairline); border-radius: var(--r-sm); padding: 1px 6px;
}
pre {
  margin: var(--s3) 0 0; padding: var(--s4); min-height: 80px; max-height: 520px; overflow: auto;
  border: 1px solid var(--color-hairline); border-radius: var(--r-sm);
  background: var(--code-bg); color: var(--code-text);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.command-box { min-height: auto; font-size: 12px; color: var(--color-text-dim); }

/* ── controls ─────────────────────────────────────────────────────── */
button, input, select, textarea {
  min-height: 34px; font: inherit; font-size: 13px;
  border: 1px solid var(--color-hairline-strong); border-radius: var(--r-sm);
  background: var(--color-surface); color: var(--color-text); padding: 6px 11px;
  box-shadow: none !important;
  outline: none !important;
}
input::placeholder, textarea::placeholder { color: var(--color-text-faint); }
input:hover, select:hover, textarea:hover {
  border-color: var(--color-hairline-strong);
}
input:focus, select:focus, textarea:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--color-hairline-strong);
  box-shadow: none !important;
  outline: none !important;
}

/* selects get the system chrome stripped and a drawn caret, so they read
   as part of the panel instead of as an OS widget */
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8d94' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 12px;
}
:root[data-theme="dark"] select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2374777e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
select:hover, select:focus, select:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  border-color: var(--color-hairline-strong) !important;
}
select option { background: var(--color-surface); color: var(--color-text); }
select:disabled { opacity: .5; cursor: not-allowed; }

/* origin lock state chip */
.lock-state-icon {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-md); background: var(--color-surface-2);
  border: 1px solid var(--color-hairline); color: var(--color-text-faint);
  transition: background-color .15s, color .15s, border-color .15s;
}
.lock-state-icon.locked { background: var(--good-soft); border-color: transparent; color: var(--good); }
.lock-state-icon.unlocked { background: var(--bad-soft); border-color: transparent; color: var(--bad); }

/* ── Origin Lock Snippet Buttons & Tabs ───────────────────────────── */
.origin-lock-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.origin-lock-snippet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--r-sm);
  background: var(--color-surface);
  color: var(--color-text-dim);
  border: 1px solid var(--color-hairline-strong);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.origin-lock-snippet-btn:hover:not(.active) {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
}

.origin-lock-snippet-btn:active:not(.active) {
  transform: scale(0.97);
}

.origin-lock-snippet-btn.active {
  background: var(--color-accent) !important;
  color: var(--color-accent-contrast) !important;
  border-color: var(--color-accent) !important;
  font-weight: 600 !important;
}

:root[data-theme="dark"] .origin-lock-snippet-btn {
  background: var(--color-surface);
  border-color: var(--color-hairline-strong);
  color: var(--color-text-dim);
}

:root[data-theme="dark"] .origin-lock-snippet-btn:hover:not(.active) {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
}

:root[data-theme="dark"] .origin-lock-snippet-btn.active {
  background: var(--color-accent) !important;
  color: var(--color-accent-contrast) !important;
  border-color: var(--color-accent) !important;
}

#origin-lock-tab-label {
  font-size: 11px;
  font-weight: 600;
  background: var(--good-soft);
  color: var(--good);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--good) 25%, transparent);
  letter-spacing: 0.2px;
  transition: all 0.15s ease;
}
textarea { min-height: 90px; padding: 10px 12px; resize: vertical; font-family: var(--font-mono); font-size: 12.5px; }
label { display: grid; gap: 6px; color: var(--color-text-dim); font-size: 12.5px; font-weight: 500; }

button {
  cursor: pointer; font-weight: 500; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--color-accent); color: var(--color-accent-contrast); border-color: var(--color-accent);
  white-space: nowrap;
  outline: none !important;
  box-shadow: none !important;
  transition: background-color .12s, border-color .12s, color .12s, transform .12s cubic-bezier(0.16, 1, 0.3, 1);
}
button:focus, button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
button:active { transform: scale(0.98); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.secondary, button.ghost, .btn-secondary {
  background: var(--color-surface); color: var(--color-text); border-color: var(--color-hairline-strong);
}
button.secondary:hover, button.ghost:hover, .btn-secondary:hover { background: var(--color-surface-2); border-color: var(--color-hairline-strong); }
button.ghost { border-color: transparent; background: transparent; color: var(--color-text-dim); }
button.ghost:hover { background: var(--color-surface-2); color: var(--color-text); }
button.mini-btn { min-height: 26px; padding: 0 9px; font-size: 12px; }
.primary-btn { background: var(--color-accent); color: var(--color-accent-contrast); border-color: var(--color-accent); min-height: 38px; font-weight: 600; }
.primary-btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.finish-btn { width: 100%; min-height: 40px; font-weight: 600; }
.finish-btn:disabled { background: transparent; color: var(--color-text-faint); border-color: var(--color-hairline-strong); }

/* ── status pills ─────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
  border-radius: var(--r-pill); border: 1px solid var(--color-hairline-strong);
  padding: 3px 9px; color: var(--color-text-dim); background: var(--color-surface);
  font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap;
}
.pill.valid, .pill.active, .pill.shield, .pill.live_public { color: var(--good); background: var(--good-soft); border-color: transparent; }
.pill.invalid, .pill.wrong_cert, .pill.plesk, .pill.block { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.pill.pending, .pill.unknown, .pill.lab_edge, .pill.waf_proof { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.action-block { color: var(--bad); }
.action-challenge { color: var(--warn); }
.action-rate_limit { color: var(--warn); }
.action-log { color: var(--info); }

/* ═══════════════════════════════════════════════════════════════════
   HEADER — the panel's face. One 60px band: identity on the left, the
   global menu riding the band's bottom edge so the active indicator
   lands exactly on the hairline, account cluster on the right.
   ═══════════════════════════════════════════════════════════════════ */
.app-shell { min-height: 100vh; background: var(--color-bg); }

.hdr {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--color-hairline);
}
.hdr-in {
  max-width: var(--shell); margin: 0 auto; height: 60px; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; position: relative;
}

/* identity */
.hdr-brand { display: flex; align-items: center; gap: 10px; justify-self: start; text-decoration: none; color: inherit; cursor: pointer; user-select: none; }
.hdr-mark {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex: none;
  background: none; border: none; border-radius: 0; box-shadow: none;
}
.hdr-mark img { width: 30px; height: 30px; display: block; object-fit: contain; }

/* .brand-mark login.html'de baştan beri kullanılıyordu ama hiç tanımlanmamıştı --
   marka satırı düz bir "N" harfi olarak render oluyordu. */
.login-brand .brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #20232b, #101216);
}
.login-brand .brand-mark img { width: 25px; height: 25px; display: block; }
:root[data-theme="dark"] .login-brand .brand-mark { background: none; border-radius: 0; }
:root[data-theme="dark"] .login-brand .brand-mark img { width: 34px; height: 34px; }
.hdr-word { font-size: 15px; font-weight: 500; letter-spacing: -.02em; color: var(--color-text-dim); white-space: nowrap; }
.hdr-word b { font-weight: 700; color: var(--color-text); }
.hdr-sep { width: 1px; align-self: center; height: 22px; background: var(--color-hairline-strong); flex: none; }
.hdr-env {
  align-self: center; flex: none;
  font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--color-text-faint); background: var(--color-surface-2);
  border: 1px solid var(--color-hairline); border-radius: var(--r-pill); padding: 3px 10px;
}

/* ── Header Site Switcher in Global Nav (Pearl Minimalist Design) ── */
.gnav-switcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}
.gnav-site-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 var(--s4);
  min-height: 0;
  color: var(--color-text-dim);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.12s ease;
  max-width: 240px;
}
.gnav-site-btn::after {
  content: "";
  position: absolute;
  left: var(--s2);
  right: var(--s2);
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  transition: background-color 0.12s;
}
.gnav-site-btn:hover {
  color: var(--color-text);
  background: transparent;
  border-color: transparent;
}
.gnav-site-btn:hover::after {
  background: var(--color-hairline-strong);
}
.gnav-site-btn.active {
  color: var(--color-text);
  font-weight: 600;
  background: transparent;
}
.gnav-site-btn.active::after {
  background: transparent;
}
.gnav-site-btn .hdr-site-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  font-family: var(--font);
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.gnav-site-btn .hdr-site-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.hdr-site-caret-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  margin-left: 2px;
  cursor: pointer;
}
.hdr-site-caret-trigger:hover {
  background: transparent;
}
.hdr-site-caret-trigger * {
  pointer-events: none;
}
.gnav-site-btn .hdr-site-caret {
  color: var(--color-text-faint);
  transition: transform 0.15s ease, color 0.12s ease;
  flex: none;
  pointer-events: none;
}
.gnav-site-btn:hover .hdr-site-caret,
.hdr-site-caret-trigger:hover .hdr-site-caret {
  color: var(--color-text);
}
.gnav-site-btn.open .hdr-site-caret {
  transform: rotate(180deg);
}

/* Site Switcher Dropdown */
.gnav-switcher-wrap .hdr-site-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-width: calc(100vw - 24px);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--r-md);
  box-shadow: var(--lift-menu);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: siteDropdownIn 0.12s ease-out;
}
.gnav-switcher-wrap .hdr-site-dropdown[hidden] {
  display: none !important;
}
@keyframes siteDropdownIn {
  from { opacity: 0; transform: translateY(-3px) translateX(-50%); }
  to { opacity: 1; transform: translateY(0) translateX(-50%); }
}

.hdr-site-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-hairline);
  background: var(--color-surface);
}
.hdr-site-search-wrap svg {
  color: var(--color-text-faint);
  flex: none;
}
.hdr-site-search-wrap input {
  border: none !important;
  background: transparent !important;
  width: 100%;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text);
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-height: auto !important;
  height: 24px;
}
.hdr-site-search-wrap input::placeholder {
  color: var(--color-text-faint);
  font-weight: 400;
}
.hdr-site-search-count {
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--color-text-faint);
  background: var(--color-surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--color-hairline);
  flex: none;
}

.hdr-site-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hdr-site-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease;
  font-size: 13px;
  color: var(--color-text);
  position: relative;
}
.hdr-site-item:hover {
  background: var(--color-surface-2);
}
.hdr-site-item.active {
  background: var(--color-surface-2);
}
.hdr-site-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--color-accent);
}
.hdr-site-item-icon {
  width: 18px;
  height: 18px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.hdr-site-favicon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
.hdr-site-item-domain {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
}
.hdr-site-item.active .hdr-site-item-domain {
  font-weight: 600;
}
.hdr-site-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.hdr-site-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-faint);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  padding: 2px 7px;
  border-radius: 4px;
}
.hdr-site-item.active .hdr-site-mode-pill {
  color: var(--color-text-dim);
  border-color: var(--color-hairline-strong);
}
.hdr-site-check {
  color: var(--color-accent);
  flex: none;
}

.status-dot-sm {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.status-dot-sm.good { background: var(--good); }
.status-dot-sm.warn { background: var(--warn); }
.status-dot-sm.bad { background: var(--bad); }
.status-dot-sm.bad.pulse { animation: pulseDot 1.5s infinite; }

.hdr-site-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hdr-site-empty svg {
  opacity: 0.4;
}

.hdr-site-footer {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-top: 1px solid var(--color-hairline);
  background: var(--color-surface-2);
}
.hdr-site-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 500;
  background: transparent;
  color: var(--color-text-dim);
  border: none;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}
.hdr-site-footer-btn:hover {
  background: var(--color-surface);
  color: var(--color-text);
}
.hdr-site-footer-btn.primary {
  color: var(--color-text);
  font-weight: 600;
}
.hdr-site-footer-btn.primary:hover {
  background: var(--color-surface);
}
.hdr-site-footer-sep {
  width: 1px;
  height: 14px;
  background: var(--color-hairline);
  margin: 0 4px;
  flex: none;
}

/* global menu — centered cleanly in header */
.hdr-nav {
  position: relative;
  display: flex; align-items: stretch; justify-content: center; gap: var(--s2);
  min-width: 0; margin: 0; justify-self: center;
}
.gnav-item {
  position: relative; display: inline-flex; align-items: center;
  background: transparent; border: 0; border-radius: 0;
  padding: 0 var(--s4); min-height: 0; color: var(--color-text-dim);
  font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: color 0.22s ease;
}
.gnav-item::after {
  content: ""; position: absolute; left: var(--s2); right: var(--s2); bottom: -1px;
  height: 2px; border-radius: 2px 2px 0 0; background: transparent; transition: background-color .12s;
}
.gnav-item:hover { color: var(--color-text); background: transparent; border-color: transparent; }
.gnav-item:hover::after { background: var(--color-hairline-strong); }
.gnav-item.active { color: var(--color-text); font-weight: 600; background: transparent; }
.gnav-item.active::after { background: transparent; }

.gnav-indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--color-accent);
  pointer-events: none;
  z-index: 2;
  border-radius: 2px 2px 0 0;
  transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              right 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.15s ease;
  will-change: left, right;
}

/* account cluster */
.hdr-end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; justify-self: end; }
.hdr-health, .status-dot {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border: 0; background: transparent; color: var(--color-text-faint);
  padding: 0 var(--s2); font-size: 13px; min-height: 36px;
}
.hdr-health::before, .status-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent);
}
.hdr-health.down::before, .status-dot.down::before {
  background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent);
}
.hdr-icon, .icon-btn {
  width: 36px; height: 36px; min-height: 36px; padding: 0; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm);
  color: var(--color-text-faint);
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.hdr-icon *, .icon-btn *, #theme-toggle * { pointer-events: none; }
.hdr-icon:hover, .icon-btn:hover { background: var(--color-surface-2); color: var(--color-text); border-color: var(--color-hairline); }

.hdr-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  height: 36px;
  padding: 2px 8px 2px 3px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--color-text-faint);
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.hdr-user:hover,
.hdr-user.open {
  background: var(--color-surface-2);
  border-color: var(--color-hairline);
  color: var(--color-text);
}
.hdr-user:hover .hdr-caret,
.hdr-user.open .hdr-caret {
  color: var(--color-text);
}

/* ── User Avatar (PixelBlast Snapshot Background & Crisp Initials) ── */
.avatar-cyber,
.hdr-avatar,
.prof-avatar,
.user-avatar-badge {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff !important;
  user-select: none;
  flex: none;
  background-color: #06090f;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--av-border, rgba(255, 255, 255, 0.2));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.hdr-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
  letter-spacing: -0.01em;
  pointer-events: none;
}

.prof-avatar {
  width: 56px;
  height: 56px;
  font-size: 20px;
  letter-spacing: -0.02em;
  border: 1.5px solid var(--av-border, rgba(255, 255, 255, 0.25));
}

.hdr-caret { color: var(--color-text-faint); transition: transform .15s ease; pointer-events: none; }
.hdr-user.open .hdr-caret { transform: rotate(180deg); }
.hdr-menu { right: 0; left: auto; width: 220px; padding: 6px; }
.hdr-menu-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px 7px;
}
.hdr-menu-id strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hdr-menu-id span,
.hdr-role-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-dim);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  padding: 2px 7px;
  border-radius: var(--r-pill, 99px);
  text-transform: capitalize;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .hdr-in { display: flex; justify-content: space-between; gap: var(--s2); }
  .hdr-sep, .hdr-env, .hdr-word, .hdr-user-name { display: none; }
  .hdr-health { display: none; }
  .hdr-search-trigger { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .hdr-search-text, .hdr-search-kbd { display: none; }
  .hdr-nav { margin: 0; gap: 4px; }
  .gnav-item { padding: 0 var(--s2); font-size: 13px; }
  .gnav-site-btn { padding: 0 var(--s2); max-width: 180px; }
}

main { display: block; max-width: var(--shell); margin: 0 auto; padding: var(--s8) var(--gutter) var(--s12); min-width: 0; box-sizing: border-box; }

/* section layer — the global level */
.section-panel { display: none; }
.section-panel.active { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); max-width: 100%; box-sizing: border-box; }
.section-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
.section-head h1 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: var(--s5); width: 100%; max-width: 100%; box-sizing: border-box; }
/* ── Dashboard & Section Top Bars ─────────────────────────────── */
.dash-top-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: var(--s5); padding: 12px 18px;
  background: var(--color-surface); border: 1px solid var(--color-hairline); border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  width: 100%; max-width: 100%; box-sizing: border-box;
}
.dash-greeting {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0; flex: 1;
}
.dash-title {
  font-size: 15.5px; font-weight: 700; color: var(--color-text); letter-spacing: -.02em;
}
.dash-subtitle {
  font-size: 12.5px; color: var(--color-text-dim);
  line-height: 1.45;
}
.dash-actions {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}

.admin-top-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: var(--s5); padding: 8px 16px;
  background: var(--color-surface); border: 1px solid var(--color-hairline); border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.admin-top-bar .pagenav {
  margin-bottom: 0; background: transparent; border: 0; padding: 0;
}

/* ── site list (Websites section) ─────────────────────────────────── */
.sites-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--s5);
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.sites-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.sites-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
  max-width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 0 10px;
  height: 34px;
  box-sizing: border-box;
  transition: border-color .15s;
}
.sites-search-wrap:focus-within {
  border-color: var(--color-hairline-strong);
}
.sites-search-wrap svg {
  color: var(--color-text-faint);
  flex: none;
}
.sites-search-wrap input,
#site-search-input {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  height: 100% !important;
  min-height: auto !important;
  width: 100%;
  font-size: 12.5px;
  color: var(--color-text);
  outline: none !important;
  box-shadow: none !important;
}
.sites-search-wrap input:focus,
.sites-search-wrap input:focus-visible,
#site-search-input:focus,
#site-search-input:focus-visible {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.sites-search-wrap input::-webkit-search-decoration,
.sites-search-wrap input::-webkit-search-cancel-button,
.sites-search-wrap input::-webkit-search-results-button,
.sites-search-wrap input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}
.sites-search-wrap input::placeholder {
  color: var(--color-text-faint);
}

/* ── Custom Toolbar Dropdowns ─────────────────────────────────────── */
.custom-dropdown {
  position: relative;
  display: inline-block;
}
.custom-dropdown-btn {
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  outline: none;
  white-space: nowrap;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
}
.custom-dropdown-btn:hover,
.custom-dropdown.open .custom-dropdown-btn {
  border-color: var(--color-hairline-strong);
  background: var(--color-surface);
}
.site-scope-btn {
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  outline: none;
  white-space: nowrap;
  box-sizing: border-box;
}
.site-scope-btn:hover {
  border-color: var(--color-hairline-strong);
  background: var(--color-surface);
}
.site-scope-btn.active {
  border-color: var(--good);
  background: var(--color-surface);
  color: var(--color-text);
}
.dropdown-caret {
  color: var(--color-text-faint);
  transition: transform .2s ease;
  flex: none;
}
.custom-dropdown.open .dropdown-caret {
  transform: rotate(180deg);
}
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 170px;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
  padding: 5px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
:root[data-theme="dark"] .custom-dropdown-menu {
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.55);
}
.custom-dropdown-menu[hidden] {
  display: none !important;
}
.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--color-text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .12s, color .12s;
}
.dropdown-item:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.dropdown-item.active {
  background: var(--color-surface-2);
  color: var(--color-text);
  font-weight: 600;
}

.sites-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
}
.new-site-action-btn {
  height: 34px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
}

/* ── Site Grid & New Card Design ──────────────────────────────────── */
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: var(--s5);
}
.site-card {
  text-align: left;
  cursor: pointer;
  outline: none;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  box-sizing: border-box;
}
.site-card:hover {
  border-color: var(--color-hairline-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}
:root[data-theme="dark"] .site-card:hover {
  box-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.5);
}

.site-card-top-area {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.site-card-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.site-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.site-card-favicon-wrap {
  width: 18px;
  height: 18px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.site-card-favicon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}
.site-card-no-favicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
}
.site-fallback-icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-dim);
  display: block;
}
.site-card-domain {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-card-subline {
  font-size: 12px;
  color: var(--color-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-card-badge-wrap {
  flex: none;
}

.site-card-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--color-hairline);
}
.site-stat-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  background: var(--color-surface-2);
  padding: 7px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--color-hairline);
  box-sizing: border-box;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-text-faint);
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.stat-value {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--color-text);
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
.stat-value.stat-warn {
  color: var(--bad);
}

/* ── Workspace Tab Row with Right-Aligned 'All Sites' Button ──────── */
.workspace-tab-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--color-hairline);
  margin-bottom: var(--s4);
}
.workspace-tab-row .tabstrip {
  margin-bottom: 0;
  border-bottom: 0;
  flex: 1;
  min-width: 0;
}
.tabstrip-all-sites-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: 4px;
  flex: none;
  transition: all .15s ease;
  user-select: none;
}
.tabstrip-all-sites-btn:hover {
  background: var(--color-surface);
  border-color: var(--color-hairline-strong);
}
.tabstrip-all-sites-btn svg,
.tabstrip-all-sites-btn *,
.sl-parent-link svg,
.sl-parent-link * {
  pointer-events: none;
}

/* ── Enhanced Site Overview Layout ───────────────────────────────── */
.summary-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.summary-metric-card {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-mono, monospace);
  line-height: 1.1;
}

.summary-metric-sub {
  font-size: 12px;
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.summary-chart-card {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.summary-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.summary-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.summary-card-subtitle {
  margin: 3px 0 0 0;
  font-size: 12px;
  color: var(--color-text-dim);
}

.summary-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--color-text-dim);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.dot-allowed {
  background: #1a8055;
}

.legend-dot.dot-blocked {
  background: #c2453a;
}

.summary-bottom-grid {
  display: grid;
  grid-template-columns: 2fr 1.1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .summary-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.summary-events-card,
.summary-diagnostics-card {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.summary-diag-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  width: 100%;
}

.summary-diag-actions button {
  min-height: 40px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  transition: none !important;
}

.summary-diag-actions button.secondary,
.summary-diag-actions button.secondary:hover,
.summary-diag-actions button.secondary:focus,
.summary-diag-actions button.secondary:active {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline-strong);
  color: var(--color-text);
  box-shadow: none;
  transform: none;
}

.summary-diag-actions button[data-site-action="cert-issue"] {
  grid-column: span 2;
  min-height: 42px;
  font-weight: 600;
}

.summary-diag-actions button[data-site-action="cert-issue"]:hover,
.summary-diag-actions button[data-site-action="cert-issue"]:focus,
.summary-diag-actions button[data-site-action="cert-issue"]:active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-contrast);
  box-shadow: none;
  transform: none;
}

.summary-events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pulse-dot-live {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 6px var(--good);
}

.summary-events-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 140px;
}

.summary-events-table-wrap table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 12px;
}

.summary-events-table-wrap th {
  text-align: left;
  padding: 8px 10px;
  color: var(--color-text-dim);
  font-weight: 500;
  border-bottom: 1px solid var(--color-hairline);
  white-space: nowrap;
}

.summary-events-table-wrap td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-hairline);
  white-space: nowrap;
  vertical-align: middle;
}

.summary-events-table-wrap tr.row-link {
  cursor: pointer;
}

.summary-events-table-wrap tr.row-link:hover {
  background: var(--color-surface-2);
}

.summary-health-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.summary-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--color-surface-2);
  border-radius: var(--r-sm);
  font-size: 12px;
}

.summary-health-label {
  color: var(--color-text);
  font-weight: 500;
}

/* ── 4-Option Mode Switcher & Purge Cache in Statusline ────────── */
.sl-actions-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex: none;
}
.sl-mode-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.sl-purge-btn,
button#btn-purge-cache {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 148px;
  min-width: 148px;
  max-width: 148px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: var(--r-md);
  border: 1px solid var(--color-hairline);
  background: var(--color-surface-2);
  color: var(--color-text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.sl-purge-btn svg,
button#btn-purge-cache svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.sl-purge-btn span,
button#btn-purge-cache span {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
}
.sl-purge-btn:hover,
button#btn-purge-cache:hover {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.sl-purge-btn:active:not(.purging),
button#btn-purge-cache:active:not(.purging) {
  transform: scale(0.98);
}
.sl-purge-btn.purging,
button#btn-purge-cache.purging {
  opacity: 0.9;
  cursor: wait;
}
.sl-purge-btn.purging svg,
button#btn-purge-cache.purging svg {
  animation: sl-purge-spin 0.8s linear infinite;
}
@keyframes sl-purge-spin {
  100% { transform: rotate(360deg); }
}
.mode-switch-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-dim);
  white-space: nowrap;
}
.mode-btn-group {
  display: inline-flex;
  align-items: center;
  background: var(--color-surface-2);
  padding: 3px;
  border-radius: var(--r-md);
  border: 1px solid var(--color-hairline);
  gap: 2px;
  box-sizing: border-box;
}
.mode-btn-group .mode-toggle-btn,
button.mode-toggle-btn {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: var(--r-sm);
  color: var(--color-text-dim) !important;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform: none;
}
.mode-btn-group .mode-toggle-btn:hover:not(.active),
button.mode-toggle-btn:hover:not(.active) {
  color: var(--color-text) !important;
  background: color-mix(in srgb, var(--color-text) 6%, transparent) !important;
  border-color: transparent !important;
}
.mode-btn-group .mode-toggle-btn:active:not(.active),
button.mode-toggle-btn:active:not(.active) {
  transform: scale(0.97);
}
.mode-btn-group .mode-toggle-btn.active,
button.mode-toggle-btn.active {
  background: var(--color-surface) !important;
  font-weight: 600 !important;
  border-color: var(--color-hairline) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}
:root[data-theme="dark"] .mode-btn-group .mode-toggle-btn.active,
:root[data-theme="dark"] button.mode-toggle-btn.active {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.mode-btn-group .mode-toggle-btn.active::before,
button.mode-toggle-btn.active::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  flex: none;
}
.mode-btn-group .mode-toggle-btn[data-mode="Balanced"].active,
button.mode-toggle-btn[data-mode="Balanced"].active {
  color: #10b981 !important;
}
.mode-btn-group .mode-toggle-btn[data-mode="Balanced"].active::before,
button.mode-toggle-btn[data-mode="Balanced"].active::before {
  background: #10b981;
}
.mode-btn-group .mode-toggle-btn[data-mode="Monitor"].active,
button.mode-toggle-btn[data-mode="Monitor"].active {
  color: #3b82f6 !important;
}
.mode-btn-group .mode-toggle-btn[data-mode="Monitor"].active::before,
button.mode-toggle-btn[data-mode="Monitor"].active::before {
  background: #3b82f6;
}
.mode-btn-group .mode-toggle-btn[data-mode="Under Attack"].active,
button.mode-toggle-btn[data-mode="Under Attack"].active {
  color: #ef4444 !important;
}
.mode-btn-group .mode-toggle-btn[data-mode="Under Attack"].active::before,
button.mode-toggle-btn[data-mode="Under Attack"].active::before {
  background: #ef4444;
}
.mode-btn-group .mode-toggle-btn[data-mode="Off"].active,
button.mode-toggle-btn[data-mode="Off"].active {
  color: var(--color-text-faint) !important;
}
.mode-btn-group .mode-toggle-btn[data-mode="Off"].active::before,
button.mode-toggle-btn[data-mode="Off"].active::before {
  background: var(--color-text-faint);
}

/* ── workspace tabs (variant C) ───────────────────────────────────── */
.tabstrip {
  display: flex; align-items: flex-end; gap: 4px;
  border-bottom: 1px solid var(--color-hairline); margin-bottom: var(--s5);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  position: relative; box-sizing: border-box; height: 37px;
}
.tabstrip::-webkit-scrollbar { display: none; }
.wtab {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap;
  padding: 8px 12px; height: 36px; box-sizing: border-box; font-size: 13px; font-weight: 500;
  color: var(--color-text-dim); background: transparent;
  border: 1px solid transparent; border-bottom: 0;
  border-radius: var(--r-sm) var(--r-sm) 0 0; margin-bottom: -1px; flex: none;
}
.wtab:hover { background: var(--color-surface-2); color: var(--color-text); border-color: transparent; }
.wtab.active {
  background: var(--color-surface); color: var(--color-text); font-weight: 600;
  border-color: var(--color-hairline); border-bottom: 1px solid var(--color-surface);
}
.wtab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex: none; }
.wtab-dot.bad { background: var(--bad); }
.wtab-dot.warn { background: var(--warn); }
.wtab-dot.danger { background: var(--bad) !important; box-shadow: 0 0 6px var(--bad); }

/* ── Under Attack Pulsing Red Theme ─────────────────────────────── */
@keyframes pulse-red-border {
  0% {
    border-color: rgba(239, 68, 68, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25), 0 0 16px rgba(239, 68, 68, 0.2) !important;
  }
  50% {
    border-color: rgba(239, 68, 68, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1), 0 0 6px rgba(239, 68, 68, 0.05) !important;
  }
  100% {
    border-color: rgba(239, 68, 68, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25), 0 0 16px rgba(239, 68, 68, 0.2) !important;
  }
}

.site-card.under-attack,
.statusline.under-attack,
.hero-summary-banner.under-attack,
.wtab.under-attack {
  border-color: var(--bad) !important;
  animation: pulse-red-border 2s infinite ease-in-out !important;
  background: color-mix(in srgb, var(--bad) 5%, var(--color-surface)) !important;
}

.pill-danger {
  background: var(--bad-soft) !important;
  color: var(--bad) !important;
  border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent) !important;
  font-weight: 700;
  letter-spacing: .04em;
}

.pulse-red {
  animation: pulse-red-glow 1.5s infinite;
}

@keyframes pulse-red-glow {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.wtab-x {
  display: grid; place-items: center; width: 18px; height: 18px; min-height: 18px; padding: 0;
  border: 0; background: transparent; color: var(--color-text-faint);
  border-radius: 4px; font-size: 14px; line-height: 1;
}
.wtab-x:hover { background: var(--ink-200); color: var(--color-text); border-color: transparent; }
:root[data-theme="dark"] .wtab-x:hover { background: var(--color-hairline-strong); }
.wtab-add {
  height: 36px; box-sizing: border-box; padding: 0 10px; font-size: 16px;
  background: transparent; border: 0; color: var(--color-text-faint);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  border-radius: var(--r-sm) var(--r-sm) 0 0; margin-bottom: -1px; flex: none;
}
.wtab-add:hover { background: var(--color-surface-2); color: var(--color-text); border-color: transparent; }

/* site status line + the site's own page menu */
.statusline {
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  padding: 12px 18px; margin-bottom: var(--s4);
  background: var(--color-surface); border: 1px solid var(--color-hairline); border-radius: var(--r-md);
  font-size: 12.5px; color: var(--color-text-faint); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.sl-breadcrumb {
  display: flex; align-items: center; gap: 8px;
}
.sl-parent-link,
button.sl-parent-link {
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px !important;
  padding: 3px 6px !important;
  margin: 0 !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: var(--color-text-dim) !important;
  cursor: pointer !important;
  transition: color 0.15s ease, background-color 0.15s ease !important;
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
}
.sl-parent-link:hover,
button.sl-parent-link:hover {
  color: var(--color-text) !important;
  background: color-mix(in srgb, var(--color-text) 8%, transparent) !important;
  border-color: transparent !important;
}
.sl-parent-link:active,
button.sl-parent-link:active {
  transform: scale(0.97) !important;
}
.sl-slash { color: var(--color-text-faint); font-weight: 400; font-size: 13px; }
.statusline b { font-weight: 500; color: var(--color-text-dim); }
.statusline .sl-name { font-size: 15.5px; font-weight: 700; color: var(--color-text); letter-spacing: -.02em; }
.statusline .sl-actions { margin-left: auto; display: flex; gap: var(--s2); flex-wrap: wrap; }

.pagenav {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 0 var(--s3);
  margin-bottom: var(--s5);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  overflow-x: auto;
  scrollbar-width: none;
}
.pagenav::-webkit-scrollbar { display: none; }
.pagenav-item {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 11px 12px;
  min-height: 42px;
  color: var(--color-text-dim);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.22s ease;
}
.pagenav-item:hover {
  color: var(--color-text);
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--color-hairline-strong);
}
.pagenav-item.active {
  color: var(--color-text);
  font-weight: 600;
  background: transparent;
  border-bottom-color: transparent;
}
.pagenav-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  pointer-events: none;
  z-index: 2;
  transition: left 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              right 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.15s ease;
  will-change: left, right;
}

/* legacy chrome that no longer has a place — neutralised */
.sidebar, .sidebar-sites, .sidebar-title, .sidebar-subnav, .site-switcher, .site-context, .new-site-button, .topbar { display: none !important; }

/* ── cards & panels ───────────────────────────────────────────────── */
.tab-panel { display: none; max-width: 100%; box-sizing: border-box; }
.tab-panel.active { display: block; max-width: 100%; }

.panel, .settings-card, .tool-card, .stat, .activation-summary, .activation-step, .mini-item,
.chart-container-box, .monitor-table-box, .rule-catalog-container, .stat-card, .stat-card-enhanced,
.hero-summary-banner, .policy-toggle-card, .toggle-row, .category-group, .rule-item, .dns-record-card {
  background: var(--color-surface); border: 1px solid var(--color-hairline); border-radius: var(--r-md);
  transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), border-color .18s ease, box-shadow .18s ease;
}
.site-card:hover, .stat-card:hover, .tool-card:hover, .dns-record-card:hover {
  border-color: var(--color-hairline-strong);
  transform: translateY(-1.5px);
  box-shadow: 0 8px 24px -4px rgba(19, 20, 23, 0.05), 0 2px 6px -1px rgba(19, 20, 23, 0.03);
}

/* ── Watermelon UI: Input OTP (input-otp-2) ─────────────────────────── */
.otp-container {
  display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; margin: 12px 0;
}
.otp-group {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
}
.otp-slot {
  width: 50px; height: 56px; border-radius: var(--r-sm);
  border: 1px solid var(--color-hairline-strong); background: var(--color-surface);
  color: var(--color-text); font-family: var(--font-mono); font-size: 22px; font-weight: 700;
  text-align: center; line-height: 56px; outline: none; caret-color: var(--color-accent);
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s cubic-bezier(0.16, 1, 0.3, 1);
}
.otp-slot:hover { border-color: var(--color-hairline-strong); }
.otp-slot:focus, .otp-slot.active {
  border-color: var(--color-hairline-strong);
  box-shadow: none !important;
  outline: none !important;
  transform: none;
}
.otp-timer-bar {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  font-size: 12.5px; color: var(--color-text-faint); margin-top: 4px;
}
.otp-resend-btn {
  background: transparent; border: 0; color: var(--color-accent); font-weight: 600;
  font-size: 12.5px; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  min-height: auto;
}
.otp-resend-btn:disabled { color: var(--color-text-faint); cursor: not-allowed; text-decoration: none; }

/* ── Watermelon UI: Pagination (pagination-8) ──────────────────────── */
.pagination-8 {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: var(--color-surface); border: 1px solid var(--color-hairline);
  border-radius: var(--r-md); font-size: 13px; margin-top: 14px; flex-wrap: wrap;
}
.pagination-info { color: var(--color-text-dim); font-size: 12.5px; }
.pagination-list { display: flex; align-items: center; gap: 6px; }
.page-link {
  min-width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--color-hairline);
  background: var(--color-surface); color: var(--color-text); display: inline-flex;
  align-items: center; justify-content: center; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all .15s ease; text-decoration: none; padding: 0 8px;
}
.page-link:hover { background: var(--color-surface-2); border-color: var(--color-hairline-strong); }
.page-link.active {
  background: var(--color-accent); color: var(--color-accent-contrast); border-color: var(--color-accent);
  font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.page-link.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.page-ellipsis-btn {
  color: var(--color-text-faint);
  font-weight: 700;
  position: relative;
}

.page-jump-popover {
  position: fixed;
  background: var(--color-surface, #181b21);
  border: 1px solid var(--color-hairline-strong, #333846);
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: popoverFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-jump-popover::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--color-hairline-strong, #333846) transparent transparent transparent;
}

.page-jump-popover::after {
  content: "";
  position: absolute;
  top: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-surface, #181b21) transparent transparent transparent;
}

.page-jump-mini-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.page-jump-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-faint);
  padding-left: 2px;
}

.page-jump-mini-input {
  width: 58px;
  height: 28px;
  padding: 0 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--color-surface-2);
  color: var(--color-text);
  border: 1px solid var(--color-hairline-strong);
  border-radius: 5px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  -moz-appearance: textfield;
  appearance: textfield;
}

.page-jump-mini-input::-webkit-outer-spin-button,
.page-jump-mini-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.page-jump-mini-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

.page-jump-mini-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-accent);
  color: var(--color-accent-contrast, #fff);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s ease;
}
.page-jump-mini-btn:hover {
  opacity: 0.9;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translate(-50%, 4px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.panel { padding: var(--s5); margin-bottom: var(--s4); }
.empty-panel { min-height: 260px; display: grid; align-content: center; justify-items: center; text-align: center; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); margin-bottom: var(--s3); }
.panel-head p { margin-bottom: 0; font-size: 13px; }

.settings-card { padding: var(--s6); display: flex; flex-direction: column; gap: var(--s4); }
.settings-card h3 { margin: 0; font-size: 15px; font-weight: 600; }
.settings-card p { margin: 0; font-size: 13px; color: var(--color-text-dim); }
.settings-section { display: grid; gap: var(--s5); margin-bottom: var(--s6); }
.settings-row { display: grid; grid-template-columns: 240px 1fr; gap: var(--s6); padding-bottom: var(--s5); border-bottom: 1px solid var(--color-hairline); }
.settings-meta { display: flex; flex-direction: column; gap: 4px; }
.settings-meta h4 { margin: 0; font-size: 14px; font-weight: 600; }
.settings-meta p { margin: 0; font-size: 12.5px; color: var(--color-text-faint); }
.settings-control { display: flex; flex-direction: column; gap: var(--s3); max-width: 620px; }
.settings-control input, .settings-control select, .settings-control textarea { width: 100%; }
.settings-grid { display: grid; grid-template-columns: 1fr; gap: var(--s2); margin-bottom: var(--s3); }
.panel-grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--s5); }
.form-grid { display: grid; grid-template-columns: 1.2fr .7fr .7fr auto; gap: var(--s3); align-items: end; }
.admin-origin { grid-template-columns: 1fr auto; margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--color-hairline); }

.tool-card { padding: var(--s5); margin-bottom: var(--s3); }
.tool-card h3 { margin: 0 0 6px; font-size: 15px; }
.tool-card p { margin-bottom: var(--s3); font-size: 13px; }
.mini-list { display: grid; gap: var(--s2); }
.mini-item { padding: var(--s3); }
.mini-item span { display: block; margin-top: 4px; color: var(--color-text-faint); font-size: 12px; }
.subtle { background: var(--color-surface-2); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.cards.compact { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stat { padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.stat span { display: block; color: var(--color-text-faint); font-size: 12px; margin: 0; }
.stat strong { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; overflow-wrap: anywhere; }
.stat small { display: block; color: var(--color-text-faint); font-size: 12px; line-height: 1.4; }

.activation-flow { display: grid; gap: var(--s2); }
#activation-flow { margin-bottom: 16px; }
#activation-flow:empty { display: none; margin-bottom: 0; padding: 0; border: none; }
.activation-summary { padding: var(--s4); }
.activation-summary p { margin: var(--s2) 0 0; font-size: 13px; }
.activation-step { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); }
.activation-step strong { display: block; margin-bottom: 3px; font-weight: 600; }
.activation-step span { color: var(--color-text-faint); font-size: 12.5px; overflow-wrap: anywhere; }
.activation-step.complete { border-color: color-mix(in srgb, var(--good) 35%, transparent); background: var(--good-soft); }
.activation-step.blocked { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-soft); }

.toggle-row { display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: var(--s3); }
.toggle-row input { min-height: auto; width: auto; }
.waf-test { display: grid; gap: var(--s2); margin-bottom: var(--s2); }

/* hero / summary */
.hero-summary-banner {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  flex-wrap: wrap; padding: var(--s5) var(--s6); margin-bottom: var(--s4);
}
.hero-summary-domain { font-size: 20px; font-weight: 600; letter-spacing: -.025em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pulse-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500;
  padding: 3px 9px; border-radius: var(--r-pill); background: var(--good-soft); color: var(--good); border: 0;
}
.pulse-badge-danger { background: var(--bad-soft) !important; color: var(--bad) !important; border-color: transparent !important; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
@keyframes pulse-glow { from { opacity: .45; } to { opacity: 1; } }
.pulse-dot { animation: pulse-glow 1.6s infinite alternate; }

.stat-card-enhanced { padding: var(--s4) var(--s5); }
.stat-card-title { font-size: 12px; font-weight: 500; color: var(--color-text-faint); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; text-transform: none; letter-spacing: 0; }
.stat-card-value { font-size: 20px; font-weight: 600; letter-spacing: -.025em; overflow-wrap: anywhere; }
.stat-card-note { font-size: 11.5px; color: var(--color-text-faint); margin-top: 5px; line-height: 1.4; }

/* ── monitoring surfaces (global + per-site share this vocabulary) ── */
.mon-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap;
  padding: var(--s3) var(--s4);
  background: var(--color-surface); border: 1px solid var(--color-hairline); border-radius: var(--r-md);
}
.mon-toolbar-left, .mon-toolbar-right { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.inline-field { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--color-text-faint); }
.inline-field select { min-height: 32px; font-size: 12.5px; }
#traffic-vectors-chart, #site-vectors-chart { touch-action: pan-y; }
.health-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--good-soft); color: var(--good); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.health-chip.alert { background: var(--bad-soft); color: var(--bad); }
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.health-chip.alert .health-dot { animation: pulse-glow 1.4s infinite alternate; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 0;
}

.kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.kpi::before {
  display: none;
}

.tab-panel[data-panel="monitor"] .stack,
[data-section="monitor"] .stack {
  gap: 14px;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1.2;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-mono, monospace);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.kpi-note {
  font-size: 12px;
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  line-height: 1.3;
}

.kpi-good .kpi-value {
  color: var(--good);
}

.kpi-bad .kpi-value {
  color: var(--bad);
}

.kpi-warn .kpi-value {
  color: var(--warn);
}

.mon-split { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: var(--s4); align-items: stretch; }
.mon-split-even { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); align-items: stretch; }
.mon-split-rules { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s4); align-items: stretch; }
.mon-split > .settings-card, .mon-split-even > .settings-card, .mon-split-rules > .settings-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.mon-split > .settings-card:first-child .chart-box {
  flex: 1;
  min-height: 260px;
  height: 100%;
}

.mon-split-even .table-wrap, .mon-split .table-wrap { --tbl-min: 0px; max-width: 100%; overflow-x: auto; }
.mon-split-even .table-wrap > table, .mon-split .table-wrap > table { min-width: 100%; table-layout: fixed; }

.mon-split-even table th, .mon-split-even table td,
.mon-split table th, .mon-split table td {
  padding: 6px 8px;
  font-size: 12px;
}
.mon-split-even table th, .mon-split table th {
  padding-bottom: 5px;
}
.mon-split-even table td code, .mon-split table td code {
  font-size: 11px;
  padding: 1px 4px;
  max-width: 100%;
}
.mon-split-even table td .pill, .mon-split table td .pill {
  font-size: 11px;
  padding: 1px 6px;
}

@media (max-width: 1000px) { .mon-split, .mon-split-even, .mon-split-rules { grid-template-columns: 1fr; } }
/* Grafik yüksekliği kartın genişliğiyle birlikte büyür. Sabit yükseklikte
   kalınca kart genişledikçe kazanılan yer ölü boşluğa dönüşüyordu: donut
   yüksekliğe sıkışıp küçük kalıyor, sağdaki açıklama listesiyle arasında
   kocaman bir aralık açılıyordu. */
.chart-box { height: clamp(280px, 22vw, 400px); position: relative; margin-top: 6px; }
.chart-box-sm { height: clamp(210px, 15vw, 300px); }

/* action breakdown bars — a compact legend that doubles as a chart */
.bar-list { display: flex; flex-direction: column; gap: var(--s2); }
.bar-row { display: grid; grid-template-columns: minmax(0, 148px) minmax(60px, 1fr) 52px; align-items: center; gap: var(--s3); font-size: 12.5px; }
.rules-bar-list .bar-row { grid-template-columns: minmax(0, 260px) minmax(60px, 1fr) 52px; }
.compact-bar-list .bar-row { grid-template-columns: minmax(0, 72px) minmax(60px, 1fr) 52px; }
.clickable-rule-row { cursor: pointer; border-radius: var(--r-sm); padding: 2px 4px; transition: background .15s ease; }
.clickable-rule-row:hover { background: var(--color-surface-2); }
.clickable-rule-name { color: var(--color-accent); font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.clickable-rule-name:hover { color: var(--color-accent-hover); }
.bar-row .bar-name { color: var(--color-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Her ikisi de <span>: dolgu satır içi kaldığı için width/height hiç
   uygulanmıyordu ve bar hep boş görünüyordu. İz, ızgara öğesi olduğu için
   kendiliğinden bloklaşıyor; dolguya display'i açıkça vermek gerekiyor. */
.bar-track { display: block; height: 6px; border-radius: var(--r-pill); background: var(--color-surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; min-width: 3px; border-radius: var(--r-pill); background: var(--color-text-faint); transition: width .3s ease; }
.bar-fill.good { background: var(--good); }
.bar-fill.bad { background: var(--bad); }
.bar-fill.warn { background: var(--warn); }
.bar-fill.info { background: var(--info); }
.bar-row .bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text); font-weight: 600; }

.monitor-grid { display: grid; gap: var(--s4); }
.monitor-header { padding-bottom: var(--s3); border-bottom: 1px solid var(--color-hairline); margin-bottom: var(--s2); }
.monitor-header h3 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: var(--s3); }
.stat-card { padding: var(--s4) var(--s5); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--color-hairline-strong); }
.stat-card.total-traffic::before { background: var(--good); }
.stat-card.threat-blocked::before { background: var(--bad); }
.stat-card.captcha-challenges::before { background: var(--warn); }
.stat-card.rate-limits::before { background: var(--info); }
.stat-card span { display: block; color: var(--color-text-faint); font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; margin-bottom: 5px; }
.stat-card strong { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.stat-card small { display: block; margin-top: 5px; color: var(--color-text-faint); font-size: 11.5px; }
.chart-section { margin-top: var(--s2); }
.chart-container-box, .monitor-table-box { padding: var(--s5); }
.chart-container-box h4, .monitor-table-box h4 { font-size: 13px; font-weight: 600; color: var(--color-text); margin: 0 0 var(--s3); text-transform: none; letter-spacing: 0; }

/* WAF rule catalog */
.rule-catalog-container { padding: var(--s5); }
.rule-catalog-container h3 { font-size: 15px; font-weight: 600; margin: 0; }
.catalog-toolbar { display: flex; align-items: center; gap: var(--s2); }
.catalog-toolbar input[type="text"] { min-height: 32px; font-size: 12.5px; }
.catalog-filters { display: flex; gap: var(--s2); flex-wrap: wrap; border-bottom: 1px solid var(--color-hairline); padding-bottom: var(--s3); margin: var(--s3) 0 var(--s4); }
.filter-btn {
  min-height: 28px; padding: 0 12px; font-size: 12px; font-weight: 500;
  background: var(--color-surface); color: var(--color-text-dim); border: 1px solid var(--color-hairline-strong);
}
.filter-btn:hover { background: var(--color-surface-2); color: var(--color-text); border-color: var(--color-hairline-strong); }
.filter-btn.active { background: var(--color-accent); color: var(--color-accent-contrast); border-color: var(--color-accent); font-weight: 600; }

.category-group { overflow: hidden; margin-bottom: var(--s2); width: 100%; flex-shrink: 0; }
.category-group:hover { border-color: var(--color-hairline); }
.category-header { display: flex; justify-content: space-between; align-items: center; padding: var(--s3) var(--s4); cursor: pointer; user-select: none; min-height: 48px; }
.category-header:hover { background: var(--color-surface-2); }
.category-title-wrapper { display: flex; align-items: center; gap: var(--s2); }
.category-title-text { font-size: 13.5px; font-weight: 600; color: var(--color-text); }
.category-count-badge { font-size: 11px; font-weight: 500; color: var(--color-text-faint); background: var(--color-surface-2); padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--color-hairline); }
.category-header .chevron { font-size: 10px; color: var(--color-text-faint); transition: transform .15s ease; }
.category-group.open .category-header .chevron { transform: rotate(90deg); color: var(--color-text); }
.category-rules { display: none; flex-direction: column; gap: var(--s2); padding: var(--s3); background: var(--color-surface-2); border-top: 1px solid var(--color-hairline); }
.category-group.open .category-rules { display: flex; }

.rule-item { padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s2); width: 100%; }
.rule-item:hover { border-color: var(--color-hairline); }
.rule-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); }
.rule-item-main-info { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.rule-meta-line { display: flex; align-items: center; gap: var(--s2); font-size: 11px; color: var(--color-text-faint); flex-wrap: wrap; }
.rule-meta-id { font-family: var(--font-mono); font-weight: 500; color: var(--color-text-dim); }
.rule-meta-dot { color: var(--color-hairline-strong); font-size: 8px; }
.rule-meta-type { font-weight: 600; color: var(--color-text-faint); letter-spacing: .03em; }
.rule-meta-score { font-weight: 500; color: var(--color-text-faint); }
.rule-meta-req { font-weight: 600; color: var(--bad); letter-spacing: .03em; }
.rule-title { font-size: 13.5px; font-weight: 500; color: var(--color-text); line-height: 1.45; }
.rule-pattern-box { display: flex; align-items: flex-start; gap: var(--s2); background: var(--code-bg); border: 1px solid var(--color-hairline); border-radius: var(--r-sm); padding: var(--s2) var(--s3); font-size: 12px; width: 100%; }
.rule-pattern-label { font-size: 10px; font-weight: 600; color: var(--color-text-faint); letter-spacing: .05em; padding-top: 2px; flex-shrink: 0; }
.rule-pattern-code, .rule-pattern-box code { font-family: var(--font-mono); font-size: 11.5px; color: var(--color-text-dim); line-height: 1.5; word-break: break-all; overflow-wrap: anywhere; white-space: pre-wrap; flex: 1; display: block; background: transparent; border: 0; padding: 0; max-width: none; }

/* toggle switch — genuinely a switch, high contrast in both dark & light mode */
.toggle-switch, .rule-toggle-switch { position: relative; display: inline-flex; align-items: center; width: 36px; height: 20px; flex: none; cursor: pointer; vertical-align: middle; }
.toggle-switch input, .rule-toggle-switch input { opacity: 0; width: 0; height: 0; min-height: auto; position: absolute; margin: 0; }
.slider, .toggle-slider { position: absolute; inset: 0; cursor: pointer; background: #e3e6ea; border: 1px solid #c9ccd2; border-radius: 999px; transition: background .2s ease, border-color .2s ease; box-sizing: border-box; }
:root[data-theme="dark"] .slider, :root[data-theme="dark"] .toggle-slider { background: #1c212b; border-color: #333a47; }
.slider:before, .toggle-slider:before { content: ""; position: absolute; height: 14px; width: 14px; left: 2px; top: 50%; transform: translateY(-50%); background: #8a8d94; border-radius: 50%; transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1), background-color .2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
:root[data-theme="dark"] .slider:before, :root[data-theme="dark"] .toggle-slider:before { background: #5c6575; }

/* ON State — in dark mode, track is solid white; in light mode, track is solid dark */
input:checked + .slider, input:checked + .toggle-slider { background: #131417 !important; border-color: #131417 !important; }
input:checked + .slider:before, input:checked + .toggle-slider:before { transform: translate(16px, -50%) !important; background: #ffffff !important; }

:root[data-theme="dark"] input:checked + .slider, :root[data-theme="dark"] input:checked + .toggle-slider { background: #ffffff !important; border-color: #ffffff !important; }
:root[data-theme="dark"] input:checked + .slider:before, :root[data-theme="dark"] input:checked + .toggle-slider:before { transform: translate(16px, -50%) !important; background: #090b0e !important; }

/* policy toggles / mode buttons */
.policy-toggle-card { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4); }
.policy-toggle-card:hover { border-color: var(--color-hairline); }
.policy-toggle-info { display: flex; flex-direction: column; gap: 3px; }
.policy-toggle-label-row { display: flex; align-items: center; gap: var(--s2); }
.policy-toggle-title { font-size: 13.5px; font-weight: 600; color: var(--color-text); }
.policy-toggle-status { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: var(--r-pill); letter-spacing: .03em; text-transform: uppercase; }
.policy-toggle-status.active { background: var(--good-soft); color: var(--good); border: 0; }
.policy-toggle-status.inactive { background: var(--color-surface-2); color: var(--color-text-faint); border: 1px solid var(--color-hairline); }
.policy-toggle-desc { font-size: 12px; color: var(--color-text-faint); }
.policy-mode-section { display: flex; flex-direction: column; gap: var(--s2); width: 100%; }
.mode-buttons-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); width: 100%; }
@media (max-width: 900px) {
  .mode-buttons-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .mode-buttons-grid { grid-template-columns: 1fr; }
}
.mode-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 12px 14px; min-height: 0;
  width: 100%; box-sizing: border-box;
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-hairline-strong); border-radius: var(--r-md);
  cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease;
  white-space: normal;
}
.mode-btn:hover { background: var(--color-surface-2); border-color: var(--color-hairline-strong); }
.mode-btn.active { background: var(--color-accent); border-color: var(--color-accent); }
.mode-btn-title {
  font-size: 13px; font-weight: 600; color: var(--color-text);
  line-height: 1.35; width: 100%; white-space: normal; word-break: normal; overflow-wrap: break-word;
}
.mode-btn.active .mode-btn-title, .mode-btn.active .mode-btn-desc { color: var(--color-accent-contrast); }
.mode-btn-desc {
  font-size: 11.5px; color: var(--color-text-faint); line-height: 1.4;
  width: 100%; white-space: normal; word-break: normal; overflow-wrap: break-word;
}

/* badges on tabs / rows */
.site-chip-title-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip-badge { display: inline-block; font-size: 9.5px; font-weight: 600; letter-spacing: .03em; padding: 2px 6px; border-radius: var(--r-pill); text-transform: uppercase; line-height: 1.5; }
.chip-badge-danger { background: var(--bad-soft); color: var(--bad); border: 0; }
.chip-badge-warning { background: var(--warn-soft); color: var(--warn); border: 0; }

/* terminal output */
.terminal-box { border: 1px solid var(--color-hairline); border-radius: var(--r-md); background: var(--code-bg); overflow: hidden; margin-top: var(--s3); }
.terminal-header { display: flex; align-items: center; gap: 6px; padding: var(--s2) var(--s4); background: var(--color-surface-2); border-bottom: 1px solid var(--color-hairline); }
.terminal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.terminal-dot.red { background: var(--bad); }
.terminal-dot.yellow { background: var(--warn); }
.terminal-dot.green { background: var(--good); }
.terminal-title { margin-left: 6px; font-size: 11px; font-family: var(--font-mono); color: var(--color-text-faint); letter-spacing: .03em; }
.terminal-box pre { margin: 0; border: 0; border-radius: 0; background: transparent; padding: var(--s4); font-size: 12px; }

/* list rows rendered by app.js */
.list-item-row { display: flex; justify-content: space-between; align-items: center; padding: var(--s2) var(--s3); border: 1px solid var(--color-hairline); border-radius: var(--r-sm); background: var(--color-surface); margin-bottom: 6px; }
.list-item-row:hover { border-color: var(--color-hairline); }

/* ── dialog / onboarding wizard ───────────────────────────────────── */
dialog {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid var(--color-hairline); border-radius: var(--r-lg);
  padding: 0; background: var(--color-surface); color: var(--color-text);
  box-shadow: var(--lift-modal);
}
dialog::backdrop { background: rgba(19, 20, 23, 0.42); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
#modal-pf-2fa-setup::backdrop { background: rgba(19, 20, 23, 0.42); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.modal-body { padding: var(--s6); display: grid; gap: var(--s5); }
.modal-grid { display: grid; gap: var(--s4); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.modal-head button.close-modal-btn { background: transparent; color: var(--color-text-faint); border: 0; min-height: 30px; padding: 0 10px; font-weight: 500; }
.modal-head button.close-modal-btn:hover { background: var(--color-surface-2); color: var(--color-text); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.modal-actions button { width: 100%; min-height: 38px; font-weight: 600; }
#site-form { display: grid; gap: var(--s4); padding: var(--s6); }
.instruction-text { color: var(--color-text-dim) !important; font-size: 13px; }

.dns-record-card { padding: var(--s4); display: grid; gap: var(--s3); }
.dns-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); font-size: 13px; }
.dns-label { color: var(--color-text-faint); font-weight: 500; }
.dns-value { font-family: var(--font-mono); font-size: 12.5px; color: var(--color-text); font-weight: 500; }
.type-badge { background: var(--color-surface-2); color: var(--color-text); border: 1px solid var(--color-hairline); padding: 2px 8px; border-radius: var(--r-sm); font-size: 11px; font-weight: 600; font-family: var(--font); }
.dns-value.highlight { color: var(--color-text); font-weight: 600; }
.dns-status-pill { padding: var(--s3); border-radius: var(--r-sm); font-size: 13px; font-weight: 500; text-align: center; border: 1px solid transparent; }
.dns-status-pill.status-querying { background: var(--warn-soft); color: var(--warn); }
.dns-status-pill.status-success { background: var(--good-soft); color: var(--good); }
.dns-status-pill.status-error { background: var(--bad-soft); color: var(--bad); }
.dns-error-pre { font-family: var(--font-mono); font-size: 11px; margin: 0; padding: var(--s3); min-height: auto; background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent); border-radius: var(--r-sm); max-height: 110px; line-height: 1.45; }

/* ── login — split screen, edge to edge, no dead margins ─────────────
   Left: wide dark ink-950 brand panel carrying the PixelBlast canvas
   (same ink on both themes -- it does not follow --color-bg, it IS the
   accent surface). Right: a narrow fixed-ish strip pinned to the page
   edge so the form sits close to the corner instead of floating in the
   middle of a half-screen column. Collapses to a compact top bar under
   860px so the phone view stays full-bleed instead of shrinking the
   brand panel into an unreadable sliver. */
body.login-split { min-height: 100vh; display: grid; grid-template-columns: 1fr clamp(400px, 32vw, 480px); }

.login-aside { position: relative; overflow: hidden; background: var(--ink-950); color: var(--white); }
:root[data-theme="dark"] .login-aside { background: #08090a; border-right: 1px solid var(--color-hairline); }

/* PixelBlast mounts its canvas here (assets/pixel-blast.js); pointer-events
   stay off the content layer above so click ripples still reach it. */
.login-aside-bg { position: absolute; inset: 0; z-index: 0; }

.login-aside-content {
  position: relative; z-index: 1; height: 100%; pointer-events: none;
  display: flex; flex-direction: column;
  padding: var(--s10) clamp(var(--s6), 4vw, var(--s10));
}

.login-aside-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.login-aside-brand img { width: 32px; height: 32px; display: block; }
.login-aside-brand strong { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.02em; color: var(--white); }
.login-aside-brand span { display: block; font-size: 12px; color: rgba(255,255,255,.55); }

.login-aside-mid { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 460px; }
.login-tagline { margin: 0 0 var(--s6); font-size: clamp(26px, 3vw, 36px); line-height: 1.28; font-weight: 600; letter-spacing: -.02em; color: var(--white); }
.login-feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.login-feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.72); }
.login-feature-list li::before { content: "✓"; flex: none; color: var(--good); font-weight: 700; }
:root[data-theme="dark"] .login-feature-list li::before { color: #4ec38a; }

.login-main { display: flex; align-items: center; justify-content: center; padding: var(--s5); background: var(--color-bg); }
.login-form-wrap { width: 100%; max-width: 336px; }
.login-form-wrap h1 { font-size: 22px; margin-bottom: var(--s2); }
.login-form-wrap > div > p { color: var(--color-text-dim); font-size: 13.5px; line-height: 1.5; }
.login-form { display: grid; gap: var(--s4); margin: var(--s6) 0 0; }
.login-form input { min-height: 38px; }
.login-form button { width: 100%; min-height: 38px; font-weight: 600; }
.login-error { margin: 0; border: 0; border-radius: var(--r-sm); background: var(--bad-soft); color: var(--bad); padding: var(--s3); font-size: 13px; }

.login-back-btn { width: 100%; background: transparent; border: 0; color: var(--color-text-dim); font-weight: 500; min-height: 34px; }
.login-back-btn:hover { color: var(--color-text); background: var(--color-surface-2); }

.otp-group { display: flex; gap: var(--s2); justify-content: space-between; }
.otp-slot { width: 100%; aspect-ratio: 1; padding: 0; text-align: center; font-family: var(--font-mono); font-size: 19px; font-weight: 600; }
.otp-slot.active { border-color: var(--color-accent); }

.otp-timer-bar { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--color-text-faint); }
.otp-resend-btn { background: none; border: 0; min-height: auto; padding: 0; color: var(--color-text); font-weight: 500; font-size: 12.5px; }
.otp-resend-btn:hover { background: none; text-decoration: underline; }
.otp-resend-btn:disabled { color: var(--color-text-faint); }

.login-footer { margin-top: var(--s6); text-align: center; font-size: 12px; color: var(--color-text-faint); }
.login-footer a { color: var(--color-text-faint); }
.login-footer a:hover { color: var(--color-text); }

@media (max-width: 860px) {
  body.login-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-aside-content { flex-direction: row; align-items: center; padding: var(--s5) var(--gutter); }
  .login-aside-mid { display: none; }
  .login-main { padding: var(--s6) var(--gutter) var(--s8); }
}

/* ── floating: dropdown / toast ───────────────────────────────────── */
.menu-wrap { position: relative; }
.menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: 260px;
  background: var(--color-surface); border: 1px solid var(--color-hairline);
  border-radius: var(--r-md); box-shadow: var(--lift-menu); padding: var(--s2);
  display: flex; flex-direction: column; gap: 1px;
}
.menu.hdr-menu, #user-menu { right: 0 !important; left: auto !important; width: 220px !important; }
.menu-label { padding: 7px 9px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-faint); }
.menu-row {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; justify-content: flex-start;
  padding: 8px 9px; min-height: 34px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--color-text); font-size: 13px; font-weight: 500;
}
.menu-row:hover { background: var(--color-surface-2); border-color: transparent; }
.menu-row.active { font-weight: 600; background: var(--color-surface-2); }

.toast {
  position: fixed; bottom: var(--s6); left: 50%; transform: translateX(-50%); z-index: 70;
  background: var(--ink-950); color: var(--white); padding: 10px 16px; font-size: 13px;
  border-radius: var(--r-pill); box-shadow: var(--lift-modal); max-width: 420px;
}
:root[data-theme="dark"] .toast { background: var(--white); color: var(--ink-950); }

/* ── Global Omni Search Header Trigger & Modal ────────────────────── */
.hdr-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 0 12px;
  height: 36px;
  font-size: 13px;
  color: var(--color-text-dim);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  width: 270px;
  max-width: 100%;
}
.hdr-search-trigger:hover {
  background: var(--color-surface);
  border-color: var(--color-hairline-strong);
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.hdr-search-trigger svg {
  color: var(--color-text-faint);
  flex: none;
  width: 15px;
  height: 15px;
}
.hdr-search-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  flex: 1;
}
.hdr-search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: 4px;
  color: var(--color-text-faint);
  margin-left: auto;
  flex: none;
  line-height: 1.2;
}

/* Omni Search Modal Backdrop */
.omni-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 11, 14, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 70px 16px 20px;
  animation: omniFadeIn 0.15s ease-out;
}
@keyframes omniFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.omni-dialog {
  width: 100%;
  max-width: 660px;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.35), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 82vh;
  animation: omniScaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
:root[data-theme="dark"] .omni-dialog {
  box-shadow: 0 24px 70px -10px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 255, 255, 0.08);
}
@keyframes omniScaleIn {
  from { transform: scale(0.97) translateY(-8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.omni-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--color-hairline);
  background: var(--color-surface);
}
.omni-search-icon {
  color: var(--color-text-dim);
  flex: none;
}
.omni-input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  font-size: 14.5px !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  color: var(--color-text) !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: auto !important;
}
.omni-input::placeholder {
  color: var(--color-text-faint);
  font-weight: 400;
}
.omni-esc-badge {
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: 3px;
  padding: 2px 6px;
  color: var(--color-text-faint);
  cursor: pointer;
  transition: all 0.12s;
}
.omni-esc-badge:hover {
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
}

.omni-chips-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-hairline);
  overflow-x: auto;
  scrollbar-width: none;
}
.omni-chips-bar::-webkit-scrollbar { display: none; }
.omni-chip {
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 500;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: var(--r-sm);
  color: var(--color-text-dim) !important;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  height: auto !important;
}
.omni-chip:hover {
  color: var(--color-text) !important;
  background: color-mix(in srgb, var(--color-text) 6%, transparent) !important;
}
.omni-chip.active {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  font-weight: 600;
  border-color: var(--color-hairline) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.omni-results-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 52vh;
}
.omni-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.08s ease, border-color 0.08s ease;
  text-align: left;
  border: 1px solid transparent;
}
.omni-item:hover,
.omni-item.selected {
  background: var(--color-surface-2);
  border-color: var(--color-hairline);
}
.omni-item-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--color-text-faint);
  background: var(--color-surface-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--color-hairline);
}
.omni-item:hover .omni-item-icon,
.omni-item.selected .omni-item-icon {
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
}

.omni-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.omni-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.omni-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.omni-item-tag {
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--color-text-dim);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
}
.omni-item-tag-bad {
  color: var(--bad);
  background: var(--bad-soft);
  border-color: var(--bad);
}
.omni-item-sub {
  font-size: 11.5px;
  color: var(--color-text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.omni-item-action {
  font-size: 11.5px;
  color: var(--color-text-faint);
  flex: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
}
.omni-item:hover .omni-item-action,
.omni-item.selected .omni-item-action {
  color: var(--color-text);
}

.omni-empty-state {
  padding: 32px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-faint);
  font-size: 13px;
}
.omni-empty-state svg {
  color: var(--color-text-faint);
  opacity: 0.6;
}

.omni-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-hairline);
  font-size: 11px;
  color: var(--color-text-faint);
}
.omni-footer-hints {
  display: flex;
  align-items: center;
  gap: 10px;
}
.omni-footer-hints span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.omni-footer-hints kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: 3px;
  padding: 1px 4px;
  color: var(--color-text-dim);
}

/* ── responsive ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .panel-grid-2, .form-grid, .admin-origin, .settings-grid { grid-template-columns: 1fr; }
  .mode-buttons-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .settings-row { grid-template-columns: 1fr; gap: var(--s2); }
}
@media (max-width: 760px) {
  main { padding: var(--s4) var(--s3) var(--s8); }
  .topbar-in { flex-wrap: wrap; min-height: 0; padding: var(--s2) var(--s4); gap: var(--s3); }
  .gnav { order: 3; width: 100%; flex-basis: 100%; padding-bottom: var(--s2); }
  .topbar-end { margin-left: auto; }
  .cards, .cards.compact, .stat-row { grid-template-columns: 1fr; }
  .activation-step { grid-template-columns: 1fr; }
  .sites-toolbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px; }
  .sites-toolbar-left { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
  .sites-search-wrap { width: 100%; }
  .custom-dropdown { width: 100%; }
  .custom-dropdown-btn { width: 100%; justify-content: space-between; }
  .custom-dropdown-menu { width: 100%; }
  .sites-toolbar-right { width: 100%; margin-left: 0; }
  .sites-toolbar-right button { width: 100%; justify-content: center; }
  .workspace-tab-row { flex-wrap: wrap; gap: 8px; }
  .tabstrip-all-sites-btn { width: 100%; justify-content: center; margin-bottom: 0; }
  .statusline { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sl-actions-wrap { margin-left: 0; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; }
  .sl-mode-switcher { margin-left: 0; width: 100%; flex-direction: column; align-items: stretch; gap: 6px; }
  .sl-purge-btn { width: 100%; justify-content: center; }
  .mode-btn-group { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .mode-toggle-btn { flex: 1; text-align: center; }
  .dash-top-bar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; }
  .dash-actions { width: 100%; }
  .dash-actions button { width: 100%; justify-content: center; }
  .admin-top-bar { flex-direction: column; align-items: flex-start; gap: 10px; padding: 10px; }
  .admin-top-bar .pagenav { width: 100%; }
  .site-grid { grid-template-columns: 1fr; }
}

/* ── admin surfaces ───────────────────────────────────────────────── */
.admin-pane { display: none; }
.admin-pane.active { display: block; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s3); }
.role-card {
  display: flex; flex-direction: column; gap: 4px; padding: var(--s3) var(--s4);
  background: var(--color-surface-2); border: 1px solid var(--color-hairline); border-radius: var(--r-md);
}
.role-card strong { font-size: 13px; font-weight: 600; }
.role-card span { font-size: 12px; color: var(--color-text-faint); line-height: 1.45; }
.check-row { display: flex; flex-direction: row; align-items: center; gap: 9px; font-size: 13px; color: var(--color-text-dim); cursor: pointer; }
.check-row input { margin: 0; }
.ua-cell { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--color-text-faint); font-size: 12px; }
#users-table td .mini-btn + .mini-btn { margin-left: 5px; }

/* ── overlay dialogs built at runtime (user editor) ───────────────── */
/* These were missing, so the dialog rendered inline at the foot of the
   page instead of floating over it. */
.backdrop {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: var(--s4); background: rgba(19, 20, 23, .38); backdrop-filter: blur(3px);
}
.modal {
  width: min(460px, 100%); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--color-surface); border: 1px solid var(--color-hairline);
  border-radius: var(--r-lg); box-shadow: var(--lift-modal);
  padding: var(--s6); display: flex; flex-direction: column; gap: var(--s4);
}
.modal-title { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.modal-acts { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); }
.modal .field > label { font-size: 12.5px; }

/* ── select: native chrome replaced by a panel-native dropdown ────── */
/* The real <select> stays in the DOM as the source of truth, so every
   existing .value read and change listener keeps working; only its
   presentation is taken over. */
.sel { position: relative; display: block; width: 100%; }
.sel > select.sel-native {
  position: absolute; opacity: 0; pointer-events: none;
  width: 100%; height: 100%; inset: 0; margin: 0; padding: 0; border: 0;
}
.sel-btn {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  width: 100%; min-height: 34px; padding: 6px 11px; cursor: pointer; text-align: left;
  background: var(--color-surface); color: var(--color-text); font-size: 13px; font-weight: 500;
  border: 1px solid var(--color-hairline-strong); border-radius: var(--r-sm);
  transition: border-color .12s ease, background-color .12s ease;
  transform: none !important;
}
.sel-btn:hover { background: var(--color-surface); border-color: var(--color-hairline-strong); }
.sel-btn:active { transform: none !important; }
.sel.open .sel-btn { border-color: var(--color-hairline-strong); }
.sel-btn:disabled { opacity: .5; cursor: not-allowed; }
.sel-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-caret { flex: none; color: var(--color-text-faint); transition: transform .15s ease; }
.sel.open .sel-caret { transform: rotate(180deg); }
.sel-menu {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 90;
  max-height: 280px; overflow-y: auto; overflow-x: hidden; padding: var(--s1);
  background: var(--color-surface); border: 1px solid var(--color-hairline);
  border-radius: var(--r-md); box-shadow: var(--lift-menu);
  display: flex; flex-direction: column; gap: 1px;
}
.sel-menu.up { top: auto; bottom: calc(100% + 5px); }
.sel-opt {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  width: 100%; text-align: left; padding: 8px 10px; min-height: 32px; cursor: pointer;
  white-space: nowrap;
  background: transparent; border: 0; border-radius: var(--r-sm);
  color: var(--color-text); font-size: 13px; font-weight: 500;
  transition: background-color .08s ease;
  transform: none !important;
}
.sel-opt:active { transform: none !important; }
.sel-opt:hover, .sel-opt.cursor { background: var(--color-surface-2); }
.sel-opt[aria-selected="true"] { font-weight: 600; }
.sel-opt[aria-selected="true"]::after {
  content: ""; width: 13px; height: 8px; flex: none; margin-right: 1px;
  border-left: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent);
  transform: rotate(-45deg) translateY(-2px);
}
.inline-field .sel { width: auto; min-width: 148px; }
.inline-field .sel:has(#threat-scope),
.inline-field .sel:has(.mon-scope-select) {
  min-width: 220px;
}
.inline-field .sel:has(#threat-scope) .sel-btn,
.inline-field .sel:has(.mon-scope-select) .sel-btn,
.inline-field .sel:has(#threat-scope) .sel-combobox-wrap,
.inline-field .sel:has(.mon-scope-select) .sel-combobox-wrap {
  min-width: 220px;
}
.inline-field .sel:has(#threat-scope) .sel-menu,
.inline-field .sel:has(.mon-scope-select) .sel-menu {
  min-width: 260px;
}
.sel-combobox-wrap {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}
.sel-combobox-input {
  width: 100%;
  min-height: 34px;
  padding: 6px 30px 6px 11px;
  cursor: text;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--r-sm);
  transition: border-color .12s ease, background-color .12s ease;
}
.sel-combobox-input:focus,
.sel-combobox-input:hover {
  border-color: var(--color-hairline-strong) !important;
  outline: none !important;
  box-shadow: none !important;
  background: var(--color-surface);
}
.sel.open .sel-combobox-input {
  border-color: var(--color-hairline-strong) !important;
  outline: none !important;
  box-shadow: none !important;
}
.sel-combobox-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%) !important;
  background: transparent;
  border: 0;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  min-height: auto;
}
.sel.open .sel-combobox-toggle .sel-caret {
  transform: rotate(180deg);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.top-actions .sel { width: auto; min-width: 160px; margin: 0; }
.top-actions input[type="text"],
.top-actions input[type="search"] {
  min-height: 36px;
  margin: 0;
}

/* ── checkbox / radio: drawn, not OS-supplied ─────────────────────── */
input[type="checkbox"], input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 17px; height: 17px; min-height: 17px; flex: none; padding: 0; margin: 0;
  border: 1.5px solid var(--color-hairline-strong); background: var(--color-surface);
  border-radius: 5px; cursor: pointer; position: relative;
  transition: background-color .12s, border-color .12s;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:hover, input[type="radio"]:hover { border-color: var(--color-hairline-strong); }
input[type="checkbox"]:checked, input[type="radio"]:checked {
  background: var(--color-accent); border-color: var(--color-accent);
}
input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 9px;
  border: solid var(--color-accent-contrast); border-width: 0 2px 2px 0; transform: rotate(42deg);
}
input[type="radio"]:checked::after {
  content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--color-accent-contrast);
}
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .45; cursor: not-allowed; }
.toggle-row { cursor: pointer; }
.toggle-row span { font-size: 13px; }

/* Aksiyon hücresi sağa yaslı ve tek satır — düğme satır yüksekliğini
   bozmadan sütununun içinde durur. */
#site-events td:last-child { text-align: right; }
#site-events td:last-child .mini-btn { margin: 0; padding: 0 8px; }
.rule-catalog-scroll { max-height: none !important; overflow: visible !important; }

/* key/value information grids on the site Settings page */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s3) var(--s6); }
.kv { display: flex; flex-direction: column; gap: 3px; padding: var(--s2) 0; border-bottom: 1px solid var(--color-hairline); }
.kv-key { font-size: 11.5px; font-weight: 500; color: var(--color-text-faint); }
.kv-val { font-size: 13.5px; font-weight: 500; color: var(--color-text); overflow-wrap: anywhere; }
.btn-danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--bad) 85%, #000); border-color: color-mix(in srgb, var(--bad) 85%, #000); }

/* a card header and its action button need air between them */
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); row-gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s1); }
.card-head-text { padding-right: var(--s4); }
.card-head > button, .card-head > .top-actions { flex: none; }

/* profile dialog */
.prof-section-title { display: flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 600; }
.totp-key { margin-top: var(--s2); padding: var(--s3); background: var(--color-surface-2); border: 1px solid var(--color-hairline); border-radius: var(--r-sm); text-align: center; }
.totp-key code { font-size: 14px; letter-spacing: .12em; background: none; border: 0; max-width: none; word-break: break-all; }

/* ── record inspector drawer ──────────────────────────────────────── */
.drawer-wrap { position: fixed; inset: 0; z-index: 95; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(19,20,23,.32); backdrop-filter: blur(2px); }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100%);
  background: var(--color-surface); border-left: 1px solid var(--color-hairline);
  box-shadow: var(--lift-modal); display: flex; flex-direction: column;
  animation: drawer-in .18s ease-out;
}
@keyframes drawer-in { from { transform: translateX(18px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4);
  padding: var(--s5) var(--s6); border-bottom: 1px solid var(--color-hairline); flex: none;
}
.drawer-head h3 { overflow-wrap: anywhere; }
/* overscroll-behavior: çekmecenin sonuna gelindiğinde kaydırma arkadaki
   sayfaya zincirlenmesin. */
.drawer-body { padding: var(--s5) var(--s6) var(--s10); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--s5); }
.drawer-section h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-faint); margin-bottom: var(--s2); }
.drawer-kv { display: grid; grid-template-columns: 1fr; gap: 0; }
.drawer-kv .kv { display: grid; grid-template-columns: 150px 1fr; gap: var(--s3); align-items: baseline; padding: 7px 0; }
.drawer-section pre.code { max-height: 280px; }
.row-link { cursor: pointer; }
.row-link:hover { background: var(--color-surface-2); }

/* İstek dökümü çekmecesi: olay zinciri ve komşu istek tabloları
   varsayılan 620px'e sığmıyor, kendi genişliğini alır. */
.drawer.drawer-wide { width: min(860px, 100%); }
.drawer.drawer-wide .table-wrap { margin-top: var(--s2); }
.drawer.drawer-wide table { font-size: 12.5px; }
.drawer.drawer-wide td, .drawer.drawer-wide th { padding: 8px var(--s2); }

/* ── attack wave cards ────────────────────────────────────────────── */
.wave-list { display: flex; flex-direction: column; gap: var(--s3); }
.wave { border: 1px solid var(--color-hairline); border-radius: var(--r-md); padding: var(--s4); background: var(--color-surface); }
.wave-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.wave-title { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: 14px; }
.wave-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s3); }
.wave-stats > div { display: flex; flex-direction: column; gap: 2px; }
.wave-actions { margin-top: var(--s3); display: flex; gap: var(--s2); flex-wrap: wrap; }

/* ── pager ────────────────────────────────────────────────────────── */
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding-top: var(--s3); border-top: 1px solid var(--color-hairline); }

/* drag-to-zoom on time series */
.chart-band { position: absolute; top: 0; bottom: 26px; background: color-mix(in srgb, var(--color-accent) 12%, transparent); border-left: 1px solid var(--color-accent); border-right: 1px solid var(--color-accent); pointer-events: none; z-index: 2; }
.chart-reset { position: relative; z-index: 3; min-height: 24px; height: 24px; padding: 0 10px; font-size: 11.5px; font-weight: 500; display: inline-flex; align-items: center; align-self: flex-start; margin-top: -2px; background: var(--color-surface-2); color: var(--color-text-dim); border: 1px solid var(--color-hairline-strong); border-radius: var(--r-pill); white-space: nowrap; cursor: pointer; transition: all .15s ease; }
.chart-reset:hover { color: var(--color-text); background: var(--color-surface-2); border-color: var(--color-hairline-strong); }
.chart-box > .chart-reset { position: absolute; top: -52px; right: 0; }
.chart-box canvas { cursor: default; }

/* ── wizard as a page (modern premium redesign & fixed vertical anchor) ────────── */
.section-panel[data-section="newsite"] {
  min-height: calc(100vh - 120px);
  display: none;
  box-sizing: border-box;
  padding: 40px 20px 80px;
}

.section-panel[data-section="newsite"].active {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.newsite-page-wrap {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.newsite-top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s3);
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.newsite-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}
.newsite-back-link:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
}

.newsite-title-center {
  text-align: center;
  display: flex;
  justify-content: center;
}

.newsite-badge-pill {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  padding: 4px 12px;
  border-radius: var(--r-pill);
}

.newsite-domain-badge-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.newsite-domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.newsite-domain-badge span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Minimalist Stepper Header (Equalized 6-Column Grid) ─────────── */
.clean-stepper-wrap {
  width: 100%;
  max-width: 840px;
  margin: 0 auto 20px;
  padding: 0;
  box-sizing: border-box;
}

.clean-stepper-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  background: var(--color-surface-2, #181b20);
  border: 1px solid var(--color-hairline, #272a30);
  border-radius: 12px;
  padding: 6px;
  width: 100%;
  box-sizing: border-box;
}

.clean-step-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-faint, #6b7280);
  user-select: none;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
}

.clean-step-item.current {
  background: var(--color-surface, #121417);
  color: var(--color-text, #ffffff);
  font-weight: 500;
  border-color: var(--color-hairline-strong, #32363e);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.clean-step-item.done {
  color: var(--color-text-dim, #9ca3af);
}

.clean-step-item.done:hover {
  color: var(--color-text, #ffffff);
  background: rgba(255, 255, 255, 0.04);
}

.clean-step-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.clean-step-item.current .clean-step-indicator {
  background: var(--color-text, #ffffff);
  color: var(--color-bg, #0b0b0d);
}

.clean-step-item.done .clean-step-indicator {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text, #ffffff);
}

.clean-step-text {
  font-size: 12px;
  letter-spacing: -0.01em;
}

/* ── Minimalist Wizard Card (Dynamic Content Height) ─────────────── */
.clean-wizard-card {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  background: var(--color-surface, #121418);
  border: 1px solid var(--color-hairline, #272a30);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  box-sizing: border-box;
}

.clean-step-body {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.clean-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-hairline, #22252a);
}

.clean-card-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text, #ffffff);
  margin: 0;
  letter-spacing: -0.02em;
}

.clean-card-subtitle {
  font-size: 13px;
  color: var(--color-text-dim, #9ca3af);
  margin: 0;
  line-height: 1.45;
}

.clean-card-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.clean-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.clean-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-dim, #9ca3af);
}

.clean-input-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-hairline-strong, #32363e);
  border-radius: 8px;
  background: var(--color-surface-2, #181b20);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.clean-input-row:focus-within {
  border-color: var(--color-text, #ffffff);
}

.clean-input-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--color-text-faint, #6b7280);
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid var(--color-hairline, #272a30);
  user-select: none;
}

.clean-input-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: var(--color-text, #ffffff) !important;
  box-shadow: none !important;
}

.clean-hint {
  font-size: 11.5px;
  color: var(--color-text-faint, #6b7280);
  line-height: 1.4;
}

.clean-error-banner,
.clean-error-box {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.clean-feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-surface-2, #181b20);
  border: 1px solid var(--color-hairline, #272a30);
  border-radius: 8px;
}

.clean-feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--color-text-dim, #9ca3af);
  font-weight: 500;
}

.clean-feature-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-faint, #6b7280);
}

.clean-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--color-text, #ffffff);
  color: var(--color-bg, #0b0b0d);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.clean-primary-btn:hover:not(:disabled) {
  opacity: 0.9;
}
.clean-primary-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.clean-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  background: var(--color-surface-2, #181b20);
  color: var(--color-text, #ffffff);
  border: 1px solid var(--color-hairline, #272a30);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.clean-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-hairline-strong, #32363e);
}

.clean-btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.clean-btn-row .flex-1 {
  flex: 1;
}

.clean-dns-table {
  background: var(--color-surface-2, #181b20);
  border: 1px solid var(--color-hairline, #272a30);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.clean-dns-header-row {
  display: grid;
  grid-template-columns: 80px 190px 1fr 36px;
  align-items: center;
  gap: 18px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--color-hairline, #272a30);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-faint, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clean-dns-data-row {
  display: grid;
  grid-template-columns: 80px 190px 1fr 36px;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-hairline, #272a30);
}
.clean-dns-data-row:last-child {
  border-bottom: none;
}

.clean-type-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-dim, #9ca3af);
  border: 1px solid var(--color-hairline, #272a30);
}

.clean-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--color-text, #ffffff);
  word-break: break-all;
}

.clean-copy-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-hairline, #272a30);
  border-radius: 6px;
  color: var(--color-text-dim, #9ca3af);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.12s ease;
}
.clean-copy-btn:hover {
  color: var(--color-text, #ffffff);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-hairline-strong, #32363e);
}
.clean-copy-btn.copied {
  color: #10b981;
  border-color: #10b981;
}

.clean-status-pill {
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--color-surface-2, #181b20);
  border: 1px solid var(--color-hairline, #272a30);
  font-size: 12.5px;
  text-align: center;
  color: var(--color-text-dim, #9ca3af);
}

.clean-terminal-box {
  background: #090a0c;
  border: 1px solid var(--color-hairline, #272a30);
  border-radius: 8px;
  overflow: hidden;
}

.clean-terminal-top {
  padding: 6px 12px;
  background: #0f1115;
  border-bottom: 1px solid #1a1d22;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--color-text-faint, #6b7280);
}

.clean-terminal-box pre {
  margin: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: #a1a1aa;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 90px;
}

.clean-input,
.clean-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-size: 13.5px;
  border-radius: 8px;
  background: var(--color-surface-2, #181b20);
  border: 1px solid var(--color-hairline-strong, #32363e);
  color: var(--color-text, #ffffff);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.clean-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.clean-input:focus,
.clean-select:focus,
.clean-input:hover,
.clean-select:hover {
  border-color: var(--color-hairline-strong) !important;
  box-shadow: none !important;
  outline: none !important;
}

.clean-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.clean-origin-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 14px;
}

.clean-field-protocol {
  width: 280px !important;
  max-width: 280px !important;
  min-width: 280px !important;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}

.clean-field-protocol:has(.sel.open),
.clean-field-protocol .sel.open {
  position: relative;
  z-index: 1000 !important;
}

.clean-field-protocol .sel,
.clean-field-protocol .custom-select {
  width: 280px !important;
  max-width: 280px !important;
  min-width: 280px !important;
  box-sizing: border-box !important;
  position: relative;
}

.clean-field-protocol .sel-menu {
  z-index: 1001 !important;
  background: var(--color-surface, #14171c) !important;
  border: 1px solid var(--color-hairline-strong, #32363e) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75) !important;
}

.clean-field-protocol .sel-btn,
.clean-field-protocol select,
.protocol-select {
  width: 280px !important;
  max-width: 280px !important;
  min-width: 280px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
  background: var(--color-surface-2, #181b20) !important;
  border: 1px solid var(--color-hairline-strong, #32363e) !important;
  color: var(--color-text, #ffffff) !important;
  padding: 0 12px !important;
}

.clean-field-port {
  flex: 1;
}

.clean-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.clean-mode-card {
  background: var(--color-surface-2, #181b20);
  border: 1px solid var(--color-hairline, #272a30);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.clean-mode-card:hover {
  border-color: var(--color-hairline-strong, #404550);
}
.clean-mode-card.active {
  border-color: var(--color-text, #ffffff);
  background: rgba(255, 255, 255, 0.04);
}

.clean-mode-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clean-mode-radio {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--color-hairline-strong, #404550);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.clean-mode-card.active .clean-mode-radio {
  border-color: var(--color-text, #ffffff);
  background: var(--color-text, #ffffff);
  box-shadow: inset 0 0 0 2px var(--color-surface, #121418);
}

.clean-mode-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #ffffff);
}

.clean-mode-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text, #ffffff);
  margin-left: auto;
}

.clean-mode-desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--color-text-dim, #9ca3af);
}

.clean-toggle-box {
  display: grid;
  gap: 6px;
  background: var(--color-surface-2, #181b20);
  border: 1px solid var(--color-hairline, #272a30);
  border-radius: 8px;
  padding: 10px 14px;
}

.clean-toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}

.clean-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12.5px;
}
.clean-toggle-text strong {
  color: var(--color-text, #ffffff);
  font-weight: 500;
}
.clean-toggle-text span {
  font-size: 11px;
  color: var(--color-text-faint, #6b7280);
}

/* DNS Target Group & Copy Button */
.dns-target-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dns-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-text-dim);
  cursor: pointer;
  transition: all 0.12s ease;
}
.dns-copy-btn:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
}
.dns-copy-btn.copied {
  background: var(--good-soft);
  color: var(--good);
  border-color: var(--good);
}

/* Toggle Group Card in Step 5 */
.toggle-group-card {
  display: grid;
  gap: 10px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.toggle-group-card .toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.toggle-group-card .toggle-row input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
}
.toggle-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toggle-row-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.toggle-row-text span {
  font-size: 11.5px;
  color: var(--color-text-dim);
}

.parsed-hint-pill {
  margin: 4px 0 0;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--good);
  background: var(--good-soft);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, var(--good) 20%, transparent);
}

/* Success Card in Step 8 */
.wizard-success-card {
  display: grid;
  gap: 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.success-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.success-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--good-soft);
  color: var(--good);
  font-size: 12px;
  font-weight: 700;
  flex: none;
  margin-top: 1px;
}
.success-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.success-item-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.success-item-text span {
  font-size: 12px;
  color: var(--color-text-dim);
}

/* ── forms laid out on a page rather than crammed into a modal ────── */
.form-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4); max-width: 720px; }
.form-actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding-top: var(--s2); }
.form-actions .small { min-height: 18px; }
.settings-card > .field, .settings-card > .form-grid-2 { max-width: 720px; }

/* inline user editor sits inside the card list, visually distinct */
#user-form-host .settings-card { border-color: var(--color-hairline-strong); background: var(--color-surface-2); }
#user-form-host .settings-card .field input,
#user-form-host .settings-card .field .sel-btn { background: var(--color-surface); }

/* ── live indicators ──────────────────────────────────────────────── */
.live-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--color-text); background: var(--color-surface-2); border: 1px solid var(--color-hairline); border-radius: var(--r-pill); padding: 5px 12px; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: live-blink 1.6s infinite; }
@keyframes live-blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ── capacity gauges ──────────────────────────────────────────────── */
.gauge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s4); }
.gauge { display: flex; flex-direction: column; gap: var(--s2); }
.gauge-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.gauge-name { font-size: 12px; font-weight: 500; color: var(--color-text-faint); }
.gauge-val { font-size: 19px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gauge-track { height: 7px; border-radius: var(--r-pill); background: var(--color-surface-2); overflow: hidden; }
.gauge-fill { height: 100%; border-radius: var(--r-pill); background: var(--good); transition: width .5s ease, background-color .3s ease; }
.gauge-fill.warn { background: var(--warn); }
.gauge-fill.bad { background: var(--bad); }
.gauge-note { font-size: 11.5px; color: var(--color-text-faint); }

/* ── diagnostics ──────────────────────────────────────────────────── */
.diag { display: flex; flex-direction: column; gap: var(--s2); }
.diag-item { display: flex; gap: var(--s3); padding: var(--s3); border: 1px solid var(--color-hairline); border-radius: var(--r-md); background: var(--color-surface); }
.diag-item.error { border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: var(--bad-soft); }
.diag-item.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }
.diag-item.ok { border-color: color-mix(in srgb, var(--good) 30%, transparent); background: var(--good-soft); }
.diag-badge { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--color-text-faint); }
.diag-item.error .diag-badge { background: var(--bad); }
.diag-item.warn .diag-badge { background: var(--warn); }
.diag-item.ok .diag-badge { background: var(--good); }
.diag-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.diag-title { font-size: 13.5px; font-weight: 600; }
.diag-scope { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-faint); }
.diag-detail { font-size: 12.5px; color: var(--color-text-dim); overflow-wrap: anywhere; }
.diag-hint { font-size: 12.5px; color: var(--color-text-dim); font-style: italic; }

/* ── 2FA setup ────────────────────────────────────────────────────── */
.totp-setup { display: flex; gap: var(--s5); flex-wrap: wrap; align-items: flex-start; }
.totp-qr { flex: none; padding: var(--s3); background: #fff; border: 1px solid var(--color-hairline); border-radius: var(--r-md); line-height: 0; }
.totp-steps { display: flex; flex-direction: column; gap: var(--s2); min-width: 260px; flex: 1; }
.totp-steps p { margin: 0; }
.code-confirm { display: flex; align-items: stretch; margin-top: var(--s2); max-width: 380px; }
.code-confirm input {
  flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0;
  font-family: var(--font-mono); font-size: 16px; letter-spacing: .28em; text-align: center;
}
.code-confirm button { border-top-left-radius: 0; border-bottom-left-radius: 0; white-space: nowrap; }
.totp-key { margin-top: var(--s2); }



/* evidence blocks in the inspector */
.evidence { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--s3); }
.evidence-label { font-size: 11.5px; font-weight: 500; color: var(--color-text-faint); }
.evidence pre.code { margin: 0; max-height: 180px; white-space: pre-wrap; word-break: break-all; }

/* Taşma ve kırpma davranışı artık tablo sisteminin varsayılanı; burada
   yalnızca bu hücrelerin kendine özgü tarafı kalıyor. */
.cell-req code { display: block; }
.plan-list { margin: var(--s2) 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--color-text-dim); }
#gateway-result { margin-top: var(--s2); }

/* one row per signature that fired */
.rule-hits { display: flex; flex-direction: column; gap: 5px; margin-bottom: var(--s3); }
.rule-hit { display: flex; align-items: baseline; gap: var(--s3); padding: 6px 9px; background: var(--color-surface-2); border: 1px solid var(--color-hairline); border-radius: var(--r-sm); }
.rule-hit code { flex: none; background: none; border: 0; padding: 0; font-size: 12px; color: var(--color-text-faint); min-width: 68px; max-width: none; }
.rule-hit span { font-size: 12.5px; color: var(--color-text); overflow-wrap: anywhere; }

/* wave: which site, and what was done about it */
.wave-site { font-size: 13px; font-weight: 600; color: var(--color-text-dim); }
.wave-actionbar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--color-hairline); }
.wave-acts { display: flex; gap: 5px; flex-wrap: wrap; }

/* Olay kaydı tablosu — yoğun log görünümü */
.events-table-wrap { min-height: auto; width: 100%; overflow-x: auto; }
.events-table { table-layout: fixed; width: 100%; min-width: 980px; border-collapse: collapse; }
.events-table th, .events-table td {
  padding: 8px 10px;
  height: 40px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}
.events-table th {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-faint);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.events-table td span {
  display: inline;
  margin-top: 0;
}
.events-table .cell-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 12px;
}
.events-table .cell-time span {
  display: inline !important;
  margin-top: 0 !important;
}
.events-table .cell-time .time-date {
  color: var(--color-text-faint);
  font-size: 11.5px;
  margin-right: 5px;
}
.events-table .cell-time .time-clock {
  color: var(--color-text);
  font-weight: 500;
}
.events-table .cell-ip code {
  font-family: var(--font-mono);
  font-size: 12px;
}
.events-table .cell-score {
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 12px;
  padding-left: 2px !important;
  padding-right: 6px !important;
}
.events-table td[class*="action-"] {
  padding-right: 4px !important;
}
.events-table .cell-req {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.events-table .cell-req-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.events-table .cell-req .tag-method {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 6px;
  letter-spacing: .02em;
  margin: 0;
  line-height: 1.2;
}
.events-table .cell-req .cell-path {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--color-text);
  background: none;
  border: 0;
  padding: 0;
}
.events-table .cell-rule, .events-table .cell-reason {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.events-table .cell-actions {
  text-align: right;
}
.events-table .cell-actions .mini-btn {
  margin: 0;
  padding: 2px 8px;
  font-size: 11px;
}


/* English readers: keep the pre-translation markup out of sight for the
   handful of milliseconds before the phrase table is applied. */
html[data-i18n-pending] body { visibility: hidden; }

/* ═══════════════════════════════════════════════════════════════════
   Profile page.

   Controls sit in a label column / control column grid so every input
   starts on the same vertical line no matter how long its label is —
   the previous auto-fit grid let a two-line label push its field down
   and the pair read as diagonal. Inputs get intrinsic widths because
   a name, an e-mail or a password is short: stretching them across the
   card made the form look empty and hard to scan.
   ═══════════════════════════════════════════════════════════════════ */
[data-section="profile"] .stack { gap: var(--s4); max-width: 720px; }

.prof-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.prof-banner .prof-avatar {
  width: 52px;
  height: 52px;
  font-size: 19px;
  font-weight: 700;
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.prof-banner-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  justify-content: center;
}
.prof-banner-id strong {
  margin: 0;
  padding: 0;
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.25;
}
.prof-banner-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1px;
}
.prof-banner-meta .small.muted {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-dim);
}

.pf-card {
  padding: 0;
  gap: 0;
  overflow: visible !important;
  position: relative;
}
.pf-card .pf-head {
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.pf-card .pf-foot {
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.pf-head { padding: var(--s5) var(--s6) var(--s4); display: flex; flex-direction: column; gap: 3px; }
.pf-head h3 { margin: 0; }
.pf-head p { margin: 0; }
.pf-head-row { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.pf-head-row > div { display: flex; flex-direction: column; gap: 3px; }

.pf-rows { display: flex; flex-direction: column; border-top: 1px solid var(--color-hairline); }
.pf-row {
  display: grid; grid-template-columns: 190px minmax(0, 1fr);
  align-items: start; gap: var(--s4);
  padding: var(--s4) var(--s6);
}
.pf-row + .pf-row { border-top: 1px solid var(--color-hairline); }
.pf-row > label {
  display: block; padding-top: 9px;
  font-size: 13px; font-weight: 500; color: var(--color-text-dim);
}
.pf-control { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pf-hint { font-size: 12px; color: var(--color-text-faint); }

.pf-foot {
  display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap;
  padding: var(--s4) var(--s6); border-top: 1px solid var(--color-hairline);
  background: var(--color-surface-2);
}
.pf-status { min-height: 18px; }

/* intrinsic control widths — short values should not span the card */
.w-200 { width: 200px; max-width: 100%; }
.w-320 { width: 320px; max-width: 100%; }
.pf-control .sel { width: 200px; max-width: 100%; }
#pf-2fa-body .pf-control .sel { width: auto; }

/* 2FA setup sits inside the card body, aligned with the rows above */
#pf-2fa-body .totp-setup { padding: var(--s5) var(--s6); border-top: 1px solid var(--color-hairline); }
#pf-2fa-body > .pf-foot:first-child { border-top: 1px solid var(--color-hairline); }
[data-section="profile"] .pf-status { padding: 0 var(--s6) var(--s4); }
[data-section="profile"] .pf-foot .pf-status { padding: 0; }

@media (max-width: 640px) {
  .pf-row { grid-template-columns: 1fr; gap: var(--s2); }
  .pf-row > label { padding-top: 0; }
  .w-200, .w-320 { width: 100%; }
  .pf-control .sel { width: 100%; }
}

/* ── bildirim kanalları ───────────────────────────────────────────── */
/* Kanal listesi kullanıcı listesiyle aynı ritmi izler: kimlik solda,
   durum anahtarı sağda, eylemler altta. Şablon editörü geniş çekmecede
   açılır çünkü HTML gövdesi 620px'e sığmıyor. */

.nch-intro { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; }
.nch-intro-text { display: flex; flex-direction: column; gap: var(--s2); max-width: 640px; }
.nch-list { display: flex; flex-direction: column; gap: var(--s3); }

.nch-card {
  border: 1px solid var(--color-hairline); border-radius: var(--r-md);
  background: var(--color-surface); padding: var(--s4) var(--s5);
  display: flex; flex-direction: column; gap: var(--s3);
}
.nch-card.is-off { background: var(--color-surface-2); }
.nch-card.is-off .nch-card-name, .nch-card.is-off .nch-icon { opacity: .6; }
.nch-card-main { display: flex; align-items: center; gap: var(--s3); }
.nch-card-id { flex: 1; min-width: 0; }
.nch-card-name { display: flex; align-items: center; gap: var(--s2); font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.nch-card-target { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nch-icon {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--r-sm); border: 1px solid var(--color-hairline);
  background: var(--color-surface-2); color: var(--color-text-dim);
}
.nch-icon svg { width: 17px; height: 17px; }
.nch-icon-email { color: var(--info); }
.nch-icon-telegram { color: #229ED9; }   /* Telegram marka rengi */
.nch-icon-discord { color: #5865F2; }    /* Discord marka rengi */
.nch-icon-telegram, .nch-icon-discord { background: var(--color-surface); }

.nch-events { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); }
.nch-event-chip {
  font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--color-surface-2); color: var(--color-text-dim); border: 1px solid var(--color-hairline);
}
.nch-event-more { color: var(--color-text-faint); }

.nch-card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.nch-card-actions { display: flex; gap: var(--s2); }
.nch-card-actions button { min-height: 30px; padding: 0 12px; font-size: 12.5px; }
.nch-status-good { color: var(--good); font-weight: 600; }
.nch-status-bad { color: var(--bad); font-weight: 600; }
.nch-status-faint { color: var(--color-text-faint); }
.nch-card-error {
  font-size: 12px; color: var(--bad); background: var(--bad-soft);
  border-radius: var(--r-sm); padding: var(--s2) var(--s3); overflow-wrap: anywhere;
}

/* açık/kapalı anahtarı */
.nch-switch { position: relative; flex: none; width: 38px; height: 22px; cursor: pointer; }
.nch-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.nch-switch span {
  position: absolute; inset: 0; border-radius: var(--r-pill);
  background: var(--color-hairline-strong); transition: background .15s ease; pointer-events: none;
}
.nch-switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--color-surface); transition: transform .15s ease;
  box-shadow: 0 1px 2px rgba(19,20,23,.2);
}
.nch-switch input:checked + span { background: var(--good); }
.nch-switch input:checked + span::after { transform: translateX(16px); }

/* ── editör çekmecesi ─────────────────────────────────────────────── */
.drawer.drawer-xl { width: min(980px, 100%); }
.nch-form { display: flex; flex-direction: column; gap: var(--s6); }
.nch-fields { display: flex; flex-direction: column; gap: var(--s4); margin-top: var(--s4); }
.nch-fields .field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 500; }
.nch-fields .hint { font-size: 12px; font-weight: 400; }

.nch-platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s3); }
.nch-platform {
  display: flex; align-items: flex-start; justify-content: flex-start; gap: var(--s3);
  text-align: left; white-space: normal; padding: var(--s3); min-height: 0;
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-hairline); border-radius: var(--r-md); cursor: pointer;
}
.nch-platform:hover { color: var(--color-text); }
.nch-platform:hover { border-color: var(--color-hairline-strong); background: var(--color-surface); }
.nch-platform.is-active { border-color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.nch-platform-text { display: flex; flex-direction: column; gap: 2px; }
.nch-platform-text strong { font-size: 13px; font-weight: 600; }
.nch-platform-text .small { line-height: 1.45; }

.nch-events-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.nch-events-bulk { display: flex; gap: var(--s1); }
.nch-events-bulk button { min-height: 26px; padding: 0 8px; font-size: 12px; }
.nch-event-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s5); }
.nch-event-group-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-text-faint); padding-bottom: var(--s2); margin-bottom: var(--s1);
  border-bottom: 1px solid var(--color-hairline);
}
.nch-event-row { display: flex; align-items: flex-start; gap: var(--s2); padding: 7px 0; cursor: pointer; }
.nch-event-row input { margin-top: 2px; }
.nch-event-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nch-event-label { display: flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 500; }
.nch-event-body .small { line-height: 1.45; }
.nch-sev { font-size: 9.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px; border-radius: var(--r-pill); }
.nch-sev-critical { background: var(--bad-soft); color: var(--bad); }
.nch-sev-high { background: var(--warn-soft); color: var(--warn); }
.nch-sev-warning { background: var(--color-surface-2); color: var(--color-text-dim); }
.nch-sev-info { background: var(--good-soft); color: var(--good); }

.nch-template-mode { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.nch-radio { display: flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 500; cursor: pointer; }
.nch-radio input { margin: 0; }
.nch-format-badge {
  margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: var(--r-pill);
  background: var(--color-surface-2); color: var(--color-text-dim); border: 1px solid var(--color-hairline);
}
#nch-format-hint { margin: var(--s2) 0 var(--s3); line-height: 1.55; }

.nch-vars { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) 6px; margin-bottom: var(--s2); }
.nch-var {
  font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; min-height: 0;
  background: var(--color-surface-2); color: var(--color-text-dim);
  border: 1px solid var(--color-hairline); border-radius: var(--r-sm); cursor: pointer;
}
.nch-var:hover { background: var(--color-surface); color: var(--color-text); border-color: var(--color-hairline-strong); }

.nch-editor {
  width: 100%; min-height: 480px; resize: vertical; padding: var(--s3);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid var(--color-hairline-strong); border-radius: var(--r-sm);
  box-sizing: border-box; overflow-y: hidden;
}
.nch-editor[readonly] { opacity: .88; }
.nch-template-actions { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s2); flex-wrap: wrap; }
.nch-template-actions button { min-height: 28px; padding: 0 10px; font-size: 12px; }

.nch-preview { margin-top: var(--s5); border: 1px solid var(--color-hairline); border-radius: var(--r-md); overflow: hidden; }
.nch-preview-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: var(--s2) var(--s4); background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-hairline); font-size: 12px; font-weight: 600;
}
.nch-preview-body { padding: var(--s4); background: var(--color-surface); max-height: 520px; overflow: auto; }
.nch-mail-subject { font-size: 13px; margin-bottom: var(--s3); overflow-wrap: anywhere; }
.nch-mail-frame { width: 100%; height: 460px; border: 1px solid var(--color-hairline); border-radius: var(--r-sm); background: #f4f4f5; }
.nch-json-error { font-size: 12.5px; color: var(--bad); background: var(--bad-soft); padding: var(--s3); border-radius: var(--r-sm); margin-bottom: var(--s3); line-height: 1.55; }

/* Telegram baloncuğu ve Discord kartı: gerçekte nasıl görüneceğini
   göstermek için o platformların kendi ölçüleriyle çiziliyor. */
.nch-tg { background: #e6ebee; padding: var(--s4); border-radius: var(--r-sm); }
:root[data-theme="dark"] .nch-tg { background: #17212b; }
.nch-tg-bubble {
  max-width: 460px; background: #ffffff; color: #1c1e22; border-radius: 12px;
  padding: 10px 13px; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere;
  box-shadow: 0 1px 1px rgba(19,20,23,.12);
}
:root[data-theme="dark"] .nch-tg-bubble { background: #212d3b; color: #f4f4f5; }
.nch-tg-bubble code { background: rgba(19,20,23,.06); padding: 1px 4px; border-radius: 3px; font-size: 12.5px; }
.nch-tg-bubble blockquote { margin: 6px 0; padding-left: 9px; border-left: 2px solid #4a8fd0; color: inherit; opacity: .85; }
.nch-tg-bubble a { color: #2b7bb9; }

.nch-dc { background: #f2f3f5; padding: var(--s4); border-radius: var(--r-sm); }
:root[data-theme="dark"] .nch-dc { background: #313338; }
.nch-dc-msg { font-size: 13.5px; color: #2e3338; }
.nch-dc-embed {
  max-width: 520px; background: #ffffff; border-left: 4px solid #5561d6;
  border-radius: 4px; padding: 12px 16px 14px; color: #2e3338; font-size: 13.5px; line-height: 1.5;
}
:root[data-theme="dark"] .nch-dc-embed { background: #2b2d31; color: #dbdee1; }
.nch-dc-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; overflow-wrap: anywhere; }
.nch-dc-desc { margin-bottom: 8px; overflow-wrap: anywhere; }
.nch-dc-fields { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.nch-dc-field { flex: 1 1 100%; min-width: 0; }
.nch-dc-field.is-inline { flex: 1 1 30%; }
.nch-dc-field-name { font-size: 12.5px; font-weight: 600; margin-bottom: 1px; }
.nch-dc-field-value { font-size: 12.5px; overflow-wrap: anywhere; }
.nch-dc-footer { margin-top: 10px; font-size: 11.5px; opacity: .65; }
.nch-dc code, .nch-dc-embed code { background: rgba(19,20,23,.07); padding: 1px 4px; border-radius: 3px; font-family: var(--font-mono); font-size: 11.5px; }
:root[data-theme="dark"] .nch-dc-embed code { background: rgba(255,255,255,.08); }

.nch-form-foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding-top: var(--s4); border-top: 1px solid var(--color-hairline); flex-wrap: wrap;
}
.nch-form-buttons { display: flex; gap: var(--s2); }

@media (max-width: 720px) {
  .nch-card-foot { align-items: flex-start; }
  .nch-card-actions { width: 100%; }
  .nch-event-groups { grid-template-columns: 1fr; }
}
/* Yerel <select>, panelin .sel bileşenine dönüştürülüyor (app.js
   enhanceSelects); burada yalnızca genişliğini başlık satırına
   sığdırıyoruz, görünümü tasarım sisteminden geliyor. */
.nch-preview-pick { display: flex; align-items: center; gap: var(--s2); font-weight: 400; }
.nch-preview-pick .sel { width: auto; min-width: 210px; }

/* Boş durum: .settings-card esnek sütun olduğu için buton tam genişliğe
   yayılıyordu; ortalanmış ve kendi genişliğinde dursun. */
.nch-empty { align-items: center; text-align: center; padding: var(--s10) var(--s6); }
.nch-empty button { align-self: center; }

/* ── düzen ilkelleri ──────────────────────────────────────────────── */
/* Bu sınıflar markup'ta baştan beri kullanılıyordu ama hiç tanımlanmamıştı:
   .grid-2/.grid-3 sıradan blok olarak davranınca abonelik ve limit alanları
   üst üste yığılıp tam genişliğe yayılıyordu. */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4) var(--s5); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s4) var(--s5); }
.grid-2 > .field, .grid-3 > .field { min-width: 0; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* label global olarak display:grid; içindeki "(0 = sınırsız)" gibi ek
   açıklamalar bu yüzden alt satıra düşüyordu. */
.field > label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--color-text-dim); }
.field > input, .field > select, .field > textarea { width: 100%; }
.field > .hint { font-size: 12px; font-weight: 400; color: var(--color-text-faint); }

/* ── Manage Panel Refined Minimal Controls ── */
.tab-panel[data-panel="manage"] .grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  gap: 16px;
}
.tab-panel[data-panel="manage"] .grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  gap: 16px;
}
.tab-panel[data-panel="manage"] .field {
  max-width: 260px;
}
.tab-panel[data-panel="manage"] .field > select,
.tab-panel[data-panel="manage"] .field > input {
  max-width: 240px;
  height: 36px;
}
.tab-panel[data-panel="manage"] textarea {
  max-width: 580px;
}

.row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.row-end { justify-content: flex-end; }

/* yatay ayraç; kart içindeki iki liste arasında kullanılıyor */
.rule { height: 1px; background: var(--color-hairline); border: 0; margin: 0; flex: none; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: var(--r-pill);
  background: var(--color-surface-2); color: var(--color-text-dim); border: 1px solid transparent;
}
.tag-good { background: var(--good-soft); color: var(--good); }
.tag-bad { background: var(--bad-soft); color: var(--bad); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-line { background: transparent; border-color: var(--color-hairline-strong); color: var(--color-text-dim); }

.status-badge {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 2px 9px;
  border-radius: var(--r-pill); background: var(--color-surface-2);
}
.status-badge.action-block { background: var(--bad-soft); }
.status-badge.action-challenge, .status-badge.action-rate_limit { background: var(--warn-soft); }
.status-badge.action-log { background: var(--info-soft); }
.status-badge.action-allow { background: var(--good-soft); }

.section-block { display: flex; flex-direction: column; gap: var(--s4); }
.card-danger { border-color: color-mix(in srgb, var(--bad) 35%, var(--color-hairline)); }
.empty-state { display: grid; place-items: center; gap: var(--s3); text-align: center; padding: var(--s10) var(--s6); color: var(--color-text-faint); }
.empty-icon-wrap { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--color-surface-2); color: var(--color-text-faint); }
.loading { color: var(--color-text-faint); font-size: 13px; }

/* kart içinde iki ayrı listeyi adlandıran küçük başlık */
.sub-list { display: flex; flex-direction: column; gap: var(--s2); }
.sub-list-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-faint); }

/* ═══════════════════════════════════════════════════════════════════
   Tam ekran düzeni — geniş viewport yoğunluğu

   Kabuğu viewport'a açmak (--shell) tek başına yetmiyor: kartlar tek
   sütun hâlinde alt alta dizildiğinde bu kez kartın *içi* boşalıyor,
   ölü alan kenardan içeri taşınmış oluyor. Bu yüzden geniş ekranlarda
   dikey yığınlar çok sütuna akıyor — kazanılan genişlik gerilmiş
   input'larla değil, yan yana gelen gerçek içerikle doluyor.

   Kasıtlı olarak DOKUNULMAYANLAR:
   - .w-200 / .w-320 / .pf-control .sel — bir ad ya da e-posta kısadır;
     kart boyunca germek daha önce düzeltilen "form bomboş görünüyor"
     sorununu geri getirir.
   - .wizard-shell (yeni site sihirbazı) — odaklanmış tek bir akış,
     ortada dar kalması bilinçli.
   - .nch-intro-text ve düz metin blokları — satır uzunluğu okunabilirlik
     sınırında tutuluyor.
   - login.html, mitigation.html, pages/*.html — bunlar ziyaretçiye
     gösterilen ara sayfalar; ortalanmış kart olmaları gerekiyor.

   Eşikler içeriğe göre: iki tablo yan yana ancak ~1600px'ten sonra
   nefes alıyor, form kartları ~1400px'te rahat ediyor.
   ═══════════════════════════════════════════════════════════════════ */

/* Kart içi form blokları: 720px sabit sınır, kart artık çok daha geniş
   olduğu için sağda büyük bir boşluk bırakıyordu. Sınır kalkmıyor ama
   auto-fit'in birden fazla sütun kurabileceği kadar yükseliyor. */
@media (min-width: 1400px) {
  .form-grid-2,
  .settings-card > .field,
  .settings-card > .form-grid-2 { max-width: 1120px; }
  .settings-control { max-width: 760px; }
}

/* Dashboard: KPI şeridi tam genişlik, altındaki iki tablo yan yana.
   Eşik 2100px, çünkü bu tablolar altı sütunlu: her birine en az ~1000px
   düşmezse IP ve kural adları kırpılmaya başlıyor. Daha dar ekranlarda
   tablolar tam genişlikte alt alta durur — okunabilirlik yoğunluktan
   önce gelir. */
@media (min-width: 2100px) {
  [data-section="dashboard"] .stack {
    display: grid; grid-template-columns: 1fr 1fr; align-items: start;
  }
  [data-section="dashboard"] .stack > .kpi-grid { grid-column: 1 / -1; margin-bottom: 0; }
}

/* Profil: kartlar tek kolonda 720px'e sıkışmak yerine yan yana akar;
   kimlik afişi tam genişlikte kalır. */
@media (min-width: 1400px) {
  [data-section="profile"] .stack {
    max-width: none;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
    align-items: start;
  }
  [data-section="profile"] .stack > .prof-banner { grid-column: 1 / -1; }
}

/* Site çalışma alanı: ayarlar sekmesi 2 sütunlu dengeli düzen */
.site-settings-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  width: 100%;
  align-items: stretch;
}
@media (max-width: 900px) {
  .site-settings-row-2 {
    grid-template-columns: 1fr;
  }
}
.site-settings-half-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0 !important;
  box-sizing: border-box;
}
.site-settings-half-card .card-head-text {
  margin-bottom: 14px;
}
.site-settings-half-card .kv-grid {
  flex: 1;
  display: grid;
  align-content: start;
  gap: var(--s2);
}

/* Bakım modu yapılandırması: Sol tarafta mod butonları (dikey), sağ tarafta dropzone/form */
.maint-config-split {
  display: grid;
  grid-template-columns: minmax(320px, 390px) 1fr;
  gap: var(--s4);
  align-items: stretch;
  width: 100%;
  min-height: 180px;
}
@media (max-width: 860px) {
  .maint-config-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}
.maint-config-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-width: 0;
}
.maint-type-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  height: 100%;
  width: 100%;
}
.maint-type-stack .mode-btn {
  flex: 1;
  width: 100%;
  min-height: 86px;
  max-height: 86px;
  padding: 12px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 860px) {
  .maint-type-stack .mode-btn {
    max-height: none;
    min-height: auto;
  }
}
.maint-config-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-width: 0;
}
.maint-content-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 180px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 860px) {
  .maint-content-panel {
    min-height: auto;
  }
}
.maint-dropzone-box {
  border: 2px dashed var(--color-hairline-strong);
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
  background: var(--color-surface-2);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 180px;
  box-sizing: border-box;
}
.maint-status-box {
  border: 1px solid var(--color-hairline-strong);
  border-radius: 12px;
  padding: 14px 20px;
  background: var(--color-surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 180px;
  box-sizing: border-box;
  text-align: center;
}
@media (max-width: 860px) {
  .maint-dropzone-box,
  .maint-status-box {
    min-height: 160px;
  }
}
.maint-file-loaded-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.maint-file-icon-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--color-surface-3, rgba(255,255,255,0.04));
  border: 1px solid var(--color-hairline);
  border-radius: 12px;
  margin-bottom: 2px;
}
.maint-file-check-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--good);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-surface-2);
}
.maint-file-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.maint-file-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.maint-file-meta-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.maint-file-size {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-dim);
}
.maint-file-badge {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  background: var(--good-soft);
  color: var(--good);
  border-radius: 4px;
}
.maint-file-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

/* Bildirimler: .nch-intro listenin başlığı, yanına değil üstüne ait.
   Genişlikten kazanan liste kendisi — kanal kartları yan yana dizilir. */
@media (min-width: 1500px) {
  .nch-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); align-items: start; }
}

/* ── CAPTCHA Tab Enhancement ──────────────────────────────────────── */
.chip-suggestion-wrap {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.chip-suggestion {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--color-surface-2); color: var(--color-text-dim);
  border: 1px solid var(--color-hairline); border-radius: var(--r-pill);
  padding: 3px 10px; font-size: 11.5px; font-weight: 500;
  cursor: pointer; transition: all .15s ease; user-select: none;
}
.chip-suggestion:hover {
  color: var(--color-text); border-color: var(--color-hairline-strong);
  background: var(--color-surface);
}

.code-box-wrap {
  border: 1px solid var(--color-hairline); border-radius: var(--r-md);
  background: var(--code-bg); margin-top: 4px; overflow: hidden;
}
.code-box-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px; background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-hairline);
  font-size: 11.5px; font-weight: 600; color: var(--color-text-dim);
}
.code-box-wrap pre {
  margin: 0; border: 0; border-radius: 0; padding: 10px 12px;
  font-size: 11px; line-height: 1.45; min-height: 0; max-height: none;
  overflow: hidden;
}
.code-box-wrap pre code {
  background: transparent; border: 0; padding: 0; font-size: 11px; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word; max-width: 100%; display: block;
}

.captcha-alert-secret {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline-strong);
  border-left: 4px solid var(--warn, #f59e0b);
  border-radius: var(--r-md);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.captcha-features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px; margin-top: 12px;
}
.captcha-feature-card {
  padding: 14px; background: var(--color-surface-2);
  border: 1px solid var(--color-hairline); border-radius: var(--r-sm);
  display: flex; gap: 12px; align-items: flex-start;
}
.captcha-feature-icon {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--color-surface); border: 1px solid var(--color-hairline);
  display: grid; place-items: center; flex: none; color: var(--color-accent);
}
.captcha-feature-info h5 {
  margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--color-text);
}
.captcha-feature-info p {
  margin: 0; font-size: 12px; color: var(--color-text-dim); line-height: 1.5;
}

.captcha-integration-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px;
}
@media (max-width: 900px) {
  .captcha-integration-grid { grid-template-columns: 1fr; }
}
.captcha-integration-card {
  background: var(--color-surface-2); border: 1px solid var(--color-hairline);
  border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.captcha-integration-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.captcha-integration-title {
  font-size: 13px; font-weight: 600; color: var(--color-text);
}

.captcha-snippet-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--color-hairline); padding-bottom: 6px; margin-bottom: 8px; flex-wrap: wrap;
}
.captcha-snippet-tab {
  background: transparent; border: none; font-size: 11.5px; font-weight: 500;
  color: var(--color-text-dim); padding: 3px 8px; border-radius: var(--r-xs); cursor: pointer; transition: all .15s ease;
}
.captcha-snippet-tab:hover {
  background: var(--color-surface-hover); color: var(--color-text);
}
.captcha-snippet-tab.active {
  background: var(--color-surface); color: var(--color-accent); font-weight: 600; border: 1px solid var(--color-hairline);
}
.captcha-snippet-pane {
  display: none;
}
.captcha-snippet-pane.active {
  display: block;
}

/* ── CAPTCHA Redesign & Activity Logs ── */
.captcha-keys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.captcha-card-box {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.captcha-card-box:hover {
  border-color: var(--color-hairline);
}

.captcha-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.captcha-card-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.captcha-card-value-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  gap: 12px;
}

.captcha-card-value-box:hover {
  border-color: var(--color-hairline);
}

.captcha-key-code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.02em;
  user-select: text;
  word-break: break-all;
  max-width: none !important;
}

.captcha-copy-btn {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--r-xs);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline-strong);
  color: var(--color-text);
  cursor: pointer;
  transition: all .15s ease;
  flex-shrink: 0;
}

.captcha-copy-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.captcha-copy-btn.copied {
  background: color-mix(in srgb, var(--good) 14%, var(--color-surface));
  border-color: var(--good);
  color: var(--good);
}

.captcha-card-meta {
  font-size: 12px;
  color: var(--color-text-dim);
  line-height: 1.45;
}

.captcha-meta-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.captcha-meta-items {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.captcha-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.captcha-meta-label {
  color: var(--color-text-dim);
  font-size: 11.5px;
  font-weight: 500;
}

.captcha-meta-val {
  color: var(--color-text);
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 500;
}

.captcha-meta-sep {
  width: 1px;
  height: 14px;
  background: var(--color-hairline);
}

.captcha-meta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captcha-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-hairline);
}

.captcha-filter-group {
  display: inline-flex;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 2px;
  gap: 2px;
}

.captcha-filter-btn {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-dim);
  padding: 5px 12px;
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.captcha-filter-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.captcha-filter-btn.active {
  background: var(--color-surface-2);
  color: var(--color-accent);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ── CAPTCHA Activity Table: Fixed proportional layout & zero gap anomalies ── */
.captcha-table-wrap {
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface);
  width: 100%;
}

.captcha-table-wrap table.captcha-table {
  width: 100%;
  min-width: 950px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12.5px;
}

.captcha-table-wrap table.captcha-table th,
.captcha-table-wrap table.captcha-table td {
  padding: 10px 12px;
  vertical-align: middle;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.captcha-table-wrap table.captcha-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-faint);
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-hairline);
}

.captcha-table-wrap table.captcha-table th.col-time   { width: 14%; padding-left: 16px; }
.captcha-table-wrap table.captcha-table th.col-ip     { width: 13%; }
.captcha-table-wrap table.captcha-table th.col-status { width: 11%; }
.captcha-table-wrap table.captcha-table th.col-reason { width: 25%; }
.captcha-table-wrap table.captcha-table th.col-http   { width:  7%; text-align: center; }
.captcha-table-wrap table.captcha-table th.col-req-id { width: 22%; }
.captcha-table-wrap table.captcha-table th.col-inspect{ width:  8%; text-align: right; padding-right: 16px; }

.captcha-table-wrap table.captcha-table td.cell-time {
  padding-left: 16px;
  font-variant-numeric: tabular-nums;
}
.captcha-table-wrap table.captcha-table td.cell-time .time-date {
  color: var(--color-text-faint);
  font-size: 11.5px;
  margin-right: 5px;
}
.captcha-table-wrap table.captcha-table td.cell-time .time-clock {
  color: var(--color-text);
  font-weight: 500;
}

.captcha-table-wrap table.captcha-table td.cell-ip {
  vertical-align: middle !important;
}

.captcha-table-wrap table.captcha-table td.cell-ip .ip-text,
.captcha-table-wrap table.captcha-table td.cell-ip span,
.captcha-table-wrap table.captcha-table td.cell-ip code {
  font-size: 12px !important;
  color: var(--color-text) !important;
  font-weight: 500 !important;
  user-select: text !important;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

.captcha-table-wrap table.captcha-table td.cell-reason {
  overflow: hidden;
  text-overflow: ellipsis;
}
.captcha-table-wrap table.captcha-table td.cell-reason .reason-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.35;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.captcha-table-wrap table.captcha-table td.cell-reason .rule-name {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: var(--color-text-faint);
  display: block;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.captcha-table-wrap table.captcha-table td.cell-http {
  text-align: center;
  vertical-align: middle !important;
}

.captcha-table-wrap table.captcha-table td.cell-status {
  vertical-align: middle !important;
}

.captcha-table-wrap table.captcha-table td.cell-req-id {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle !important;
}
.captcha-table-wrap table.captcha-table td.cell-req-id .req-id-plain {
  font-family: var(--font-mono, monospace) !important;
  font-size: 11.5px !important;
  color: var(--color-text-dim) !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  user-select: text !important;
  white-space: nowrap !important;
  display: inline-block !important;
  vertical-align: middle !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: none !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.captcha-table-wrap table.captcha-table td.cell-actions {
  padding-right: 16px;
  text-align: right;
  vertical-align: middle !important;
}

/* ── Unified Table Standards (Design Rules) ── */
.cell-time {
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  vertical-align: middle !important;
}

.cell-time .time-date {
  color: var(--color-text-faint) !important;
  font-size: 11.5px !important;
  margin-right: 5px !important;
  display: inline !important;
}

.cell-time .time-clock {
  color: var(--color-text) !important;
  font-weight: 500 !important;
  display: inline !important;
}

/* Unified IP Cells: Clean, flat, selectable, zero button/box frames */
td.cell-ip {
  vertical-align: middle !important;
}

.cell-ip .ip-text,
.cell-ip code,
.cell-ip span {
  font-family: var(--font-mono, monospace) !important;
  font-size: 12px !important;
  color: var(--color-text) !important;
  font-weight: 500 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  user-select: text !important;
  white-space: nowrap !important;
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: inherit !important;
}

.cell-ip code:focus,
.cell-ip code:active,
.cell-ip span:focus,
.cell-ip span:active,
.cell-ip .ip-text:focus,
.cell-ip .ip-text:active {
  outline: none !important;
  box-shadow: none !important;
}

/* ── Metric Card Date Values (Calm, Default Sans-serif Typography) ── */
.summary-metric-value.metric-date-value,
#captcha-stat-last {
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--color-text-dim) !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  font-variant-numeric: tabular-nums;
}

.force-ssl-wrap,
.force-ssl-wrap .sel,
#force-ssl-select {
  width: 270px !important;
  min-width: 270px !important;
  max-width: 270px !important;
  box-sizing: border-box !important;
  flex: 0 0 270px !important;
}

.force-ssl-wrap .sel-btn {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 760px) {
  .force-ssl-wrap,
  .force-ssl-wrap .sel,
  #force-ssl-select {
    min-width: 200px !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }
}

/* ══ SİSTEM ANALİZİ ═══════════════════════════════════════════════════════
   Bulgu kartları var olan `.settings-card` üzerine oturur; buradaki tek ek,
   ciddiyeti sol kenardan renkle okutmak ve kanıt/eylem bölümlerini ayırmak.
   Renkler yalnızca jetonlardan gelir, koyu tema kendiliğinden çalışır. */

.sa-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s5); }
.sa-intro-text { flex: 1; min-width: 0; }
.sa-intro-text p { margin: var(--s2) 0 0; }
.sa-scope-note { color: var(--color-text-faint); }
.sa-intro > button { flex: 0 0 auto; }

.sa-summary-card { display: grid; gap: var(--s5); }
.sa-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.sa-headline { font-size: 15px; font-weight: 600; letter-spacing: -.02em; margin-top: var(--s1); }
.sa-summary-meta { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }

.sa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); }
.sa-stat { background: var(--color-surface-2); border: 1px solid var(--color-hairline); border-radius: var(--r-sm); padding: var(--s3) var(--s4); }
.sa-stat-label { font-size: 12px; color: var(--color-text-faint); }
.sa-stat-value { font-size: 17px; font-weight: 600; margin-top: var(--s1); }

.sa-findings { display: grid; gap: var(--s5); }
.sa-findings:empty { display: none; }

.sa-finding { border-left: 3px solid var(--color-hairline-strong); display: grid; gap: var(--s3); }
.sa-finding.sa-sev-critical { border-left-color: var(--bad); }
.sa-finding.sa-sev-warning { border-left-color: var(--warn); }
.sa-finding.sa-sev-info { border-left-color: var(--info); }
.sa-finding.sa-sev-ok { border-left-color: var(--good); }

.sa-finding-head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.sa-finding-head h3 { margin: 0; flex: 1; min-width: 0; }
.sa-head-actions { display: inline-flex; align-items: center; gap: var(--s2); margin-left: auto; }
.sa-dismiss-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: var(--r-pill);
  border: 1px solid var(--color-hairline-strong);
  background: var(--color-surface);
  color: var(--color-text-dim);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s ease;
}
.sa-dismiss-btn:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
}
:root[data-theme="dark"] .sa-dismiss-btn {
  background: var(--color-surface);
  border-color: var(--color-hairline-strong);
  color: var(--color-text-dim);
}
:root[data-theme="dark"] .sa-dismiss-btn:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
}
.sa-sev-chip {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid currentColor; flex: 0 0 auto;
}
.sa-sev-critical .sa-sev-chip { color: var(--bad); background: var(--bad-soft); }
.sa-sev-warning .sa-sev-chip { color: var(--warn); background: var(--warn-soft); }
.sa-sev-info .sa-sev-chip { color: var(--info); background: var(--info-soft); }
.sa-sev-ok .sa-sev-chip { color: var(--good); background: var(--good-soft); }

.sa-finding-summary { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--color-text); max-width: 78ch; }
.sa-finding-tools { display: flex; gap: var(--s3); }
.sa-evidence-btn {
  min-height: 28px; padding: 0 var(--s2); font-size: 12px;
  /* Kenarlıksız bir düğme düz metinden ayırt edilemiyordu; altı çizgi tek
     başına "bu tıklanabilir" sinyalini veriyor. */
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--color-hairline-strong);
}
.sa-evidence-btn:hover { text-decoration-color: currentColor; }

.sa-evidence {
  background: var(--color-surface-2); border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm); padding: var(--s4); display: grid; gap: var(--s4);
}
.sa-evidence ul { margin: 0; padding-left: var(--s5); display: grid; gap: var(--s1); font-size: 13px; }
.sa-rays { font-size: 12px; color: var(--color-text-dim); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.sa-rays-label { color: var(--color-text-faint); }
.sa-steps-title { font-size: 12px; font-weight: 600; color: var(--color-text-faint); margin-bottom: var(--s2); }
.sa-steps ol { margin: 0; padding-left: var(--s5); display: grid; gap: var(--s1); font-size: 13px; }

.sa-action { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding-top: var(--s2); }
.sa-action-denied { color: var(--color-text-dim); }
.sa-action-denied .small { max-width: 62ch; }

.sa-clean { text-align: center; }
.sa-clean-title { font-size: 15px; font-weight: 600; letter-spacing: -.02em; margin-bottom: var(--s2); }
.sa-clean p { margin: 0 auto; max-width: 62ch; }

.sa-history-card { padding: 0; overflow: hidden; }
.sa-history-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: 14px 20px; border-bottom: 1px solid var(--color-hairline);
  background: var(--surface-subtle);
}
.sa-history-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.sa-history-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.sa-history-wrap { --tbl-min: 720px; overflow-x: auto; }

.sa-history-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto !important; }
.sa-history-table th {
  background: var(--surface-subtle); color: var(--muted); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px; padding: 11px 20px;
  border-bottom: 1px solid var(--color-hairline); text-align: left;
  overflow: visible !important; text-overflow: clip !important; white-space: nowrap !important;
}
.sa-history-table td {
  padding: 12px 20px; border-bottom: 1px solid var(--color-hairline); vertical-align: middle;
  overflow: visible !important; text-overflow: clip !important; white-space: normal !important;
}
.sa-history-table td span {
  display: inline; overflow: visible; text-overflow: clip; margin-top: 0;
}
.sa-history-table tbody tr:last-child td { border-bottom: none; }
.sa-history-table tbody tr:hover { background: var(--surface-hover); }

.sa-hist-time {
  white-space: nowrap !important; font-size: 12px; line-height: 1.3;
}
.sa-hist-time .time-date { font-weight: 600; color: var(--text-main); margin-right: 6px; }
.sa-hist-time .time-clock { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.sa-hist-main { display: flex; flex-direction: column; gap: 3px; }
.sa-hist-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sa-hist-title { font-weight: 600; font-size: 13px; color: var(--text-main); }
.sa-hist-badges { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.sa-diff-pill {
  display: inline-flex !important; align-items: center; gap: 4px; padding: 2px 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  border-radius: var(--r-pill); line-height: 1.2;
}
.sa-diff-pill.add { background: var(--good-soft); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 25%, transparent); }
.sa-diff-pill.del { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent); }
.sa-diff-pill.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.sa-diff-pill.info { background: var(--color-surface-2); color: var(--color-text-dim); border: 1px solid var(--color-hairline); }

.sa-hist-sub { font-size: 11.5px; line-height: 1.3; color: var(--muted); display: block !important; }

.sa-hist-status .tag {
  display: inline-flex !important;
}

.sa-hist-actions {
  text-align: right; white-space: nowrap !important; overflow: visible !important; text-overflow: clip !important;
}
.sa-undo-btn { font-size: 11.5px; padding: 3px 10px; height: 26px; line-height: 1; border-radius: var(--r-sm); margin: 0 !important; }

/* Onay penceresi: iki sütunlu önce/sonra. Dar ekranda alt alta iner. */
.sa-consent-what > div:last-child { font-size: 13.5px; margin-top: var(--s1); }
.sa-consent-diff { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.sa-diff-col { display: grid; gap: var(--s1); min-width: 0; }
.sa-consent-diff pre {
  margin: 0; padding: var(--s3); font-size: 12px; line-height: 1.5;
  background: var(--code-bg); color: var(--code-text);
  border: 1px solid var(--color-hairline); border-radius: var(--r-sm);
  white-space: pre-wrap; word-break: break-all; max-height: 160px; overflow: auto;
}
.sa-consent-note { display: grid; gap: var(--s2); }
.sa-consent-note p { margin: 0; }

@media (max-width: 760px) {
  .sa-intro { flex-direction: column; }
  .sa-consent-diff { grid-template-columns: 1fr; }
}

/* Kapsamlı WAF istisnaları — satır bazlı hata listesi */
.waf-exc-errors { display: grid; gap: var(--s2); margin-top: var(--s2); }
.waf-exc-error {
  font-size: 12.5px; line-height: 1.5; color: var(--bad);
  background: var(--bad-soft); border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm); padding: var(--s2) var(--s3);
}
.waf-exc-line { font-weight: 600; margin-right: var(--s1); }
.waf-exc-error code { margin-left: var(--s1); }


.dns-card-badge-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid var(--color-hairline);
}
.dns-step-badge {
  font-size: 11.5px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.badge-txt { color: #0284c7; }
.badge-txt-pill {
  background: rgba(2, 132, 199, 0.12) !important; color: #0284c7 !important;
  border-color: rgba(2, 132, 199, 0.25) !important;
}
.dns-txt-note {
  margin-top: var(--s2); padding: 8px 12px; background: var(--surface-subtle);
  border-radius: var(--r-sm); font-size: 11.5px; line-height: 1.4;
}
.text-wrap-break { word-break: break-all; }


.onboard-error-banner {
  margin-top: 8px; padding: 10px 14px; background: var(--bad-soft); color: var(--bad);
  border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 8px;
}
.dns-target-group {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; width: 100%;
}
.dns-copy-btn.icon-only {
  width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); border: 1px solid var(--color-hairline); background: var(--surface-subtle);
  color: var(--color-text-dim); cursor: pointer; flex-shrink: 0; transition: all 0.15s ease;
}
.dns-copy-btn.icon-only:hover {
  background: var(--surface-hover); color: var(--color-text); border-color: var(--color-hairline-strong);
}

/* ── Global Centered Nexren Shield Loading Overlay ─────────────────── */
.global-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 17, 23, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.global-loader-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.global-loader-card {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-lg, 16px);
  padding: 28px 32px;
  min-width: 280px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  box-shadow: 0 24px 54px -12px rgba(0, 0, 0, 0.55),
              0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: scale(0.92) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.global-loader-overlay.active .global-loader-card {
  transform: scale(1) translateY(0);
}

.global-loader-logo-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.global-loader-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.global-loader-pulse {
  display: none !important;
}

.global-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.global-loader-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1.25;
}

.global-loader-subtitle {
  font-size: 12px;
  color: var(--color-text-dim);
  line-height: 1.35;
}

.global-loader-bar-wrap {
  width: 100%;
  padding: 2px 0 0;
}

.global-loader-bar-track {
  width: 100%;
  height: 4px;
  background: var(--color-surface-2, rgba(255, 255, 255, 0.08));
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.global-loader-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--color-accent, #1a8055), #4ade80, transparent);
  animation: loader-beam 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes loader-beam {
  0% {
    left: -50%;
  }
  100% {
    left: 100%;
  }
}

/* ── Support Drawer & Ticket Center ───────────────────────────────── */
.drawer.drawer-support {
  width: min(680px, 100%);
}

.drawer.drawer-admin-support {
  width: min(720px, 100%);
}

.support-top-controls {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-bottom: var(--s2);
}

.support-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}

.support-filter-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--color-surface-2);
  padding: 3px;
  border-radius: var(--r-md);
  border: 1px solid var(--color-hairline);
}

.support-tab-btn {
  background: none;
  border: none;
  padding: 5px 11px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color .1s ease, color .1s ease;
  transform: none !important;
}

.support-tab-btn:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.support-tab-btn.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  font-weight: 600;
}

.support-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  background: var(--color-hairline);
  color: var(--color-text-dim);
  font-weight: 600;
}

.support-tab-btn.active .support-tab-count {
  background: var(--color-hairline-strong);
  color: var(--color-text);
}

.support-search-wrap {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.support-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
}

.support-search-input {
  width: 100%;
  box-sizing: border-box !important;
  padding: 7px 12px 7px 32px !important;
  font-size: 13px !important;
  background: var(--color-surface-2) !important;
  border: 1px solid var(--color-hairline) !important;
  border-radius: var(--r-md) !important;
  transition: border-color .12s ease, background-color .12s ease;
}

.support-search-input:focus {
  background: var(--color-surface) !important;
  border-color: var(--color-hairline-strong) !important;
}

/* Ticket cards */
.support-ticket-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.support-ticket-card {
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transform: none !important;
}

.support-ticket-card:hover {
  background: var(--color-surface-2);
  border-color: var(--color-hairline-strong);
  transform: none !important;
}

.support-ticket-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
}

.support-ticket-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.support-ticket-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.support-ticket-preview {
  font-size: 12.5px;
  color: var(--color-text-dim);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.support-ticket-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--color-text-faint);
  flex-wrap: wrap;
  padding-top: 5px;
  border-top: 1px solid var(--color-hairline);
}

.support-ticket-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Create Form in Drawer */
.support-form-container {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.support-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s3);
}

.support-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.support-form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.support-form-group input,
.support-form-group select,
.support-form-group textarea {
  width: 100%;
}

.support-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s3);
  padding-top: var(--s2);
}

/* ── Modern Support Detail & Conversation View ────────────────── */
.support-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.support-detail-back,
.support-detail-back:hover,
.support-detail-back:active,
.support-detail-back:focus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-dim);
  background: var(--color-surface) !important;
  border: 1px solid var(--color-hairline) !important;
  border-radius: var(--r-pill) !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer;
  padding: 5px 12px;
  transition: all .15s ease;
  transform: none !important;
}

.support-detail-back:hover {
  color: var(--color-text) !important;
  background: var(--color-surface-2) !important;
  border-color: var(--color-text-faint) !important;
}

.support-detail-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--color-text-faint);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all .15s ease;
  user-select: text;
}
.support-detail-id-pill:hover {
  color: var(--color-text);
  border-color: var(--color-text-dim);
}

.support-detail-hero {
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.support-detail-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.support-detail-hero-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.support-detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px 14px;
  font-size: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-hairline);
}

.support-detail-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.support-detail-meta-key {
  color: var(--color-text-faint);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}

.support-detail-meta-val {
  color: var(--color-text);
  font-weight: 500;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Conversation Thread */
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.support-msg {
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  transition: border-color .15s ease;
}

.support-msg.is-me {
  background: var(--color-surface-2);
  border-color: rgba(255, 255, 255, 0.08);
}

.support-msg.is-team {
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.05);
}

.support-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-hairline);
}

.support-msg-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.support-msg-body {
  font-size: 13.5px;
  color: var(--color-text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.support-reply-card {
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.support-reply-card h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Inbound Origins & Discovered Hosts ───────────────────────────── */
.origins-filter-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.origins-filter-bar input[type="search"] {
  width: 220px;
  min-width: 150px;
  height: 34px;
  font-size: 12.5px;
  margin: 0;
  padding: 6px 10px;
}

.origins-filter-bar select {
  width: 185px;
  min-width: 140px;
  height: 34px;
  font-size: 12.5px;
  margin: 0;
  padding: 4px 8px;
}

.origins-filter-bar .mini-btn {
  height: 34px;
  white-space: nowrap;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.origin-table th {
  white-space: nowrap !important;
}

.origin-host-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.origin-favicon {
  width: 18px;
  height: 18px;
  border-radius: var(--r-sm, 4px);
  flex-shrink: 0;
  background: var(--color-surface-2);
  object-fit: contain;
}

.origin-no-favicon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
}

.origin-host-title {
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.origin-host-title:hover {
  color: var(--color-primary, #3b82f6);
  text-decoration: underline;
}

.origin-subpath {
  display: block;
  font-size: 11px;
  color: var(--color-text-dim);
  font-family: var(--font-mono, monospace);
  margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════════════
   Credentials (Kimlik Bilgileri & Entegrasyonlar) Stilleri
   ═══════════════════════════════════════════════════════════════════ */
[data-section="credentials"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

#credentials-page {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.cred-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: var(--s3);
  margin-bottom: var(--s5);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cred-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s5);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  box-sizing: border-box;
}

.cred-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.cred-stat-label {
  font-size: 12px;
  color: var(--color-text-dim);
}

.cred-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cred-search-box {
  position: relative;
  min-width: 240px;
  max-width: 100%;
  flex: 1;
  box-sizing: border-box;
}

.cred-search-box input {
  width: 100%;
  padding-left: 32px;
  box-sizing: border-box;
}

.cred-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
}

.cred-filter-chips {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

.cred-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cred-filter-chip:hover {
  border-color: var(--color-hairline-strong);
  color: var(--color-text);
}

.cred-filter-chip.active {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border-color: var(--color-accent);
}

.cred-filter-count {
  font-size: 11px;
  font-family: var(--font-mono);
  opacity: 0.8;
}

/* ── Credentials (Kimlik Bilgileri) Sayfası ────────────────────────── */
.cred-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  margin-bottom: var(--s4);
}

.cred-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
}

.cred-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

.cred-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
}

.cred-search-wrap svg {
  position: absolute;
  left: 10px;
  color: var(--color-text-faint);
  pointer-events: none;
}

.cred-search-wrap input {
  padding-left: 32px;
  height: 34px;
  font-size: 13px;
  border-radius: var(--r-sm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
}

/* ── Credentials (Kimlik Bilgileri) Liste / Tablo Görünümü ─────────── */
.cred-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--color-hairline);
  background: var(--color-surface);
}

.cred-table {
  width: 100%;
  min-width: 1240px;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: left;
}

.cred-table th {
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-hairline);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-faint);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  box-sizing: border-box;
}

.cred-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-hairline);
  vertical-align: middle;
  font-size: 12.5px;
  color: var(--color-text);
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cred-row {
  transition: background-color .12s ease;
}

.cred-row:last-child td {
  border-bottom: none;
}

.cred-row:hover {
  background: var(--color-surface-2);
}

.cred-type-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.cred-type-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cred-type-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

.cred-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
}

.cred-name-strong {
  font-weight: 600;
  color: var(--color-text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cred-user-pill {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  color: var(--color-text-dim);
}

.cred-target-text {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cred-type-filter-wrap select {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.cred-type-filter-wrap select:focus {
  border-color: var(--color-accent);
}

.cred-secret-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.cred-secret-val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--color-text);
  background: var(--color-surface-2);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--color-hairline);
  display: inline-block;
  letter-spacing: 0.04em;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: text;
  transition: max-width 0.2s ease, border-color 0.15s ease, background 0.15s ease;
}

.cred-secret-val.is-revealed {
  max-width: 320px;
  background: var(--color-surface);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ── Credential Drawer Input & Action Enhancements ─────────────────── */
.drawer-section .field input,
.drawer-section .field select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  font-size: 13.5px;
  padding: 8px 13px;
  box-sizing: border-box;
}

.cred-input-peek-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.cred-input-peek-group input,
.cred-input-peek-group .cred-field-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 13px !important;
  font-size: 13.5px !important;
  font-family: var(--font-mono) !important;
  line-height: normal !important;
  border-radius: var(--r-sm) !important;
  background: var(--color-surface) !important;
  border: 1px solid var(--color-hairline-strong) !important;
  color: var(--color-text) !important;
  box-sizing: border-box !important;
  letter-spacing: normal !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cred-input-peek-group input[type="password"] {
  letter-spacing: 0.15em !important;
}

.cred-input-peek-group input[type="text"] {
  letter-spacing: normal !important;
}

.cred-input-peek-group .field-toggle-pwd {
  position: static !important;
  transform: none !important;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 42px;
  max-height: 42px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--color-text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.cred-input-peek-group .field-toggle-pwd:hover {
  color: var(--color-text);
  background: var(--color-surface-3, rgba(255, 255, 255, 0.08));
  border-color: var(--color-accent);
}

.cred-input-peek-group .field-toggle-pwd svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

.cell-cred-sites .cred-sites-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  max-width: 100%;
}

.cred-site-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  color: var(--color-text);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: border-color .15s, color .15s;
  max-width: max-content;
  white-space: nowrap;
}

.cred-site-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.cred-site-pill-global {
  background: var(--color-surface-2);
  border-color: var(--color-hairline-strong);
  color: var(--color-text);
  cursor: default;
}
.cred-site-pill-global svg {
  color: var(--info, #2f5fa8);
  flex-shrink: 0;
}

.cred-site-fav {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  object-fit: contain;
  flex-shrink: 0;
}

.cell-cred-owner .cred-owner-tag {
  font-size: 11.5px;
  color: var(--color-text-dim);
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.cred-owner-tag.is-me {
  color: var(--good);
  font-weight: 500;
}

.cell-cred-lang {
  white-space: nowrap;
}

.cell-cred-id .cred-id-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-faint);
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  user-select: text;
  display: inline-block;
  letter-spacing: 0.02em;
  cursor: default;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-icon-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dim);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.mini-icon-btn:hover {
  color: var(--color-text);
  border-color: var(--color-hairline-strong);
  background: var(--color-surface-2);
}

.mini-icon-btn.copied {
  color: var(--good) !important;
  border-color: var(--good) !important;
}

.cred-actions-cluster {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
  max-width: 100%;
}

.cred-actions-cluster .mini-btn {
  margin: 0;
  padding: 2px 8px;
  font-size: 11.5px;
  height: 26px;
  flex-shrink: 0;
}

/* Modal / Drawer Credential Type Selector Grid */
.cred-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: var(--s4);
}

.cred-type-tile {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.cred-type-tile:hover {
  border-color: var(--color-hairline-strong);
  background: var(--color-surface-2);
  transform: translateY(-1px);
}

.cred-type-tile.active {
  border-color: var(--color-accent);
  background: var(--color-surface-2);
  box-shadow: 0 0 0 1.5px var(--color-accent);
}

.cred-type-tile-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  transition: all 0.15s ease;
}

.cred-type-tile-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.cred-type-tile.active .cred-type-tile-icon {
  border-color: var(--color-accent);
}

.cred-type-tile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cred-type-tile-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.cred-type-tile-text span {
  font-size: 11.5px;
  color: var(--color-text-faint);
  line-height: 1.35;
}

.cred-qr-preview-box {
  background: #ffffff;
  padding: 14px;
  border-radius: var(--r-md);
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
  margin: 0 auto;
}

.cred-qr-preview-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cred-test-panel {
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cred-test-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cred-test-panel-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text);
}

.cred-totp-test-input {
  width: 140px;
  height: 38px;
  text-align: center;
  font-size: 18px;
  font-family: var(--font-mono, monospace);
  letter-spacing: 4px;
  font-weight: 700;
  margin: 0;
  border-radius: var(--r-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline-strong);
  color: var(--color-text);
}

.cred-config-toggle-card {
  width: 100%;
  box-sizing: border-box;
  margin-top: var(--s3);
  padding: 14px 16px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

#ce-notif-config-container {
  width: 100%;
  box-sizing: border-box;
}

#ce-notif-config-container .nch-event-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s4);
}

#ce-notif-config-container .nch-editor {
  width: 100%;
  box-sizing: border-box;
  min-height: 380px;
  font-size: 13px;
  font-family: var(--font-mono);
  line-height: 1.6;
  overflow-y: hidden;
}

/* ── Credential Brand Watermark & Guarded Template Styles ──────────── */
.cred-brand-watermark-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--r-md);
  margin-bottom: var(--s3);
}

.cred-brand-watermark-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.cred-brand-watermark-content {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-dim);
}

.cred-brand-watermark-content strong {
  color: var(--color-text);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.cred-preview-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-top: var(--s3);
}

.cred-preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cred-preview-watermark {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--color-hairline);
  font-size: 11.5px;
  color: var(--color-text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Enhanced Detailed Notification Module Cards ───────────────────── */
.nch-preset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--color-surface-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--color-hairline);
}

.nch-preset-btn {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  color: var(--color-text-dim);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nch-preset-btn:hover {
  background: var(--color-surface-3, rgba(255,255,255,0.08));
  color: var(--color-text);
  border-color: var(--color-accent);
}

.nch-module-group {
  margin-bottom: 16px;
}

.nch-module-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-dim);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--color-hairline);
}

.nch-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.nch-detail-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-md);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.nch-detail-card:hover {
  background: var(--color-surface-3, rgba(255, 255, 255, 0.05));
  border-color: var(--color-hairline-strong);
}

.nch-detail-card.is-active {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.04);
}

.nch-detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nch-detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nch-detail-icon {
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
}

.nch-detail-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text);
}

.nch-detail-desc {
  font-size: 11px;
  color: var(--color-text-dim);
  line-height: 1.4;
  margin: 6px 0 8px 0;
}

.nch-detail-sample {
  display: inline-block;
  font-size: 10.5px;
  font-family: var(--font-mono);
  padding: 2px 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: 4px;
  color: var(--color-accent);
  align-self: flex-start;
}

.nch-custom-instructions {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  max-height: 160px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: var(--r-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-hairline-strong);
  color: var(--color-text);
  resize: vertical;
}

.nch-var-chip-btn {
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 11.5px;
  color: var(--color-text-dim);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.nch-var-chip-btn:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-surface-3, rgba(255, 255, 255, 0.08));
}

/* ── Global / Platform-Geneli Bildirimler ───────────────────────────── */
.global-scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 500;
  background: rgba(30, 144, 255, 0.12);
  color: #1e90ff;
  border: 1px solid rgba(30, 144, 255, 0.25);
  white-space: nowrap;
}

.global-scope-pill.scope-all {
  background: rgba(40, 167, 69, 0.12);
  color: var(--good);
  border-color: rgba(40, 167, 69, 0.25);
}

.global-scope-pill.scope-custom {
  background: rgba(255, 193, 7, 0.12);
  color: #d39e00;
  border-color: rgba(255, 193, 7, 0.25);
}

.cred-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.cred-picker-card {
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
  user-select: none;
}

.cred-picker-card:hover {
  border-color: var(--color-hairline-strong);
  background: var(--color-surface-3, rgba(255,255,255,0.06));
}

.cred-picker-card.is-selected {
  border-color: var(--color-accent);
  background: rgba(30, 144, 255, 0.08);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.cred-picker-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.cred-picker-info {
  min-width: 0;
  flex: 1;
}

.cred-picker-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cred-picker-sub {
  font-size: 11px;
  color: var(--color-text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-picker-container {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  background: var(--color-surface-2);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--color-text);
}

/* ── Minimal Language Segmented Control ── */
.minimal-lang-segmented {
  display: inline-flex;
  align-items: center;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 3px;
  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  user-select: none;
}

.lang-seg-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-dim);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  height: 32px;
  box-sizing: border-box;
}

.lang-seg-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-3, rgba(255, 255, 255, 0.04));
}

.lang-seg-btn.active {
  background: var(--color-surface);
  color: var(--color-accent);
  font-weight: 600;
  border-color: var(--color-hairline);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ── Custom Credential Select Dropdown (Instant, Zero Animation) ── */
.custom-select-dropdown {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline);
  border-radius: var(--r-sm);
  color: var(--color-text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}

.custom-select-trigger:hover {
  border-color: var(--color-hairline-strong);
  background: var(--color-surface-2);
}

.custom-select-dropdown.is-open .custom-select-trigger {
  border-color: var(--color-hairline-strong);
}

.custom-select-arrow {
  flex-shrink: 0;
  color: var(--color-text-dim);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface-2);
  border: 1px solid var(--color-hairline-strong);
  border-radius: var(--r-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  padding: 4px;
}

.custom-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.custom-select-option:hover {
  background: var(--color-surface-3, rgba(255,255,255,0.08));
}

.custom-select-option.selected {
  background: rgba(30, 144, 255, 0.12);
  color: var(--color-text);
  font-weight: 600;
}

.custom-select-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.custom-select-icon svg {
  width: 18px;
  height: 18px;
}

.custom-select-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-check {
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Plan Permissions & Category Cards ────────────────────────────── */
.plan-cat-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.plan-cat-card:hover {
  border-color: var(--color-hairline-strong, #3b4252);
}
.plan-feat-label {
  transition: all 0.15s ease;
}
.plan-feat-label:hover {
  border-color: var(--color-accent, #3b82f6) !important;
  background: var(--color-surface-3, rgba(255, 255, 255, 0.05)) !important;
}
.plan-feat-label input:checked ~ div strong {
  color: var(--color-accent, #3b82f6);
}

/* ── Clean Flat Control Standard: Strictly Zero White Glows & Zero Hover Border Flashes ── */
input, select, textarea, button,
.sel-btn, .sel-combobox-input, .custom-select-trigger, .custom-dropdown-btn, .site-scope-btn,
.mode-btn, .filter-btn, .policy-toggle-card, .category-group, .rule-item, .list-item-row,
.origin-lock-snippet-btn, .sa-dismiss-btn, .mini-icon-btn, .tabstrip-all-sites-btn,
input:hover, select:hover, textarea:hover, button:hover,
.sel-btn:hover, .sel-combobox-input:hover, .custom-select-trigger:hover, .custom-dropdown-btn:hover,
input:focus, select:focus, textarea:focus, button:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible,
.sel-btn:focus, .sel.open .sel-btn, .sel-combobox-input:focus, .sel.open .sel-combobox-input,
.custom-select-dropdown.is-open .custom-select-trigger,
input:active, select:active, textarea:active, button:active {
  box-shadow: none !important;
  outline: none !important;
}

:root[data-theme="dark"] input:hover,
:root[data-theme="dark"] select:hover,
:root[data-theme="dark"] textarea:hover,
:root[data-theme="dark"] .sel-btn:hover,
:root[data-theme="dark"] .sel.open .sel-btn,
:root[data-theme="dark"] .sel-combobox-input:hover,
:root[data-theme="dark"] .sel-combobox-input:focus,
:root[data-theme="dark"] .sel.open .sel-combobox-input,
:root[data-theme="dark"] .custom-select-trigger:hover,
:root[data-theme="dark"] .custom-select-dropdown.is-open .custom-select-trigger,
:root[data-theme="dark"] .custom-dropdown-btn:hover,
:root[data-theme="dark"] .custom-dropdown.open .custom-dropdown-btn,
:root[data-theme="dark"] .site-scope-btn:hover,
:root[data-theme="dark"] .mode-btn:hover:not(.active),
:root[data-theme="dark"] .filter-btn:hover:not(.active),
:root[data-theme="dark"] .policy-toggle-card:hover,
:root[data-theme="dark"] .category-group:hover,
:root[data-theme="dark"] .rule-item:hover,
:root[data-theme="dark"] .list-item-row:hover,
:root[data-theme="dark"] .origin-lock-snippet-btn:hover:not(.active),
:root[data-theme="dark"] .tabstrip-all-sites-btn:hover,
:root[data-theme="dark"] button.secondary:hover,
:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus,
:root[data-theme="dark"] input:focus-visible,
:root[data-theme="dark"] select:focus-visible,
:root[data-theme="dark"] textarea:focus-visible {
  border-color: var(--color-hairline-strong) !important;
  box-shadow: none !important;
  outline: none !important;
}

/* ── Monitor Stability & Zero Layout Jitter ── */
#mon-top-paths,
#mon-top-ips {
  contain: paint layout;
}

#mon-top-paths tr,
#mon-top-ips tr {
  height: 38px;
}
