/* Domain Parking Tool — Neutral, normales Dashboard-Look */

:root {
  --bg: #f5f6f8;
  --bg-2: #eceef2;
  --card: #ffffff;
  --border: #e3e5ea;
  --border-strong: #cdd0d6;
  --text: #15171c;
  --muted: #6b7280;
  --muted-2: #9098a4;
  --accent: #18181b;
  --accent-soft: #f1f2f5;
  --accent-soft-2: #e5e7ec;
  --accent-ink: #0a0a0c;
  --link: #1f4e96;
  --red: #b42318;
  --red-soft: #fdecea;
  --orange: #c2410c;
  --orange-soft: #fcebd5;
  --yellow: #8a6300;
  --yellow-soft: #fbf0d0;
  --green: #15803d;
  --green-soft: #e2f1e6;
  --shadow-sm: 0 1px 0 rgba(15,17,22,.04);
  --shadow-md: 0 1px 0 rgba(15,17,22,.04), 0 4px 12px rgba(15,17,22,.06);

  --font-ui: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-display: var(--font-ui);
  --font-body: var(--font-ui);

  --row-h: 36px;
  --row-pad-y: 7px;
  --row-pad-x: 12px;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-2: #181b22;
  --card: #181b22;
  --border: #272a33;
  --border-strong: #3a3e49;
  --text: #e6e8ee;
  --muted: #9098a6;
  --muted-2: #6b7280;
  --accent: #f4f5f7;
  --accent-soft: #232631;
  --accent-soft-2: #2c303c;
  --accent-ink: #ffffff;
  --link: #7ba6e6;
  --red: #f37060;
  --red-soft: #3a1d1a;
  --orange: #e89255;
  --orange-soft: #3a2618;
  --yellow: #d9b56a;
  --yellow-soft: #2e2614;
  --green: #6cc785;
  --green-soft: #1a2e22;
  --shadow-sm: 0 1px 0 rgba(0,0,0,.18);
  --shadow-md: 0 1px 0 rgba(0,0,0,.18), 0 8px 24px rgba(0,0,0,.4);
}

[data-density="compact"]    { --row-h: 30px; --row-pad-y: 5px; --row-pad-x: 10px; }
[data-density="comfortable"]{ --row-h: 44px; --row-pad-y: 12px; --row-pad-x: 14px; }

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "wdth" 100;
}
::selection { background: var(--accent-soft-2); color: var(--accent-ink); }

button { font: inherit; color: inherit; }
code { font-family: var(--font-data); font-size: 12px; }

/* ── App shell ─────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Top navigation */
.topnav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 22px;
  height: 52px;
  position: relative;
  z-index: 10;
}
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.topnav-mark {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--card);
  display: grid; place-items: center;
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 600;
}
.topnav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}
.topnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.topnav-tab:hover { color: var(--text); }
.topnav-tab.active { color: var(--text); font-weight: 500; }
.topnav-tab.active::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--text);
}
.topnav-tab .nav-count {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted-2);
  padding: 1px 6px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.topnav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--muted);
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--card);
  display: grid; place-items: center;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* Secondary tab bar (status sub-tabs on /domains) */
.subtabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 22px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  height: 38px;
  overflow-x: auto;
}
.subtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.subtab:hover { color: var(--text); }
.subtab.active {
  color: var(--text);
  border-bottom-color: var(--text);
  font-weight: 500;
}
.subtab .count {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted-2);
}
.subtab .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}

