/* ─── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:            oklch(99% 0.003 280);
  --bg-subtle:     oklch(97.5% 0.005 280);
  --bg-muted:      oklch(95.5% 0.008 280);
  --surface:       #ffffff;

  /* Borders */
  --border:        oklch(91% 0.008 280);
  --border-strong: oklch(86% 0.012 280);
  --divider:       oklch(94% 0.006 280);

  /* Text */
  --fg:            oklch(22% 0.02 280);
  --fg-muted:      oklch(46% 0.015 280);
  --fg-subtle:     oklch(60% 0.012 280);
  --fg-faint:      oklch(72% 0.008 280);

  /* Accent — indigo/violet */
  --accent:        oklch(56% 0.19 280);
  --accent-hover:  oklch(50% 0.20 280);
  --accent-soft:   oklch(95% 0.04 280);
  --accent-soft-2: oklch(91% 0.06 280);
  --accent-fg:     #ffffff;
  --accent-ring:   oklch(56% 0.19 280 / 0.25);

  /* Semantic */
  --success:       oklch(62% 0.16 155);
  --success-soft:  oklch(95% 0.04 155);
  --warning:       oklch(72% 0.16 75);
  --warning-soft:  oklch(96% 0.05 75);
  --danger:        oklch(58% 0.20 25);
  --danger-soft:   oklch(95% 0.04 25);
  --info:          oklch(60% 0.14 240);
  --info-soft:     oklch(95% 0.03 240);

  /* Radii */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  18px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(40,30,80,0.04);
  --shadow-sm: 0 1px 2px rgba(40,30,80,0.05), 0 1px 3px rgba(40,30,80,0.04);
  --shadow-md: 0 4px 12px -2px rgba(40,30,80,0.06);
  --shadow-lg: 0 12px 28px -6px rgba(40,30,80,0.12), 0 4px 12px -4px rgba(40,30,80,0.06);

  /* Typography */
  --font-sans: "Geist", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Density */
  --row-h:    44px;
  --input-h:  38px;
  --btn-h:    38px;
  --text-base: 14px;
  --text-sm:   13px;
  --text-xs:   12px;
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }
input, textarea, select { font-family: inherit; }
a { text-decoration: none; color: inherit; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── SIDEBAR ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: oklch(97.5% 0.008 280);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand-logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, oklch(60% 0.21 285) 0%, oklch(52% 0.20 270) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(60,40,120,0.25);
  flex-shrink: 0;
}
.sidebar-brand-name  { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.sidebar-brand-sub   { font-size: 11px; color: var(--fg-muted); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px; }
.sidebar-section-label {
  font-size: 10.5px; font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px 6px;
}
.nav-group { margin-top: 18px; }
.nav-group:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 450;
  color: var(--fg);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s;
  text-decoration: none;
}
.nav-item:hover { background: rgba(80,60,180,0.04); }
.nav-item.active {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
  font-weight: 500;
}
.nav-item.soon { opacity: 0.5; cursor: default; pointer-events: none; }
.nav-item-count { font-size: 10.5px; color: var(--fg-muted); margin-left: auto; }
.nav-soon-badge {
  font-size: 9.5px; font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg-muted);
  margin-left: auto;
}

.sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
}
.sidebar-user-name { font-size: 12.5px; font-weight: 500; }
.sidebar-user-sub  { font-size: 10.5px; color: var(--fg-muted); }

.readonly-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px 6px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--warning-soft);
  color: oklch(42% 0.14 75);
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid oklch(88% 0.10 75);
}
.readonly-banner svg { flex-shrink: 0; }

/* mobile topbar readonly badge */
.readonly-topbar-badge {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: var(--warning-soft);
  color: oklch(42% 0.14 75);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid oklch(88% 0.10 75);
  white-space: nowrap;
}

