/* === Reviewscope Dashboard === */

:root {
  /* Cyan accent */
  --accent: #06b6d4;
  --accent-hover: #0891b2;
  --accent-soft: rgba(6, 182, 212, 0.10);
  --accent-border: rgba(6, 182, 212, 0.25);

  /* Status */
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.10);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.10);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.10);
  --info: #3b82f6;
  --info-soft: rgba(59, 130, 246, 0.10);

  /* Light theme (default) */
  --bg: #fafaf9;
  --bg-elevated: #ffffff;
  --bg-subtle: #f5f5f4;
  --bg-hover: #f0f0ef;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text: #1c1917;
  --text-muted: #57534e;
  --text-subtle: #a8a29e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-elevated: #131313;
  --bg-subtle: #1a1a1a;
  --bg-hover: #232323;
  --border: #262626;
  --border-strong: #383838;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-subtle: #71717a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);

  --accent-soft: rgba(6, 182, 212, 0.14);
  --accent-border: rgba(6, 182, 212, 0.30);
  --success-soft: rgba(16, 185, 129, 0.14);
  --danger-soft: rgba(239, 68, 68, 0.14);
  --warning-soft: rgba(245, 158, 11, 0.14);
  --info-soft: rgba(59, 130, 246, 0.14);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* === Layout === */

.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: var(--bg);
}

/* === Sidebar === */
.sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 24px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #0e7490);
  display: grid;
  place-items: center;
  color: white;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 60%);
}
.brand-mark svg { position: relative; z-index: 1; }

.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-tag {
  font-size: 11px;
  color: var(--text-subtle);
  margin-top: 1px;
}

.nav-section {
  padding: 10px 8px 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-subtle);
}
.nav-item:hover .nav-icon { color: var(--text-muted); }
.nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}
.nav-item.active .nav-badge {
  background: var(--accent);
  color: white;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 14px 8px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 500; color: var(--text); }
.user-email { font-size: 11px; color: var(--text-subtle); }

/* === Main === */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header {
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.page-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.crumb {
  color: var(--text-subtle);
  font-weight: 400;
}
.crumb-sep {
  color: var(--text-subtle);
  margin: 0 6px;
}
.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Search === */
.search {
  position: relative;
  width: 280px;
}
.search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s, background 0.12s;
}
.search input:focus {
  border-color: var(--accent-border);
  background: var(--bg-elevated);
}
.search input::placeholder { color: var(--text-subtle); }
.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}
.kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10.5px;
  color: var(--text-subtle);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* === Icon button === */
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  position: relative;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-strong);
}
.icon-btn .dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--bg-elevated);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.12s;
  white-space: nowrap;
}
.btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 1px 2px rgba(6, 182, 212, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.btn-lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* === Page === */
.page {
  padding: 28px 32px 60px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  animation: fadeUp 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}
.page-head h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.page-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* === Card === */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: 2px;
}
.card-body { padding: 20px; }
.card-body.dense { padding: 0; }

/* === Metric card === */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.metric {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.metric-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.metric-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.metric-unit {
  font-size: 14px;
  color: var(--text-subtle);
  font-weight: 500;
}
.metric-trend {
  margin-top: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-subtle);
}
.metric-trend .pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.pill.up { background: var(--success-soft); color: var(--success); }
.pill.down { background: var(--danger-soft); color: var(--danger); }
.metric-spark {
  position: absolute;
  right: 16px;
  bottom: 12px;
  opacity: 0.9;
}

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.6;
}
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.muted { background: var(--bg-subtle); color: var(--text-muted); }
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* === Form === */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.label .help { color: var(--text-subtle); font-weight: 400; }
.input, .select, .textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a29e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.filter-wrap {
  position: relative;
}
.filter-wrap .select {
  padding-left: 32px;
}
.filter-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  z-index: 1;
}