/* ── Main scroll region ────────────────────────────────────────── */
.main {
  overflow-y: auto;
  background: var(--bg);
}
.page {
  padding: 22px 22px 80px;
  max-width: 1640px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
}
.page-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.crumb {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  margin-bottom: 4px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .1s, border-color .1s;
}
.btn:hover { background: var(--bg); border-color: var(--border-strong); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:hover { background: var(--card); border-color: var(--border); }
.btn-primary {
  background: var(--accent);
  color: var(--card);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
[data-theme="dark"] .btn-primary { color: #0f1115; }
.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover { background: var(--bg); border-color: transparent; }
.btn-danger {
  color: var(--red);
  border-color: var(--border);
}
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-sm { padding: 4px 8px; font-size: 12px; border-radius: 5px; }
.btn-xs { padding: 2px 6px; font-size: 11px; border-radius: 4px; }
.btn-icon { padding: 6px; }

/* ── Status pills ─────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font-ui);
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1.5;
}
.pill::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.pill-aktiv    { background: #eaf3ff; color: #1f4e96; }
.pill-geprueft { background: var(--green-soft); color: var(--green); }
.pill-verkauft { background: var(--accent-soft); color: var(--text); border-color: var(--border); }
.pill-geloescht{ background: var(--red-soft); color: var(--red); }
.pill-inaktiv  { background: var(--bg); color: var(--muted-2); border-color: var(--border); }
.pill-imverkauf{ background: #fff5e6; color: #9a6400; }
.pill-rentabel { background: #e9f7f2; color: #0f7a5a; }
[data-theme="dark"] .pill-aktiv { background: #1d2a3d; color: #7ba6e6; }
[data-theme="dark"] .pill-imverkauf { background: #3a2e16; color: #e0b057; }
[data-theme="dark"] .pill-rentabel { background: #163029; color: #5fcaa6; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-data);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  line-height: 1.5;
}

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 16px 18px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: -0.005em;
}
.card-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }

/* ── Stat tiles ───────────────────────────────────────────────── */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: border-color .1s, background .1s;
}
.tile:hover { background: var(--bg-2); }
.tile.active {
  border-color: var(--text);
  background: var(--card);
}
.tile.active::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 8px;
  pointer-events: none;
  box-shadow: 0 0 0 1px var(--text);
}
.tile-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 6px;
}
.tile-value {
  font-family: var(--font-data);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.tile-delta {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.tile-delta.up { color: var(--green); }
.tile-delta.down { color: var(--red); }

/* ── Filter bar ───────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  border-bottom: none;
  flex-wrap: wrap;
}
.search {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.search:focus-within { border-color: var(--border-strong); background: var(--card); }
.search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.search kbd {
  font-family: var(--font-data);
  font-size: 10.5px;
  padding: 1px 5px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--border-strong); }
.chip.active { background: var(--accent-soft); border-color: var(--border-strong); color: var(--text); font-weight: 500; }

/* ── Table ────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  border-top: none;
  overflow: auto;
  max-height: 65vh;
}
.table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
  font-size: 12px;
}
.table-meta .meta-info {
  font-family: var(--font-data);
  font-size: 11.5px;
  color: var(--muted);
}
table.t {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
table.t thead th {
  position: sticky;
  top: 35px;
  background: var(--card);
  text-align: left;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px var(--row-pad-x);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  z-index: 4;
  cursor: pointer;
  user-select: none;
}
table.t thead th:hover { color: var(--text); }
table.t thead th .sort-arrow { opacity: .35; margin-left: 3px; }
table.t thead th.sorted { color: var(--text); font-weight: 600; }
table.t thead th.sorted .sort-arrow { opacity: 1; }
table.t tbody td {
  padding: var(--row-pad-y) var(--row-pad-x);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
table.t tbody tr:hover td { background: var(--bg); }
table.t tbody tr.selected td { background: #f4f8fe; }
[data-theme="dark"] table.t tbody tr.selected td { background: #1d2a3d; }
table.t tbody tr.marked-delete td { background: var(--red-soft); }

/* Sticky columns */
.col-check, .col-domain, .col-score {
  position: sticky;
  background: var(--card);
  z-index: 2;
}
table.t tbody tr:hover .col-check,
table.t tbody tr:hover .col-domain,
table.t tbody tr:hover .col-score {
  background: var(--bg);
}
table.t tbody tr.selected .col-check,
table.t tbody tr.selected .col-domain,
table.t tbody tr.selected .col-score {
  background: #f4f8fe;
}
[data-theme="dark"] table.t tbody tr.selected .col-check,
[data-theme="dark"] table.t tbody tr.selected .col-domain,
[data-theme="dark"] table.t tbody tr.selected .col-score {
  background: #1d2a3d;
}
.col-check  { left: 0; width: 36px; }
.col-domain { left: 36px; min-width: 220px; }
.col-score  { left: 256px; width: 96px; box-shadow: 1px 0 0 var(--border); }
table.t thead .col-check, table.t thead .col-domain, table.t thead .col-score { z-index: 6; }

.cell-domain a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.cell-domain a:hover { color: var(--link); text-decoration: underline; }
.cell-mono {
  font-family: var(--font-data);
  font-size: 12px;
}
.cell-muted { color: var(--muted); }

/* Score visualizations */
.score-num {
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 600;
}
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.score-bar {
  width: 46px;
  height: 5px;
  border-radius: 2px;
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}
.score-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 2px;
}
.score-heat {
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
  margin-right: 6px;
}
.score-dots {
  display: inline-grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
}
.score-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--bg-2);
}