/* ─── MAIN CONTENT ───────────────────────────────────────────────────────── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── TOPBAR ─────────────────────────────────────────────────────────────── */
.topbar {
  height: 60px;
  flex-shrink: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-left { flex: 1; min-width: 0; }
.topbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 2px;
}
.topbar-breadcrumb-link { cursor: pointer; }
.topbar-breadcrumb-link:hover { color: var(--fg); }
.topbar-breadcrumb-current { color: var(--fg); font-weight: 500; }
.topbar-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-subtitle { font-size: 13px; color: var(--fg-muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-divider { width: 1px; height: 24px; background: var(--divider); margin: 0 2px; }

/* ─── PAGE CONTENT ───────────────────────────────────────────────────────── */
.page-content { flex: 1; overflow-y: auto; padding: 16px; }
.page-content-wide { flex: 1; overflow-y: auto; padding: 24px; }

/* ─── AVATAR ─────────────────────────────────────────────────────────────── */
.avatar {
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  letter-spacing: -0.2px;
  flex-shrink: 0;
}

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--r-md);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.005em;
  transition: background .14s, opacity .14s, box-shadow .14s;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.btn-lg { height: 44px; padding: 0 18px; font-size: 14.5px; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 1px 2px rgba(40,30,80,0.18);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: var(--bg-subtle); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
}
.btn-ghost:hover { background: var(--bg-subtle); }

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }

.btn-soft {
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--fg-muted);
  border: 1px solid transparent;
  transition: background .12s, color .12s;
  background: transparent;
  flex-shrink: 0;
}
.icon-btn:hover  { background: var(--bg-muted); color: var(--fg); }
.icon-btn-border { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-xs); }

/* Favorite star toggle (sites list) */
.fav-btn            { color: var(--fg-faint); }
.fav-btn:hover      { color: var(--warning); background: var(--warning-soft); }
.fav-btn.is-fav     { color: var(--warning); }
.fav-btn.is-fav svg { fill: var(--warning); }

/* ─── INPUTS ─────────────────────────────────────────────────────────────── */
.input-wrap {
  height: var(--input-h);
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: border-color .12s, box-shadow .12s;
}
.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.input-wrap.invalid { border-color: var(--danger); }
.input-wrap.disabled { background: var(--bg-subtle); }

.input-wrap input,
.input-wrap textarea {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: var(--text-sm);
  color: var(--fg);
  background: transparent;
  min-width: 0;
}
.input-wrap .input-icon { padding-left: 12px; color: var(--fg-faint); display: flex; flex-shrink: 0; }
.input-wrap .input-prefix { padding-left: 12px; color: var(--fg-muted); font-size: var(--text-sm); flex-shrink: 0; }
.input-wrap .input-suffix { padding-right: 12px; color: var(--fg-faint); font-size: var(--text-xs); flex-shrink: 0; }
.input-wrap .input-icon-right { padding-right: 12px; color: var(--fg-faint); display: flex; flex-shrink: 0; }
.input-wrap input.mono { font-family: var(--font-mono); letter-spacing: 0; }
.input-wrap input[readonly] { color: var(--fg-muted); }

textarea.field-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: var(--text-sm);
  color: var(--fg);
  background: var(--surface);
  resize: vertical;
  outline: none;
  line-height: 1.5;
  box-shadow: var(--shadow-xs);
  transition: border-color .12s, box-shadow .12s;
}
textarea.field-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.select-wrap {
  position: relative;
}
.select-wrap select {
  height: var(--input-h);
  width: 100%;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--text-sm);
  color: var(--fg);
  cursor: pointer;
  outline: none;
  appearance: none;
  box-shadow: var(--shadow-xs);
  transition: border-color .12s;
}
.select-wrap select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.select-wrap .select-chevron {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--fg-faint);
  pointer-events: none;
}