/* === Toggle === */
.toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  transition: 0.18s;
  cursor: pointer;
}
.toggle .slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.toggle input:checked + .slider { background: var(--accent); }
.toggle input:checked + .slider::before { transform: translateX(16px); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .info { display: flex; flex-direction: column; gap: 2px; }
.toggle-row .info .t { font-size: 13px; font-weight: 500; }
.toggle-row .info .d { font-size: 12px; color: var(--text-subtle); }

/* === Table === */
.table-wrap { overflow: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 10px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover { background: var(--bg-subtle); }
.table tbody tr.row-success { background: var(--success-soft); }
.table tbody tr.row-success:hover { background: rgba(16, 185, 129, 0.16); }
.table tbody tr.row-danger { background: var(--danger-soft); }
.table tbody tr.row-danger:hover { background: rgba(239, 68, 68, 0.16); }
.table tbody tr.row-warning { background: var(--warning-soft); }
.table tbody tr:last-child td { border-bottom: none; }

.table .num { font-variant-numeric: tabular-nums; }
.table .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; }

/* === Progress === */
.progress {
  width: 100%;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #14b8a6);
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.progress-bar.idle::after { display: none; }

/* === Log console === */
.console {
  background: #0a0a0a;
  color: #d4d4d4;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.7;
  padding: 16px 20px;
  border-radius: 8px;
  height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  position: relative;
}
[data-theme="light"] .console {
  background: #1c1917;
}
.console-line {
  white-space: pre-wrap;
  word-break: break-word;
  display: flex;
  gap: 10px;
  animation: logIn 0.2s ease-out;
}
@keyframes logIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.console-time { color: #71717a; flex-shrink: 0; }
.console-tag {
  flex-shrink: 0;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  height: 18px;
  display: inline-flex;
  align-items: center;
  margin-top: 1px;
}
.console-tag.info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.console-tag.ok { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.console-tag.err { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.console-tag.warn { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.console-text { flex: 1; }

.cursor::after {
  content: '▊';
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* === Generic dropdown item === */
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px; border-radius: 6px;
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--text); text-align: left;
  white-space: nowrap;
}
.dropdown-item:hover { background: var(--bg-subtle); }
.dropdown-item:disabled { opacity: 0.5; cursor: not-allowed; }

/* === Notifications dropdown === */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 340px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  z-index: 100;
  overflow: hidden;
  animation: dropIn 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.notif-item:hover { background: var(--bg-subtle); }
.notif-item:last-child { border-bottom: none; }
.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.notif-text { flex: 1; min-width: 0; }
.notif-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}
.notif-meta { font-size: 11.5px; color: var(--text-subtle); }
.notif-unread {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
}

/* === Heatmap === */
.heatmap {
  display: grid;
  grid-template-columns: 36px repeat(24, 1fr);
  gap: 3px;
  font-variant-numeric: tabular-nums;
}
.hm-label { font-size: 11px; color: var(--text-subtle); display: flex; align-items: center; }
.hm-cell {
  aspect-ratio: 1.4;
  border-radius: 3px;
  background: var(--bg-subtle);
  cursor: pointer;
  transition: transform 0.1s;
  position: relative;
}
.hm-cell:hover {
  transform: scale(1.4);
  z-index: 2;
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

/* === Tooltips (simple) === */
.tooltip {
  position: absolute;
  background: #1c1917;
  color: white;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  font-variant-numeric: tabular-nums;
}
.tooltip::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #1c1917;
}

/* === Profile cards === */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.profile-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.profile-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.profile-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.profile-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}
.profile-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-subtle);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.profile-card.selected .profile-icon { background: var(--accent); color: white; }
.profile-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.profile-meta { font-size: 11.5px; color: var(--text-subtle); }

/* === Tabs === */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* === Segmented === */
.seg {
  display: inline-flex;
  background: var(--bg-subtle);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border);
}
.seg button {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 12.5px;
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.12s;
}
.seg button.active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* === Stat dots === */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.stat-row:last-child { border-bottom: none; }

/* === Page transition === */
.page-enter {
  animation: fadeUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* === Utility === */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spread { display: flex; justify-content: space-between; align-items: center; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.tnum { font-variant-numeric: tabular-nums; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.flex-1 { flex: 1; }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.text-lg { font-size: 16px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* Charts grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-12-7-5 { display: grid; grid-template-columns: 7fr 5fr; gap: 16px; }
.grid-12-8-4 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* Skeleton loader */
.skel {
  background: linear-gradient(90deg, var(--bg-subtle) 0%, var(--bg-hover) 50%, var(--bg-subtle) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Code block */
.code {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text);
}

.kbd-key {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-muted);
}

/* === Generator === */
.review-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--bg-elevated);
  position: relative;
  animation: fadeUp 0.3s ease-out;
}
.review-stars {
  display: flex;
  gap: 2px;
  color: var(--warning);
  margin-bottom: 6px;
}
.review-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.review-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-subtle);
}

/* Slider */
.range {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-subtle);
  border-radius: 2px;
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--accent);
  cursor: pointer;
}