/* Row action menu */
.row-action { position: relative; }
.row-menu-btn {
  width: 24px; height: 24px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--muted);
}
.row-menu-btn:hover { border-color: var(--border); background: var(--card); color: var(--text); }
.menu {
  position: absolute;
  right: 0; top: calc(100% + 4px);
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 4px;
  z-index: 30;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border-radius: 5px;
  border: none;
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.menu-item:hover { background: var(--bg); }
.menu-item.danger { color: var(--red); }
.menu-item.danger:hover { background: var(--red-soft); }
.menu-sep { height: 1px; background: var(--border); margin: 4px 0; }
.menu-label {
  font-size: 10.5px;
  color: var(--muted-2);
  padding: 5px 10px 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* Checkboxes */
.cb {
  width: 15px; height: 15px;
  border-radius: 3px;
  border: 1.5px solid var(--border-strong);
  background: var(--card);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.cb:hover { border-color: var(--text); }
.cb.on { background: var(--accent); border-color: var(--accent); }
.cb.on::after {
  content: "";
  width: 7px; height: 3px;
  border: 2px solid var(--card);
  border-top: 0; border-right: 0;
  transform: rotate(-45deg) translateY(-1px);
}
.cb.indeterminate { background: var(--accent); border-color: var(--accent); }
.cb.indeterminate::after {
  content: "";
  width: 7px; height: 2px;
  background: var(--card);
}

/* ── Modal ────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(15,17,22,.45);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg);
}

/* ── Toast ────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--card);
  padding: 9px 13px;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.22);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  z-index: 200;
  animation: toast-in .18s ease;
  overflow: hidden;
}
.toast button {
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: var(--card);
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 12.5px;
  cursor: pointer;
}
.toast .toast-progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  background: var(--card);
  border-radius: 0 0 8px 8px;
  animation: toast-progress 30s linear forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-progress { to { width: 0%; } }

/* ── Misc ─────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.score-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--muted);
}
.score-legend-bar {
  display: flex;
  height: 8px;
  border-radius: 2px;
  overflow: hidden;
  margin: 0 6px;
  width: 100px;
}
.score-legend-bar > span { flex: 1; }

.icon { width: 16px; height: 16px; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-xs { width: 12px; height: 12px; }

/* maintenance strip */
.strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 9px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.strip-item { display: flex; align-items: center; gap: 8px; }
.strip-label { color: var(--muted); font-size: 11.5px; }

.link {
  color: var(--link);
  text-decoration: none;
}
.link:hover { text-decoration: underline; }

.section-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 10px;
}
.section-h h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.005em;
}

/* Period segmented */
.period {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.period button {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
  border-right: 1px solid var(--border);
}
.period button:last-child { border-right: none; }
.period button.active { background: var(--bg); color: var(--text); font-weight: 500; }

/* bulk steps */
.steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 13px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
}
.step.active { border-color: var(--text); }
.step.done { color: var(--muted); }
.step-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-family: var(--font-data);
  font-size: 11px;
}
.step.active .step-num {
  background: var(--accent);
  color: var(--card);
  border-color: var(--accent);
}
.step-arrow { color: var(--muted-2); }