/* ─── FIELD ──────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-header { display: flex; align-items: baseline; justify-content: space-between; }
.field-label { font-size: var(--text-sm); font-weight: 500; color: var(--fg); }
.field-required { color: var(--accent); margin-left: 4px; }
.field-optional { font-size: 11px; color: var(--fg-faint); }
.field-hint { font-size: 12px; color: var(--fg-muted); line-height: 1.45; }
.field-error { font-size: 12px; color: var(--danger); line-height: 1.45; }

/* ─── BADGE ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 1;
  flex-shrink: 0;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-neutral { background: var(--bg-muted);      color: var(--fg-muted); }
.badge-success { background: var(--success-soft);  color: var(--success); }
.badge-warning { background: var(--warning-soft);  color: oklch(45% 0.13 75); }
.badge-danger  { background: var(--danger-soft);   color: var(--danger); }
.badge-info    { background: var(--info-soft);     color: var(--info); }
.badge-accent  { background: var(--accent-soft);   color: var(--accent); }

/* ─── TOGGLE ─────────────────────────────────────────────────────────────── */
.toggle-row { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle-track {
  width: 36px; height: 20px;
  border-radius: 10px;
  background: var(--bg-muted);
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle-track.on { background: var(--accent); }
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: left .2s;
}
.toggle-track.on .toggle-thumb { left: 18px; }
/* hide actual checkbox visually */
.toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-label { font-size: var(--text-sm); color: var(--fg); }

/* ─── DATA TABLE ─────────────────────────────────────────────────────────── */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filter-bar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-wrap { overflow-x: auto; }
.sites-table { min-width: 900px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.data-table th {
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--divider);
  text-align: left;
}
.data-table th.sortable { cursor: pointer; }
.data-table th.sortable:hover { color: var(--fg); }
.data-table th .th-inner { display: inline-flex; align-items: center; gap: 5px; }
.data-table td {
  padding: 0 14px;
  height: var(--row-h);
  font-size: var(--text-sm);
  color: var(--fg);
  border-bottom: 1px solid var(--divider);
  white-space: nowrap;
}
.data-table td.muted { color: var(--fg-muted); }
.data-table td.mono  { font-family: var(--font-mono); }
.data-table td.right { text-align: right; }
.data-table tbody tr { cursor: pointer; transition: background .1s; }
.data-table tbody tr:nth-child(even) { background: var(--bg-subtle); }
.data-table tbody tr:hover { background: var(--bg-muted); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ─── DOMAIN REPORT ──────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.kpi-card.accent {
  background: var(--accent-soft);
  border-color: var(--accent-soft-2);
}
.kpi-card .kpi-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-muted);
  font-size: var(--text-xs);
  font-weight: 500;
}
.kpi-card .kpi-head-icon {
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  color: var(--fg-muted);
}
.kpi-card.accent .kpi-head-icon {
  background: var(--accent);
  color: var(--accent-fg);
}
.kpi-card .kpi-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  line-height: 1.1;
}
.kpi-card.accent .kpi-value { color: var(--accent); }
.kpi-card .kpi-sub {
  font-size: var(--text-xs);
  color: var(--fg-muted);
}

/* Domain cell — avatar + names */
.dom-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dom-avatar {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: oklch(95% 0.04 var(--h, 280));
  color: oklch(40% 0.10 var(--h, 280));
}
.dom-text { min-width: 0; line-height: 1.25; }
.dom-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  font-family: var(--font-mono);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dom-site {
  font-size: 11.5px;
  color: var(--fg-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Visits cell — number + mini bar + google share */
.visits-cell {
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-end;
}
.visits-num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-weight: 500;
  font-size: 13px;
}
.visits-bar {
  width: 80px; height: 4px;
  border-radius: 2px;
  background: var(--bg-muted);
  overflow: hidden;
}
.visits-bar > i {
  display: block;
  height: 100%;
  background: var(--accent);
  opacity: 0.85;
}
.visits-google {
  font-size: 10.5px;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}
.visits-google--zero { color: var(--fg-subtle); font-weight: normal; }

/* Country pill */
.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px 3px 4px;
  border-radius: var(--r-full);
  background: oklch(96% 0.03 var(--h, 220));
  border: 1px solid oklch(90% 0.05 var(--h, 220));
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.country-pill .cc {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: oklch(70% 0.13 var(--h, 220));
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.country-pill .num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-weight: 500;
  color: var(--fg);
}
.country-pill .pct { color: var(--fg-muted); font-size: 11px; }
.country-pill.empty {
  background: transparent;
  border-color: transparent;
  color: var(--fg-faint);
  padding-left: 0;
}

.row-num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  color: var(--fg-faint);
  font-size: 11.5px;
}