/* Schedule day pills */
.day-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.day-pill {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.day-pill:hover { border-color: var(--border-strong); }
.day-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Status indicator */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  position: relative;
}
.status-dot.live {
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulse 1.6s infinite;
}
.status-dot.idle { background: var(--text-subtle); }
.status-dot.error { background: var(--danger); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Popover */
.popover {
  position: relative;
}
.checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  background: var(--bg-elevated);
  cursor: pointer;
  flex-shrink: 0;
}
.checkbox.checked {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Empty state */
.empty {
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-subtle);
  text-align: center;
}
.empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-subtle);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
  padding: 20px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-body  { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* === Toast === */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.2s ease-out;
  max-width: 360px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Alert inline === */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 8px;
}
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-danger   { background: var(--danger-soft);  color: var(--danger);  }
.alert-warning  { background: var(--warning-soft); color: var(--warning); }
.alert-info     { background: var(--info-soft);    color: var(--info);    }

/* Empty state */
.empty {
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-subtle);
  text-align: center;
}
.empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-subtle);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* === Collapsible sidebar === */
.app { transition: grid-template-columns 0.2s ease; }
.sidebar { transition: padding 0.2s ease; }

.brand-text, .user-info { overflow: hidden; transition: opacity 0.15s ease, max-width 0.2s ease; max-width: 160px; }
.nav-label { white-space: nowrap; overflow: hidden; transition: opacity 0.15s ease, max-width 0.2s ease; max-width: 150px; }

.sidebar.collapsed { padding: 20px 8px; }
.sidebar.collapsed .brand { justify-content: center; padding: 6px 0 24px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .user-info,
.sidebar.collapsed .nav-label { opacity: 0; max-width: 0; }
.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .footer-settings { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; gap: 0; }
.sidebar.collapsed .sidebar-footer { justify-content: center; padding: 14px 0 4px; }

/* sidebar-toggle moved to header — no sidebar styles needed */

/* nav tooltip (collapsed only) */
.nav-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: var(--text);
  color: var(--bg-elevated);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 50;
}
.nav-tooltip::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--text);
}
.sidebar.collapsed .nav-item:hover .nav-tooltip,
.sidebar.collapsed .sidebar-footer:hover .nav-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* breadcrumb link */
.crumb.link { cursor: pointer; transition: color 0.12s; }
.crumb.link:hover { color: var(--accent); }

/* === Review item === */
.rev {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.rev:first-child { padding-top: 0; }
.rev:last-child { border-bottom: none; padding-bottom: 0; }
.rev-company {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}
.rev-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.rev-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.rev-text.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rev-more {
  margin-top: 6px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
  padding: 0;
}
.rev-more:hover { text-decoration: underline; }

.rev-reply {
  margin-top: 12px;
  background: var(--bg-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
}
.rev-reply-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.rev-owner-ic {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.rev-reply-text { font-size: 13px; line-height: 1.55; color: var(--text-muted); }

.rev-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
}
.rev-strip.warn-strip { background: var(--warning-soft); color: var(--warning); }
.rev-strip.muted-strip { background: var(--bg-subtle); color: var(--text-subtle); }

.rev-gen {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.2s ease;
}
.rev-gen-inner { padding-top: 10px; }

/* === Rating distribution === */
.rate-row {
  display: grid;
  grid-template-columns: 52px 1fr 84px;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
}
.rate-row .rate-label { display: flex; align-items: center; gap: 4px; color: var(--text-muted); justify-content: flex-end; }
.rate-bar { height: 8px; background: var(--bg-subtle); border-radius: 999px; overflow: hidden; }
.rate-bar > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rate-row .rate-val { text-align: right; color: var(--text-subtle); font-variant-numeric: tabular-nums; }

/* === Star filter pills === */
.star-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: all 0.12s;
}
.star-pill:hover { border-color: var(--border-strong); }
.star-pill.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.star-pill.active svg { color: var(--accent); }

/* big rating block */
.rating-big {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* info rows */
.info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-row .ic { color: var(--text-subtle); flex-shrink: 0; }
.info-row a { color: var(--accent); text-decoration: none; }
.info-row a:hover { text-decoration: underline; }

/* platform logo tile */
.plat-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--bg-subtle);
  flex-shrink: 0;
}
.card-name-link { transition: color 0.12s; }
.card-name-link:hover { color: var(--accent); }

