/* ─── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d1117;
  --bg-secondary:#161b22;
  --bg-tertiary: #21262d;
  --border:      #30363d;
  --border-soft: #21262d;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --text-subtle: #6e7681;
  --accent:      #58a6ff;
  --accent-dim:  rgba(88,166,255,0.15);
  --accent-hover:#79bbff;
  --green:       #3fb950;
  --green-dim:   rgba(63,185,80,0.15);
  --red:         #f85149;
  --gold:        #f0c040;
  --silver:      #8b9196;
  --bronze:      #c07a4f;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --transition:  0.18s ease;
  --sidebar-w:   260px;
  --header-h:    56px;
}

html { font-size: 14px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* ─── HEADER ────────────────────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 16px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  background: linear-gradient(135deg, #e6edf3 0%, #58a6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pulse-container {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--green-dim);
  border: 1px solid rgba(63,185,80,0.3);
  border-radius: 20px;
}

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.pulse-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.last-updated {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── LAYOUT ────────────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

/* ─── SIDEBAR ───────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.sidebar-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-soft);
}

.sidebar-footer {
  border-bottom: none;
  margin-top: auto;
  padding-top: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.site-textarea {
  width: 100%;
  min-height: 130px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Inter', monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 12px;
  resize: vertical;
  transition: border-color var(--transition);
  outline: none;
  margin-bottom: 10px;
}

.site-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.site-textarea::placeholder { color: var(--text-subtle); }

/* ─── TIMELINE BUTTONS ──────────────────────────────────────────────────────── */
.timeline-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.timeline-btn {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.timeline-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text);
  border-color: var(--border);
}

.timeline-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* ─── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  outline: none;
}

.btn-full { width: 100%; }

.btn-primary {
  background: var(--accent);
  color: #0d1117;
  font-weight: 700;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(88,166,255,0.3);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--text-subtle);
}

.btn-run {
  padding: 11px 16px;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.btn-run svg { flex-shrink: 0; }

/* ─── STATUS BAR ────────────────────────────────────────────────────────────── */
.status-bar {
  margin-top: 10px;
  min-height: 22px;
  font-size: 12px;
}

.status-idle { color: var(--text-subtle); }
.status-loading { color: var(--accent); }
.status-success { color: var(--green); }
.status-error { color: var(--red); }

.site-count {
  font-size: 12px;
  color: var(--text-subtle);
  text-align: center;
}

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

/* ─── TABS ──────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  padding: 16px 24px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  background: var(--bg);
  z-index: 10;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
  position: relative;
}

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

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-badge {
  background: var(--accent);
  color: #0d1117;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ─── TAB PANES ─────────────────────────────────────────────────────────────── */
.tab-pane { display: none; flex: 1; }
.tab-pane.active { display: flex; flex-direction: column; }

/* ─── COUNTRY TABS ──────────────────────────────────────────────────────────── */
.country-tabs-wrapper {
  overflow-x: auto;
  padding: 14px 24px 0;
  background: var(--bg);
  position: sticky;
  top: calc(var(--header-h) + 45px);
  z-index: 9;
  border-bottom: 1px solid var(--border-soft);
}

.country-tabs {
  display: flex;
  gap: 6px;
  padding-bottom: 12px;
  min-width: max-content;
}

.country-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.country-tab:hover {
  background: var(--bg-tertiary);
  color: var(--text);
}

.country-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.country-tab .flag { font-size: 15px; }

.country-tab .count {
  background: var(--bg-tertiary);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-subtle);
}

.country-tab.active .count {
  background: var(--accent);
  color: #0d1117;
}

/* ─── CARDS CONTAINER ───────────────────────────────────────────────────────── */
.cards-container {
  padding: 20px 24px;
  flex: 1;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .cards-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ─── CARD ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
}

.card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.card-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 52%;
  background: var(--bg-tertiary);
  overflow: hidden;
  flex-shrink: 0;
}

.card-thumbnail img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-thumbnail img { transform: scale(1.04); }

.card-thumbnail .placeholder-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, #1c2230 100%);
}