.table-card-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.table-card-head-title { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.table-card-head-meta { font-size: var(--text-xs); color: var(--fg-muted); }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

.table-empty {
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.table-empty-icon {
  width: 80px; height: 80px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  color: var(--accent);
}
.table-empty-title { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.table-empty-body  { margin: 6px 0 0; font-size: 13.5px; color: var(--fg-muted); line-height: 1.55; max-width: 360px; }

/* ─── PAGINATION ─────────────────────────────────────────────────────────── */
.pagination {
  padding: 10px 14px;
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--fg-muted);
}
.pagination-pages { display: flex; align-items: center; gap: 4px; }
.page-ellipsis { min-width: 24px; text-align: center; color: var(--fg-muted); font-size: 12.5px; user-select: none; }
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  min-width: 32px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-muted);
  font-size: 12.5px;
  font-weight: 450;
  text-decoration: none;
  cursor: pointer;
  transition: background .1s;
}
.page-btn:hover { background: var(--bg-subtle); }
.page-btn.active {
  background: var(--surface);
  border-color: var(--border);
  color: var(--fg);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  cursor: default;
}

.perpage-select {
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg-muted);
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.perpage-select:hover { border-color: var(--border-strong); }
.perpage-select:focus { border-color: var(--accent); color: var(--fg); }

/* ─── SITE AVATAR ────────────────────────────────────────────────────────── */
.site-avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.site-name-wrap  { display: flex; flex-direction: column; min-width: 0; }
.site-name       { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.site-id         { font-size: 11px; color: var(--fg-faint); font-family: var(--font-mono); }

/* ─── TAG CHIPS ──────────────────────────────────────────────────────────── */
.tag-chip {
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 7px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 500;
  background: var(--bg-muted);
  color: var(--fg-muted);
  border: none; cursor: pointer;
  transition: background .15s, color .15s;
  letter-spacing: 0.1px;
}
.tag-chip:hover  { background: var(--accent-soft); color: var(--accent); }
.tag-chip.active { background: var(--accent); color: white; }

.tag-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px; font-weight: 500;
}
.tag-pill-remove {
  display: flex; align-items: center;
  color: var(--accent); opacity: 0.65;
  background: none; border: none;
  cursor: pointer; padding: 0;
}
.tag-pill-remove:hover { opacity: 1; }

.tag-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  z-index: 200;
  overflow: hidden;
}
.tag-suggestions:empty { display: none; }
.tag-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  font-size: var(--text-sm);
  color: var(--fg);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1.4;
}
.tag-suggest-item:hover { background: var(--bg-subtle); }

.tag-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px 0 12px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: 500;
}
.tag-filter-chip button {
  display: flex; align-items: center;
  color: var(--accent); opacity: 0.65;
  cursor: pointer;
  margin-left: 2px;
}
.tag-filter-chip button:hover { opacity: 1; }

/* ─── FORM CARD ──────────────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-card-header {
  border-bottom: 1px solid var(--divider);
  padding-bottom: 14px;
  margin-bottom: 2px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.form-card-title    { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.form-card-subtitle { margin: 3px 0 0; font-size: 12.5px; color: var(--fg-muted); }

/* ─── GRID HELPERS ───────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ─── TYPE OPTION CARDS ──────────────────────────────────────────────────── */
.type-option {
  padding: 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, background .15s;
}
.type-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.type-option-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-muted);
  color: var(--fg-muted);
  display: flex; align-items: center; justify-content: center;
}
.type-option.selected .type-option-icon { background: var(--accent); color: white; }
.type-option-title { font-weight: 600; font-size: 13.5px; }
.type-option-code  { font-size: 11px; color: var(--fg-faint); font-family: var(--font-mono); }
.type-option-desc  { margin: 0; font-size: 12.5px; color: var(--fg-muted); line-height: 1.45; }

/* ─── COMMENT ────────────────────────────────────────────────────────────── */
.comment {
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: var(--r-md);
  display: flex; gap: 10px;
}
.comment-meta { font-size: 12px; color: var(--fg-muted); margin-bottom: 4px; }
.comment-text { font-size: 13.5px; line-height: 1.5; }