/* form inputs */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}
.field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.input, select.input {
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.input:focus { border-color: var(--text); }

/* Auth split layout */
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  background: var(--bg);
}
.auth-pitch {
  background: var(--accent);
  color: var(--card);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
[data-theme="dark"] .auth-pitch { color: #0f1115; }
.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 48px;
}
.auth-form { width: 100%; max-width: 360px; }

/* ── App additions (not from redesign/styles.css) ─────────────── */

/* Avoid theme-flicker before stylesheet applies */
html { background: var(--bg, #f5f6f8); }
[data-theme="dark"] html { background: #0f1115; }

/* Reusable grid helpers */
.grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-2-uneven { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* Flash messages (Laravel session feedback) */
.flash {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.flash-success { background: var(--green-soft); color: var(--green); border-color: transparent; }
.flash-error   { background: var(--red-soft);   color: var(--red);   border-color: transparent; }

/* Stat-cell (Dashboard KPI) — kept simple, no hover */
.stat-cell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.stat-cell-label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.stat-cell-value { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.stat-cell-delta { font-size: 11.5px; margin-top: 4px; color: var(--muted); }
.stat-cell-delta.up   { color: var(--green); }
.stat-cell-delta.down { color: var(--red); }

/* Quick-action button used in Dashboard sidebar */
.quick-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  width: 100%;
}
.quick-action:hover { background: var(--bg); }
.quick-action-label { display: block; font-size: 13px; font-weight: 500; }
.quick-action-sub   { display: block; font-size: 11.5px; color: var(--muted); }

/* Score-distribution histogram (Dashboard) */
.score-hist {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  align-items: end;
  height: 120px;
}
.score-hist-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
}
.score-hist-bar-wrap {
  flex: 1; width: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.score-hist-bar {
  border-radius: 2px 2px 0 0;
}
.score-hist-num { font-family: var(--font-data); font-size: 11px; color: var(--muted); }
.score-hist-axis { font-family: var(--font-data); font-size: 11px; color: var(--muted-2); }

/* ── Compat shims for legacy class names injected by existing JS ──────── */
.text-muted { color: var(--muted); }
.text-dim   { color: var(--muted-2); }
.mono       { font-family: var(--font-data); font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px; border-radius: 4px; line-height: 1.5;
  font-size: 11.5px; font-weight: 500; font-family: var(--font-ui);
  white-space: nowrap; border: 1px solid transparent;
}
.badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}
.badge-active   { background: #eaf3ff;            color: #1f4e96; }
.badge-checked  { background: var(--green-soft);  color: var(--green); }
.badge-sold     { background: var(--accent-soft); color: var(--text); border-color: var(--border); }
.badge-deleted  { background: var(--red-soft);    color: var(--red); }
.badge-inactive { background: var(--bg);          color: var(--muted-2); border-color: var(--border); }
.badge-selling  { background: #fff5e6;            color: #9a6400; }
.badge-profitable { background: #e9f7f2;          color: #0f7a5a; }
.badge-muted    { background: var(--bg);          color: var(--muted); border-color: var(--border); }
[data-theme="dark"] .badge-active { background: #1d2a3d; color: #7ba6e6; }
[data-theme="dark"] .badge-selling { background: #3a2e16; color: #e0b057; }
[data-theme="dark"] .badge-profitable { background: #163029; color: #5fcaa6; }

.alert {
  padding: 10px 14px; border-radius: 8px; font-size: 13px;
  margin-bottom: 14px; border: 1px solid transparent;
}
.alert-success { background: var(--green-soft); color: var(--green); }
.alert-error   { background: var(--red-soft);   color: var(--red); }
.alert-info    { background: var(--accent-soft); color: var(--text); }

.pagination { display: inline-flex; gap: 4px; align-items: center; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; padding: 4px 8px; border-radius: 5px;
  border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 12px; cursor: pointer;
  text-decoration: none; font-family: var(--font-data);
}
.page-btn:hover { background: var(--bg); color: var(--text); border-color: var(--border); }
.page-btn.active {
  background: var(--accent); color: var(--card); border-color: var(--accent);
}
[data-theme="dark"] .page-btn.active { color: #0f1115; }

.domain-name { cursor: pointer; }
.domain-name:hover { color: var(--link); }

/* CSV-drop helper used by the import modal Alpine binding */
.csv-drop { transition: border-color .12s, background .12s; }
.csv-drop:hover { border-color: var(--accent) !important; }

/* Sticky stat tiles on the domains list. Stays glued to the top of the main
   scroll container so the status filter row is always reachable, regardless
   of result count. */
.stat-tiles-sticky {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--bg);
  padding: 10px 0;
  margin-bottom: 8px;
}

/* Domain-list table: ensure all 19 columns get their natural width, the
   wrapper scrolls horizontally, and the sticky header stays usable. */
.table-wrap .t { min-width: 1900px; }

/* This page has no checkbox column, so the sticky Domain/Score columns sit
   flush at the left (the default in app.css assumes a 36px col-check). */
.table-wrap .col-domain { left: 0; min-width: 230px; width: 230px; }
.table-wrap .col-score  { left: 230px; width: 92px; }

/* Numerical cells: tabular nums + right-padded so the column gutter is
   consistent. */
.table-wrap .cell-mono { font-variant-numeric: tabular-nums; }

/* Header arrow style — keep arrows from wrapping under the label */
.table-wrap thead th a { display: inline-flex; align-items: center; gap: 4px; }

/* Make sortable th cursor obvious */
.table-wrap thead th a:hover { color: var(--text); }

/* Responsive — collapse 2-col grids on narrow screens */
@media (max-width: 900px) {
  .grid-2, .grid-2-uneven { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-pitch { display: none; }
}