.placeholder-art svg { opacity: 0.2; }

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.rank-badge.rank-1 { background: var(--gold); color: #1a1400; }
.rank-badge.rank-2 { background: var(--silver); color: #1a1a1a; }
.rank-badge.rank-3 { background: var(--bronze); color: #fff; }
.rank-badge.rank-other { background: var(--bg-tertiary); color: var(--text-muted); border: 1px solid var(--border); }

/* ─── CARD BODY ─────────────────────────────────────────────────────────────── */
.card-body {
  padding: 13px 14px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

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

.site-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.visitor-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
}

.visitor-count svg { opacity: 0.8; }

/* Blueprint-specific meta */
.card-saved-meta {
  font-size: 11px;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 5px;
}

.timeline-tag {
  padding: 2px 7px;
  background: var(--accent-dim);
  border: 1px solid rgba(88,166,255,0.2);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ─── CARD ACTIONS ──────────────────────────────────────────────────────────── */
.card-actions {
  padding: 0 14px 12px;
  display: flex;
  gap: 7px;
  align-items: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.btn-icon:hover { background: var(--bg); color: var(--text); border-color: var(--text-subtle); }

.btn-icon.btn-save:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.btn-icon.btn-saved { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

.btn-icon.btn-delete:hover { color: var(--red); border-color: var(--red); background: rgba(248,81,73,0.1); }

.btn-view {
  flex: 1;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-view:hover {
  background: var(--bg-tertiary);
  color: var(--text);
  border-color: var(--text-subtle);
}

/* ─── SKELETON LOADING ──────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-secondary) 25%,
    var(--bg-tertiary) 37%,
    var(--bg-secondary) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 4px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.skeleton-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-thumb {
  width: 100%;
  padding-top: 52%;
  background: linear-gradient(90deg,
    var(--bg-tertiary) 25%,
    #2a3140 37%,
    var(--bg-tertiary) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-body {
  padding: 13px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line { height: 12px; border-radius: 6px; }
.skeleton-line.w100 { width: 100%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }

.skeleton-footer {
  padding: 0 14px 12px;
  display: flex;
  gap: 7px;
}

.skeleton-btn { height: 32px; flex: 1; border-radius: var(--radius); }
.skeleton-btn-sm { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius); }

/* ─── EMPTY STATE ───────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  gap: 10px;
}

.empty-icon { font-size: 52px; line-height: 1; opacity: 0.6; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text-muted); }
.empty-state p { font-size: 14px; color: var(--text-subtle); max-width: 360px; }
.empty-state strong { color: var(--text-muted); }

/* ─── BLUEPRINT HEADER ──────────────────────────────────────────────────────── */
.blueprint-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 24px 0;
  gap: 12px;
}

.blueprint-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.sort-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.sort-select:focus { border-color: var(--accent); }

/* ─── TOAST ─────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}

.toast {
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 9px;
  animation: toast-in 0.22s ease forwards;
  max-width: 320px;
}

.toast.toast-success { border-color: rgba(63,185,80,0.4); }
.toast.toast-error { border-color: rgba(248,81,73,0.4); }
.toast.toast-info { border-color: rgba(88,166,255,0.4); }
.toast.toast-out { animation: toast-out 0.22s ease forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(6px) scale(0.96); }
}

/* ─── LOADING SPINNER ───────────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(88,166,255,0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── UTILITY ───────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── URL DISPLAY ───────────────────────────────────────────────────────────── */
.card-url {
  font-size: 11px;
  color: var(--accent);
  margin: 4px 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-family: 'SFMono-Regular', Consolas, monospace;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.card-url:hover { opacity: 1; text-decoration: underline; }

/* ─── SELECT TOOLBAR ────────────────────────────────────────────────────────── */
.select-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.select-count {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 80px;
}
.btn-copy-selected {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: #000;
  border: none; border-radius: var(--radius);
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background var(--transition);
}
.btn-copy-selected:hover:not(:disabled) { background: var(--accent-hover); }
.btn-copy-selected:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-select-all, .btn-clear-sel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 4px 10px; font-size: 12px; cursor: pointer;
  transition: all var(--transition);
}
.btn-select-all:hover, .btn-clear-sel:hover {
  border-color: var(--accent); color: var(--accent);
}

/* ─── CARD SELECTION ────────────────────────────────────────────────────────── */
.card { position: relative; }
.card-select-overlay {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 5;
  cursor: pointer;
}
.card-checkbox {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-secondary);
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.card-select-overlay:hover .card-checkbox {
  border-color: var(--accent);
}
.card.card-selected {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(88,166,255,0.25);
}
.card.card-selected .card-checkbox {
  background: var(--accent);
  border-color: var(--accent);
}
.card.card-selected .card-checkbox::after {
  content: '✓';
  color: #000;
  font-size: 11px;
  font-weight: 700;
}

/* ─── COPY URL BUTTON ───────────────────────────────────────────────────────── */
.btn-copy-url {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition); flex-shrink: 0;
}
.btn-copy-url:hover { border-color: var(--accent); color: var(--accent); }

/* ─── LOAD MORE ─────────────────────────────────────────────────────────────── */
.load-more-bar {
  display: flex; align-items: center; justify-content: center;
  margin-top: 20px;
}
.btn-load-more {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 8px 24px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.btn-load-more:hover { border-color: var(--accent); color: var(--accent); }
.btn-load-more:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── SITECOMMAND DASHBOARD EXTENSIONS ─────────────────────────────────────── */

:root {
  --cat1: #3b82f6;
  --cat2: #8b5cf6;
  --cat3: #ec4899;
  --cat1-dim: rgba(59,130,246,0.12);
  --cat2-dim: rgba(139,92,246,0.12);
  --cat3-dim: rgba(236,72,153,0.12);
  --status-active: #10b981;
  --status-down: #ef4444;
  --status-unknown: #6b7280;
  --grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --card-bg2: #0f1629;
  --border2: #1e2d4a;
}

/* ─── APP HEADER ────────────────────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}
.header-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.header-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  background: linear-gradient(135deg, #e6edf3 0%, #8b5cf6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--status-active);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--status-active);
  box-shadow: 0 0 6px var(--status-active);
  animation: pulse 2s ease-in-out infinite;
}

/* ─── APP LAYOUT ────────────────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

/* ─── SIDEBAR LABEL ─────────────────────────────────────────────────────────── */
.sidebar-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ─── TABS UPDATE ───────────────────────────────────────────────────────────── */
.tabs-bar {
  display: flex;
  gap: 2px;
  padding: 12px 16px 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: var(--header-h);
  z-index: 10;
}
.tabs-bar::-webkit-scrollbar { display: none; }

.tabs-bar .tab-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px; border: none; border-radius: 8px 8px 0 0;
  background: transparent; color: var(--text-muted);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.18s; white-space: nowrap;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs-bar .tab-btn:hover { color: var(--text); background: var(--bg-tertiary); }
.tabs-bar .tab-btn.active { background: var(--bg); color: var(--text); border-bottom-color: var(--accent); }

.tab-pane { display: none; padding: 20px; }
.tab-pane.active { display: block; }

/* ─── SIDEBAR ADDITIONS ─────────────────────────────────────────────────────── */
.input-field {
  width: 100%; padding: 8px 10px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 12.5px; font-family: inherit;
  margin-bottom: 8px; outline: none;
  transition: border-color 0.18s;
}
.input-field:focus { border-color: var(--accent); }
.input-field::placeholder { color: var(--text-subtle); }

.category-radios { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.cat-radio { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12px; padding: 5px 8px; border-radius: 6px; border: 1px solid transparent; transition: all 0.15s; }
.cat-radio:has(input:checked) { border-color: currentColor; }
.cat-radio-1 { color: var(--cat1); }
.cat-radio-1:has(input:checked) { background: var(--cat1-dim); }
.cat-radio-2 { color: var(--cat2); }
.cat-radio-2:has(input:checked) { background: var(--cat2-dim); }
.cat-radio-3 { color: var(--cat3); }
.cat-radio-3:has(input:checked) { background: var(--cat3-dim); }
.cat-radio input[type=radio] { accent-color: currentColor; margin: 0; }

.add-site-status { font-size: 11px; margin-top: 6px; min-height: 16px; }
.add-site-status.success { color: var(--green); }
.add-site-status.error { color: var(--red); }

.btn-primary.btn-full, button.btn-primary.btn-full {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.18s; font-family: inherit;
  width: 100%;
}
.btn-primary.btn-full:hover, button.btn-primary.btn-full:hover { opacity: 0.9; }
.btn-primary.btn-full:disabled, button.btn-primary.btn-full:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(239,68,68,0.15); color: var(--red);
  border: 1px solid rgba(239,68,68,0.3); border-radius: var(--radius);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

/* Btn-run style update */
.btn-run {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 11px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity 0.18s; font-family: inherit;
  width: 100%; letter-spacing: 0.2px;
}
.btn-run:hover { opacity: 0.9; }
.btn-run:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── DASHBOARD CATEGORY SECTIONS ──────────────────────────────────────────── */
.category-section { margin-bottom: 28px; }

.category-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border2);
}
.category-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.cat-dot-1 { background: var(--cat1); box-shadow: 0 0 8px var(--cat1); }
.cat-dot-2 { background: var(--cat2); box-shadow: 0 0 8px var(--cat2); }
.cat-dot-3 { background: var(--cat3); box-shadow: 0 0 8px var(--cat3); }

.category-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  letter-spacing: 0.02em;
}
.category-count {
  font-size: 11px; color: var(--text-muted);
  background: var(--bg-tertiary); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 20px;
}
.category-header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ─── DOMAIN CARDS ──────────────────────────────────────────────────────────── */
.domain-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.domain-card {
  background: var(--card-bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
}
.domain-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--card-border-color, var(--cat1));
  border-radius: 12px 12px 0 0;
}
.domain-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.domain-card.cat-1 { --card-border-color: var(--cat1); }
.domain-card.cat-2 { --card-border-color: var(--cat2); }
.domain-card.cat-3 { --card-border-color: var(--cat3); }
.domain-card:hover.cat-1 { border-color: rgba(59,130,246,0.4); }
.domain-card:hover.cat-2 { border-color: rgba(139,92,246,0.4); }
.domain-card:hover.cat-3 { border-color: rgba(236,72,153,0.4); }

.domain-card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.active { background: var(--status-active); box-shadow: 0 0 6px var(--status-active); animation: pulse-green 2s infinite; }
.status-dot.down { background: var(--status-down); }
.status-dot.unknown { background: var(--status-unknown); }
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 4px var(--status-active); }
  50% { box-shadow: 0 0 10px var(--status-active); }
}

.domain-card-menu {
  background: transparent; border: none; color: var(--text-subtle);
  cursor: pointer; padding: 2px 4px; border-radius: 4px;
  font-size: 16px; line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.domain-card-menu:hover { color: var(--text); background: var(--bg-tertiary); }

.domain-name {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  margin-bottom: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.sparkline-wrap {
  margin-bottom: 10px; height: 36px;
  display: flex; align-items: flex-end;
}
.sparkline-svg { width: 100%; height: 36px; overflow: visible; }
.sparkline-path { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sparkline-area { opacity: 0.15; }
.cat-1 .sparkline-path { stroke: var(--cat1); }
.cat-1 .sparkline-area { fill: var(--cat1); }
.cat-2 .sparkline-path { stroke: var(--cat2); }
.cat-2 .sparkline-area { fill: var(--cat2); }
.cat-3 .sparkline-path { stroke: var(--cat3); }
.cat-3 .sparkline-area { fill: var(--cat3); }

.domain-visitors {
  font-size: 18px; font-weight: 700; color: var(--text);
  line-height: 1;
}
.domain-visitors-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.domain-card-skeleton {
  background: var(--card-bg2); border: 1px solid var(--border2);
  border-radius: 12px; padding: 14px; height: 140px;
}

/* ─── REALTIME SECTION ──────────────────────────────────────────────────────── */
.realtime-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.realtime-title { font-size: 18px; font-weight: 700; color: var(--text); }
.realtime-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.realtime-grid {
  columns: 280px;
  column-gap: 12px;
}

.realtime-card {
  break-inside: avoid;
  background: var(--card-bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  transition: opacity 0.2s;
}
.realtime-card.no-traffic { opacity: 0.35; }
.realtime-card.has-traffic { border-color: rgba(16,185,129,0.25); }

.rt-card-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.rt-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.rt-dot.active { background: var(--status-active); box-shadow: 0 0 8px var(--status-active); }
.rt-dot.inactive { background: var(--status-down); }

.rt-domain {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rt-count {
  font-size: 20px; font-weight: 800; color: var(--status-active);
  line-height: 1; margin-bottom: 6px;
}
.rt-count.zero { color: var(--text-subtle); }
.rt-count-label { font-size: 10px; color: var(--text-muted); }

.rt-sources { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.rt-source-row { display: flex; align-items: center; gap: 6px; }
.rt-source-bar-wrap {
  flex: 1; height: 4px; background: var(--bg-tertiary); border-radius: 2px; overflow: hidden;
}
.rt-source-bar { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.rt-source-bar.google { background: var(--accent); }
.rt-source-bar.other { background: var(--text-subtle); }
.rt-source-label { font-size: 10px; color: var(--text-muted); min-width: 42px; }
.rt-source-count { font-size: 10px; color: var(--text-muted); min-width: 28px; text-align: right; }

/* ─── DASH EMPTY STATE ──────────────────────────────────────────────────────── */
.dash-empty {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.dash-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.dash-empty h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.dash-empty p { font-size: 13px; }

/* ─── MODAL ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 14px; width: 360px; max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; }
.modal-body { padding: 20px; }
.modal-domain { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.modal-label { font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.06em; display: block; margin-bottom: 8px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions .btn-primary, .modal-actions .btn-danger { flex: 1; }
.modal-actions .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.18s; font-family: inherit;
}
.modal-actions .btn-primary:hover { opacity: 0.9; }

/* ─── SIDEBAR #timelineSection hidden on non-article tabs ───────────────────── */
.timeline-hidden #timelineSection,
.timeline-hidden #runSection { display: none; }

/* ─── BLUEPRINT TOOLBAR ─────────────────────────────────────────────────────── */
.blueprint-toolbar {
  padding: 14px 0 0;
}
.bp-sort-label {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.bp-sort-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer; outline: none;
  transition: border-color var(--transition);
}
.bp-sort-select:focus { border-color: var(--accent); }

/* ─── COUNTRY TABS BAR (new id) ─────────────────────────────────────────────── */
.country-tabs-bar {
  display: flex;
  gap: 6px;
  padding: 14px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 16px;
}
.country-tabs-bar::-webkit-scrollbar { display: none; }

/* ─── REFRESHREALTIME BTN standalone ────────────────────────────────────────── */
#refreshRealtimeBtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: opacity 0.18s; font-family: inherit;
}
#refreshRealtimeBtn:hover { opacity: 0.9; }
#refreshRealtimeBtn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── OLD / NEW BADGES ───────────────────────────────────────────────────────── */
.age-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  z-index: 3;
  pointer-events: none;
}
.age-new {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
}
.age-old {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.3);
}

/* ─── BLUEPRINT VIEW TOGGLE ─────────────────────────────────────────────────── */
.bp-view-btns {
  display: flex;
  gap: 4px;
}
.bp-view-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.bp-view-btn.active,
.bp-view-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.blueprint-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 4px;
}
.country-count {
  font-size: 11px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 4px;
}

/* ─── QUICK PASTE SECTION (sidebar) ─────────────────────────────────────────── */
#quickPasteSection { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════════
   SITE MANAGER — REDESIGN
   ═══════════════════════════════════════════════════════════════════════════════ */

.site-manager-section {
  position: relative;
  padding: 0;
  overflow: visible;      /* prevent flex crushing — border-radius still applies */
  flex-shrink: 0;         /* never compress in flex column sidebar */
  border-bottom: none;
  margin-bottom: 2px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f1a2e 0%, #131c35 50%, #0e1628 100%);
  border: 1px solid rgba(99,102,241,0.18);
  box-shadow:
    0 0 0 1px rgba(99,102,241,0.08) inset,
    0 8px 32px rgba(0,0,0,0.4);
  isolation: isolate;
}
.site-manager-section > * { position: relative; z-index: 1; }

/* Animated gradient top border */
.site-manager-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    #6366f1 0%, #8b5cf6 25%, #ec4899 50%, #3b82f6 75%, #6366f1 100%);
  background-size: 200% 100%;
  animation: shimmer-border 4s linear infinite;
}

@keyframes shimmer-border {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* Header row */
.sm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 10px;
}

.sm-icon-wrap {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

.sm-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #a5b4fc, #e879f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex: 1;
}

.sm-count {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.2));
  border: 1px solid rgba(99,102,241,0.3);
  color: #a5b4fc;
  letter-spacing: 0.3px;
}

/* Textarea wrapper */
.sm-textarea-wrap {
  padding: 0 12px 8px;
}

.site-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 10px;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.7;
  padding: 10px 12px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  margin-bottom: 5px;
  box-sizing: border-box;
}

.site-textarea:focus {
  border-color: rgba(139,92,246,0.6);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12), 0 0 20px rgba(99,102,241,0.08);
  background: rgba(0,0,0,0.4);
}