/* ─── ALERT / BANNER ─────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
}
.alert-info    { background: var(--info-soft); border: 1px solid oklch(88% 0.04 240); color: oklch(35% 0.10 240); }
.alert-success { background: var(--success-soft); border: 1px solid oklch(88% 0.06 155); color: oklch(35% 0.10 155); }
.alert-danger  { background: var(--danger-soft); border: 1px solid var(--danger-soft); color: var(--danger); }

/* ─── DANGER ZONE ────────────────────────────────────────────────────────── */
.danger-zone {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 0;
}
.danger-zone-info { flex: 1; }
.danger-zone-title { font-weight: 600; font-size: 13.5px; }
.danger-zone-sub   { font-size: 12.5px; color: var(--fg-muted); margin-top: 2px; }

/* ─── FLASH / TOAST ──────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--r-md);
  color: white;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn .2s ease;
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-info    { background: var(--fg); }
@keyframes toastIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ─── LOGIN PAGE ─────────────────────────────────────────────────────────── */
.login-page {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, oklch(98% 0.008 280) 0%, oklch(95% 0.015 285) 100%);
  position: relative; overflow: hidden;
}
.login-blob-1 {
  position: absolute; top: -200px; right: -200px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, oklch(85% 0.10 285 / 0.5) 0%, transparent 65%);
  filter: blur(40px);
}
.login-blob-2 {
  position: absolute; bottom: -240px; left: -180px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, oklch(85% 0.08 240 / 0.5) 0%, transparent 65%);
  filter: blur(40px);
}
.login-card {
  position: relative; z-index: 1;
  width: 400px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: 0 30px 60px -20px rgba(40,30,80,0.18), 0 10px 24px -10px rgba(40,30,80,0.10);
  padding: 36px 36px 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.login-header {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 10px;
}
.login-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, oklch(60% 0.21 285) 0%, oklch(52% 0.20 270) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(60,40,120,0.25);
}
.login-title  { margin: 18px 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.login-sub    { margin: 0; font-size: 13.5px; color: var(--fg-muted); }
.login-footer { margin: 8px 0 0; font-size: 12px; color: var(--fg-faint); text-align: center; }
.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 6px 0 0;
}
.login-divider-line { flex: 1; height: 1px; background: var(--divider); }
.login-divider-text { font-size: 11px; color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* ─── HTMX LOADING STATE ─────────────────────────────────────────────────── */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator { opacity: 1; }

/* ─── FILES EDITOR ───────────────────────────────────────────────────────── */
.files-shell {
  flex: 1;
  display: flex;
  min-height: 0;
  background: var(--bg-subtle);
}
.files-active-name {
  font-size: 12px;
  color: var(--fg-faint);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50vw;
}

/* Sidebar */
.files-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.files-sidebar-actions {
  padding: 10px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.files-sidebar-actions .btn { flex: 1 1 auto; min-width: 0; }
.files-tree {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  font-size: 13px;
  outline: none;
}
.files-tree-loading,
.files-tree-empty {
  padding: 16px 14px;
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
}
.files-tree-children { display: block; }
.files-tree-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  cursor: pointer;
  user-select: none;
  border-radius: var(--r-xs);
  margin: 0 4px;
  white-space: nowrap;
  overflow: hidden;
}
.files-tree-node:hover { background: var(--bg-muted); }
.files-tree-node.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}
.files-tree-node.drop-target {
  background: var(--accent-soft);
  outline: 1px dashed var(--accent);
  outline-offset: -1px;
}
.files-tree.drop-target-root {
  outline: 1px dashed var(--accent);
  outline-offset: -2px;
}
.files-tree-node.dragging {
  opacity: 0.4;
}
.files-tree-twist {
  display: inline-block;
  width: 12px;
  text-align: center;
  font-size: 10px;
  color: var(--fg-faint);
  flex-shrink: 0;
}
.files-tree-twist-empty { visibility: hidden; }
.files-tree-icon {
  font-size: 13px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.files-tree-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.files-tree-dirty {
  color: var(--accent);
  font-size: 11px;
  flex-shrink: 0;
}
.files-tree-node.is-selected {
  background: var(--danger-soft);
}
.files-tree-node.is-selected:hover {
  background: color-mix(in srgb, var(--danger-soft) 80%, var(--bg-muted));
}
.files-selection-bar {
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  background: var(--surface);
  flex-shrink: 0;
}
.files-selection-bar[hidden] { display: none; }

/* Context menu */
.files-tree-context {
  position: fixed;
  z-index: 200;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.files-tree-context[hidden] { display: none; }
.files-tree-context button {
  text-align: left;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: var(--r-xs);
  color: var(--fg);
}
.files-tree-context button:hover { background: var(--bg-muted); }
.files-tree-context button.danger { color: var(--danger); }
.files-tree-context button.danger:hover { background: var(--danger-soft); }

/* Main pane */
.files-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--surface);
}
/* Tab bar */
.files-tabbar {
  display: flex;
  align-items: stretch;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  min-height: 36px;
  flex-shrink: 0;
}
.files-tabbar::-webkit-scrollbar { height: 6px; }
.files-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  font-size: 12.5px;
  color: var(--fg-muted);
  cursor: pointer;
  border-right: 1px solid var(--divider);
  background: var(--bg-subtle);
  user-select: none;
  white-space: nowrap;
  max-width: 220px;
}
.files-tab:hover { color: var(--fg); }
.files-tab.active {
  background: var(--surface);
  color: var(--fg);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.files-tab.dirty .files-tab-name { font-style: italic; }
.files-tab-icon { font-size: 12px; flex-shrink: 0; }
.files-tab-name {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.files-tab-close {
  width: 18px;
  height: 18px;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: var(--fg-faint);
  flex-shrink: 0;
}
.files-tab-close:hover { background: var(--bg-muted); color: var(--fg); }
.files-tab.dirty .files-tab-close { color: var(--accent); }

/* Viewport (editor / preview) */
.files-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.files-editor-host {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.files-editor-host > .monaco-editor { height: 100% !important; }

/* Empty state */
.files-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--fg-muted);
  text-align: center;
}
.files-empty-icon { font-size: 32px; opacity: .6; line-height: 1; }
.files-empty-title { font-size: 15px; font-weight: 500; color: var(--fg); }
.files-empty-sub { font-size: 12.5px; color: var(--fg-muted); line-height: 1.6; }
.files-empty-actions { display: flex; gap: 8px; margin-top: 6px; }

/* Image preview */
.files-image-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px;
  overflow: auto;
}
.files-image-preview img {
  max-width: min(720px, 90%);
  max-height: 60vh;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  background:
    linear-gradient(45deg, var(--bg-muted) 25%, transparent 25%) 0 0/16px 16px,
    linear-gradient(-45deg, var(--bg-muted) 25%, transparent 25%) 0 8px/16px 16px,
    linear-gradient(45deg, transparent 75%, var(--bg-muted) 75%) 8px -8px/16px 16px,
    linear-gradient(-45deg, transparent 75%, var(--bg-muted) 75%) -8px 0/16px 16px;
}
.files-image-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}
.files-image-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* Status bar */
.files-statusbar {
  flex-shrink: 0;
  height: 26px;
  padding: 0 12px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}