/* === Rank utility classes === */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spread { display: flex; justify-content: space-between; align-items: center; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.tnum { font-variant-numeric: tabular-nums; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-18 { gap: 18px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.flex-1 { flex: 1; }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* === Form field styles === */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.label .help { color: var(--text-subtle); font-weight: 400; }
.input, .select, .textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a29e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

/* === Tabs & Seg === */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* === Segmented === */
.seg {
  display: inline-flex;
  background: var(--bg-subtle);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border);
}
.seg button {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 12.5px;
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.12s;
}
.seg button.active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* === Progress bar === */

.progress {
  width: 100%;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #14b8a6);
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.progress-bar.idle::after { display: none; }

/* === Log console === */
.console {
  background: #0a0a0a;
  color: #d4d4d4;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.7;
  padding: 16px 20px;
  border-radius: 8px;
  height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  position: relative;
}

/* === Status dot === */

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  position: relative;
}
.status-dot.live {
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulse 1.6s infinite;
}
.status-dot.idle { background: var(--text-subtle); }
.status-dot.error { background: var(--danger); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* === Tooltip === */

.tooltip {
  position: absolute;
  background: #1c1917;
  color: white;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  font-variant-numeric: tabular-nums;
}
.tooltip::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #1c1917;
}

/* === Range input === */

.range {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-subtle);
  border-radius: 2px;
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--accent);
  cursor: pointer;
}

/* === Rank page components === */
@keyframes rkScanPulse {
  0%   { transform: scale(1);   opacity: 0.9; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@keyframes rkSweep {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
@keyframes rkRadar {
  0%   { transform: scale(0.4); opacity: 0.5; }
  100% { transform: scale(2.2); opacity: 0; }
}
@keyframes rkBlink { 50% { opacity: 0.35; } }

.rk-scan-card {
  position: relative;
  overflow: hidden;
  border-color: var(--accent-border);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 55%),
    var(--bg-elevated);
}
.rk-scan-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
  width: 40%;
  animation: rkSweep 2.6s cubic-bezier(0.4,0,0.2,1) infinite;
}

.rk-check-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  transition: border-color 0.14s, box-shadow 0.14s, transform 0.14s;
}
.rk-check-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.rk-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 14px;
}
@media (max-width: 980px) {
  .rk-section-grid { grid-template-columns: 1fr; }
}

.rk-group-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px 12px;
}

.rk-keyword-row {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: background 0.12s, border-color 0.12s;
}
.rk-keyword-row:hover { background: var(--bg-subtle); border-color: var(--border-strong); }

.rk-tile-btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: all 0.12s;
  position: relative;
}
.rk-tile-btn:hover:not(:disabled) { border-color: var(--border-strong); background: var(--bg-subtle); }
.rk-tile-btn.sel { border-color: var(--accent); background: var(--accent-soft); }
.rk-tile-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.rk-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeUp 0.18s ease;
}
[data-theme="dark"] .rk-modal-overlay { background: rgba(0,0,0,0.66); }

.rk-seg-icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: none; background: transparent;
  border-radius: 6px; color: var(--text-muted);
}
.rk-seg-icon.active { background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-sm); }

.rk-map {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.rk-map-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: #fff;
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.12s;
}
.rk-map-dot:hover { transform: translate(-50%, -50%) scale(1.18); z-index: 5; }