.site-textarea::placeholder {
  color: rgba(148,163,184,0.4);
  font-style: italic;
}

.sm-textarea-hint {
  font-size: 10px;
  color: rgba(148,163,184,0.45);
  text-align: right;
  letter-spacing: 0.2px;
}

/* Save Sites button — gradient pill */
.btn-save-sites {
  width: calc(100% - 24px);
  margin: 0 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  background-size: 200% 100%;
  box-shadow: 0 4px 15px rgba(99,102,241,0.35), 0 1px 3px rgba(0,0,0,0.4);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-save-sites::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #f472b6 100%);
  opacity: 0;
  transition: opacity 0.25s;
}

.btn-save-sites:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.5), 0 2px 6px rgba(0,0,0,0.4);
}

.btn-save-sites:hover::after { opacity: 1; }

.btn-save-sites:active { transform: translateY(0); }

.btn-save-sites svg,
.btn-save-sites span {
  position: relative;
  z-index: 1;
}

/* Success flash on save */
.btn-save-sites.saved {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  box-shadow: 0 4px 15px rgba(16,185,129,0.4) !important;
}

/* ─── DOMAIN PICKER (Top Articles tab) ──────────────────────────────────────── */
.sm-domain-picker {
  padding: 0 12px 10px;
}

.sm-picker-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.sm-picker-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(148,163,184,0.7);
  flex: 1;
}

.sm-sel-btn {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.1);
  color: #a5b4fc;
  cursor: pointer;
  transition: all 0.15s;
}
.sm-sel-btn:hover {
  background: rgba(99,102,241,0.25);
  border-color: rgba(99,102,241,0.5);
}

.sm-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

.sm-checkbox-list::-webkit-scrollbar { width: 3px; }
.sm-checkbox-list::-webkit-scrollbar-track { background: transparent; }
.sm-checkbox-list::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 3px; }

.sm-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}

.sm-checkbox-item:hover {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.15);
}

.sm-checkbox-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid rgba(99,102,241,0.4);
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s;
}

.sm-checkbox-item input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: #6366f1;
}

.sm-checkbox-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 8px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.sm-domain-name {
  font-size: 11.5px;
  color: #cbd5e1;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.sm-picker-empty {
  font-size: 11px;
  color: rgba(148,163,184,0.5);
  text-align: center;
  padding: 12px 0;
}

/* ─── THEME STRIPES — category colours on the section bottom edge ─────────── */
.site-manager-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    #3b82f6 0%, #8b5cf6 33%, #ec4899 66%, #10b981 100%);
  opacity: 0.5;
}