.files-statusbar-sep { color: var(--fg-faint); }

/* Dialog (reserved for future modal use) */
.files-dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 0;
  box-shadow: var(--shadow-lg);
  min-width: 320px;
}
.files-dialog::backdrop { background: rgba(20, 18, 38, 0.35); }
.files-dialog-title {
  padding: 14px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--divider);
}
.files-dialog-body { padding: 14px 16px; }
.files-dialog-actions {
  padding: 10px 16px;
  border-top: 1px solid var(--divider);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Helpers */
.muted { color: var(--fg-faint); }
.files-shell .mono { font-family: var(--font-mono); }

/* ─── MOBILE TOPBAR (hidden on desktop) ─────────────────────────────────── */
.mobile-topbar { display: none; }
.sidebar-overlay { display: none; }

/* ─── RESPONSIVE / MOBILE ────────────────────────────────────────────────── */
@media (max-width: 767px) {

  /* Sidebar — fixed slide-in drawer (taken out of flex flow) */
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100%;
    z-index: 300;
    transform: translateX(-260px);
    transition: transform .25s ease;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  /* Overlay backdrop */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 299;
  }
  .sidebar-overlay.visible { display: block; }

  /* Mobile topbar */
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 52px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
  }
  .hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    flex-shrink: 0;
  }
  .hamburger-btn span {
    display: block;
    height: 2px;
    background: var(--fg);
    border-radius: 2px;
    width: 100%;
  }
  .mobile-brand {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  /* Page topbar */
  .topbar {
    height: auto;
    min-height: 52px;
    padding: 8px 14px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .topbar-breadcrumbs { display: none; }
  .topbar-title { font-size: 15px; }
  .topbar-actions { gap: 6px; }

  /* Content padding */
  .page-content { padding: 10px; }
  .page-content-wide { padding: 10px; }

  /* Grids — single column */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }

  /* Filter bar */
  .filter-bar { gap: 8px; }
  .filter-bar .input-wrap { width: 100% !important; }

  /* Pagination */
  .pagination { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Sites table — mobile: hide Domain(3), Type(4), Links(6), Tags(7) */
  .sites-table { min-width: 0; table-layout: auto; }
  .sites-table th:nth-child(3),
  .sites-table td:nth-child(3),
  .sites-table th:nth-child(4),
  .sites-table td:nth-child(4),
  .sites-table th:nth-child(6),
  .sites-table td:nth-child(6),
  .sites-table th:nth-child(7),
  .sites-table td:nth-child(7) { display: none; }
  .sites-table td:nth-child(2) { max-width: 140px; }

  /* Form card */
  .form-card { padding: 14px; }

  /* Danger zone */
  .danger-zone { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Toast */
  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { font-size: 12px; }

  /* Login card */
  .login-card { width: calc(100vw - 32px); padding: 24px 20px 20px; }

  /* Files editor — slightly narrower sidebar */
  .files-sidebar { width: 200px; }
}

/* ── Flatpickr layout fix ─────────────────────────────────────────────────────
   Flatpickr's default CSS hardcodes .flatpickr-days / .dayContainer at 307.875px
   (7 × 39px standard cell). Our calendar is 280px wide with 8px padding = 264px
   inner width, so the day grid overflows. Override to fill available space. */
.flatpickr-rContainer    { width: 100%; }
.flatpickr-weekdaycontainer { width: 100%; }
.flatpickr-days          { width: 100%; }
.dayContainer            { width: 100%; min-width: 100%; max-width: 100%; }
.flatpickr-day           { max-width: calc(100% / 7) !important; }

/* ─── Column configurator ────────────────────────────────────────────────────*/
[data-col].col-hidden { display: none; }

.col-cfg-wrap { position: relative; }
#col-cfg-btn { position: relative; }
.col-cfg-badge-dot {
  display: none;
  position: absolute; top: 2px; right: 2px;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 7px;
  background: var(--accent); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 14px;
  text-align: center; pointer-events: none;
}

.col-cfg-popover {
  position: absolute; top: calc(100% + 6px); right: 0;
  width: 260px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 50;
}
.col-cfg-popover[hidden] { display: none; }

.col-cfg-section { padding: 12px 14px; }
.col-cfg-section-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--fg-muted); margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.col-cfg-divider { border-top: 1px solid var(--border); }

.col-cfg-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.col-cfg-col-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; cursor: pointer; padding: 3px 0;
}

.col-cfg-preset-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; min-height: 28px; }
.col-cfg-preset-chip {
  display: inline-flex; align-items: center; height: 26px;
  border-radius: var(--r-md); background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2); overflow: hidden;
}
.col-cfg-preset-name {
  padding: 0 8px; font-size: 12.5px; color: var(--accent);
  font-weight: 500; cursor: pointer; height: 100%;
}
.col-cfg-preset-name:hover { background: var(--accent-soft-2); }
.col-cfg-preset-del {
  padding: 0 6px; font-size: 14px; color: var(--accent);
  opacity: .6; cursor: pointer; height: 100%;
  border-left: 1px solid var(--accent-soft-2);
}
.col-cfg-preset-del:hover { opacity: 1; background: var(--accent-soft-2); }
.col-cfg-preset-empty { font-size: 12px; color: var(--fg-faint); padding: 2px 0; }

.col-cfg-save-row { display: flex; gap: 6px; align-items: center; }
.col-cfg-name-input {
  flex: 1; min-width: 0; height: 30px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font: inherit; font-size: 12.5px; background: var(--surface); color: var(--fg); outline: none;
}
.col-cfg-name-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-ring); }
