/* ── TOKENS ── */
:root {
  --bg:        #070810;
  --surface:   #0d0f1a;
  --surface2:  #131626;
  --surface3:  #191c2e;
  --border:    #1c2038;
  --border2:   #262a44;
  --accent:    #4fffb0;
  --accent-dim:#2a8a60;
  --accent-bg: rgba(79,255,176,0.06);
  --orange:    #ff8c42;
  --orange-bg: rgba(255,140,66,0.07);
  --red:       #ff4757;
  --red-bg:    rgba(255,71,87,0.07);
  --purple:    #a78bfa;
  --blue:      #60a5fa;
  --yellow:    #fbbf24;
  --text:      #c8d0e8;
  --text-dim:  #6b7494;
  --text-muted:#343850;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Outfit', sans-serif;
  --radius:    6px;
  --radius-lg: 10px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ── HEADER ── */
.header {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  flex-shrink: 0;
  overflow: hidden;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-scan-line {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan-slide 3s ease-in-out infinite;
}
@keyframes scan-slide {
  0%   { transform: translateX(-100%); opacity: 0; }
  30%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-glyph {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  animation: hex-pulse 4s ease-in-out infinite;
}
@keyframes hex-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.logo-text-wrap { display: flex; flex-direction: column; }

.logo-text {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1;
}

.logo-accent { color: var(--accent); }

.logo-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.stats-bar {
  display: flex;
  gap: 6px;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 14px;
  min-width: 80px;
}

.stat-label {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  transition: color 0.3s;
}
.stat-value.accent  { color: var(--accent); }
.stat-value.success { color: var(--blue); }
.stat-value.orange  { color: var(--orange); }

/* ── LAYOUT ── */
body { display: flex; flex-direction: column; }

.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── LEFT PANEL ── */
.control-panel {
  width: 280px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.panel-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.panel-section.flex-grow { flex: 1; }

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-title {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.panel-title-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  background: var(--border);
  color: var(--text-dim);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.1em;
}

/* ── INPUTS ── */
.input-group { margin-bottom: 12px; }

.input-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-hint {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

.input-field {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79,255,176,0.12);
}
.input-field::placeholder { color: var(--text-muted); }

.select-field { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7494' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }

.segmented-control {
  display: flex;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 3px;
}

.seg-btn {
  flex: 1;
  padding: 5px 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.seg-btn.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.seg-btn:hover:not(.active) { background: var(--border); color: var(--text); }

/* ── BUTTONS ── */
.btn-primary, .btn-secondary, .btn-danger, .btn-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: none;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover { background: #80ffcc; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(79,255,176,0.3); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface3);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red);
  margin-top: 6px;
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-tool {
  background: var(--surface3);
  color: var(--text);
  border: 1px solid var(--border);
  width: auto;
  padding: 7px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius);
  letter-spacing: 0;
}
.btn-tool:hover { border-color: var(--accent-dim); color: var(--accent); background: var(--accent-bg); }

.accent-tool { border-color: var(--accent-dim); color: var(--accent); }

.btn-glyph { font-size: 14px; }
.btn-text { flex: 1; }
.btn-spinner {
  animation: spin 1s linear infinite;
  font-size: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PIPELINE ── */
.pipe-overall-status {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--border);
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.pipe-overall-status.running {
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  animation: status-blink 1s ease-in-out infinite;
}
.pipe-overall-status.done { background: rgba(96,165,250,0.1); color: var(--blue); }
@keyframes status-blink { 0%,100%{opacity:1} 50%{opacity:0.5} }

.pipeline { display: flex; flex-direction: column; gap: 0; }

.pipe-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.pipe-step.active { border-color: var(--accent-dim); background: var(--accent-bg); }
.pipe-step.done   { border-color: var(--border2); opacity: 0.7; }

.pipe-icon-wrap { font-size: 16px; width: 24px; text-align: center; }
.pipe-info { flex: 1; }
.pipe-name { font-size: 12px; font-weight: 600; color: var(--text); }
.pipe-detail { font-size: 10px; color: var(--text-dim); font-family: var(--font-mono); margin-top: 1px; }

.pipe-state-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border2);
  transition: all 0.3s;
  flex-shrink: 0;
}
.pipe-state-dot.active { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: dot-pulse 1s infinite; }
.pipe-state-dot.done   { background: var(--blue); }
.pipe-state-dot.error  { background: var(--red); }
@keyframes dot-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.pipe-line {
  width: 1px;
  height: 12px;
  background: var(--border);
  margin: 0 0 0 22px;
}

/* ── URL QUEUE ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 16px;
  padding: 0 5px;
  background: var(--border2);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}

.url-queue {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.url-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  transition: all 0.2s;
  overflow: hidden;
}
.url-item .url-status { flex-shrink: 0; font-size: 11px; }
.url-item .url-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.url-item .url-found {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 9px;
}

.url-item.pending  { opacity: 0.5; }
.url-item.scanning { border-color: var(--accent-dim); color: var(--text); }
.url-item.done     { border-color: var(--border); }
.url-item.error    { border-color: var(--red); color: var(--red); opacity: 0.6; }

/* ── RIGHT PANEL ── */
.results-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.tab-bar {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  flex-shrink: 0;
}

.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-label { }
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 9px;
}

.tab-content { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.tab-content.active { display: flex; }

/* ── RESULTS TOOLBAR ── */
.results-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.filter-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 7px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.filter-input:focus { border-color: var(--accent); }
.filter-input::placeholder { color: var(--text-muted); }

.toolbar-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── DATA TABLE ── */
.table-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table th {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 9px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  font-weight: 500;
}
.th-check { width: 40px; padding-left: 16px !important; }
.th-actions { width: 120px; text-align: center !important; }

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.data-table tbody tr:hover { background: var(--surface); }
.data-table tbody tr.selected { background: var(--accent-bg); }

.data-table td {
  padding: 10px 14px;
  vertical-align: middle;
}

.td-email {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}
.td-domain {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}
.td-domain a {
  color: inherit;
  text-decoration: none;
}
.td-domain a:hover { color: var(--blue); }

.td-actions { text-align: center; }

.cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid;
}
.cat-Business    { background: rgba(96,165,250,0.1);  border-color: rgba(96,165,250,0.3);  color: var(--blue); }
.cat-Ministry    { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.3); color: var(--purple); }
.cat-Personal    { background: rgba(79,255,176,0.1);  border-color: rgba(79,255,176,0.3);  color: var(--accent); }
.cat-Media       { background: rgba(251,191,36,0.1);  border-color: rgba(251,191,36,0.3);  color: var(--yellow); }
.cat-Support     { background: rgba(255,140,66,0.1);  border-color: rgba(255,140,66,0.3);  color: var(--orange); }
.cat-Sales       { background: rgba(255,71,87,0.1);   border-color: rgba(255,71,87,0.3);   color: var(--red); }
.cat-Education   { background: rgba(34,211,164,0.1);  border-color: rgba(34,211,164,0.3);  color: #22d3a4; }
.cat-Government  { background: rgba(156,163,175,0.1); border-color: rgba(156,163,175,0.3); color: #9ca3af; }
.cat-Other       { background: var(--border);          border-color: var(--border2);         color: var(--text-dim); }
.cat-pending     { background: transparent; border-color: var(--border); color: var(--text-muted); font-style: italic; }

.action-btn {
  padding: 4px 8px;
  font-size: 11px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.12s;
  font-family: var(--font-body);
  white-space: nowrap;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

.cb-style {
  appearance: none;
  width: 14px; height: 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: all 0.12s;
}
.cb-style:checked { background: var(--accent); border-color: var(--accent); }
.cb-style:checked::after { content: '✓'; position: absolute; top: -1px; left: 1px; font-size: 10px; color: #000; font-weight: 700; }

/* ── EMPTY STATES ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 20px;
  text-align: center;
  height: 100%;
  min-height: 300px;
}
.empty-hexagon { opacity: 0.4; margin-bottom: 6px; }
.empty-headline { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--text-dim); }
.empty-sub { font-size: 12px; color: var(--text-muted); max-width: 240px; line-height: 1.6; }

/* ── TABLE FOOTER ── */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  min-height: 38px;
}
.table-footer-info { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.bulk-actions { display: flex; align-items: center; gap: 8px; }
.bulk-label { font-family: var(--font-mono); font-size: 10px; color: var(--accent); }

/* ── CATEGORIES TAB ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  align-content: start;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  transition: border-color 0.2s;
}
.cat-card:hover { border-color: var(--border2); }

.cat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cat-card-name { font-family: var(--font-head); font-size: 13px; font-weight: 700; }
.cat-card-count {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  opacity: 0.7;
}

.cat-card-emails { display: flex; flex-direction: column; gap: 4px; }
.cat-email-item {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  padding: 3px 6px;
  background: var(--surface2);
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color 0.12s;
}
.cat-email-item:hover { color: var(--accent); }

/* ── REPLIES TAB ── */
.replies-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
}

.reply-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: slide-in 0.25s ease;
}
@keyframes slide-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.reply-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.reply-card-to {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}
.reply-card-actions { display: flex; gap: 6px; }
.reply-card-body {
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
  white-space: pre-wrap;
  max-height: 180px;
  overflow-y: auto;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,8,16,0.85);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.15s ease;
}
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: modal-in 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modal-in { from { opacity:0; transform:scale(0.95) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; }
.modal-to { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-top: 3px; }
.modal-close {
  background: none; border: none; color: var(--text-dim); font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: all 0.12s;
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-loading {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 40px; color: var(--text-dim); font-size: 13px;
}
.modal-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.modal-body-wrap { padding: 16px 18px; }
.modal-body {
  width: 100%;
  min-height: 200px;
  max-height: 340px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  font-family: var(--font-body);
}

.modal-footer {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}
.modal-footer .btn-primary, .modal-footer .btn-secondary, .modal-footer .btn-tool {
  width: auto; flex: none;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: var(--accent); color: var(--accent); }
.toast.error { border-color: var(--red); color: var(--red); }
.toast.warn { border-color: var(--orange); color: var(--orange); }

/* ── MISC ── */
.cat-empty, .replies-empty { height: 100%; }

/* ── DIAGNOSTIC BAR ── */
.diag-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--orange);
  padding: 10px 20px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
}
.diag-title { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--orange); margin-bottom: 2px; }
.diag-item { display: flex; align-items: flex-start; gap: 8px; color: var(--text); line-height: 1.5; }
.diag-dot-bad { color: var(--red); font-weight: 700; flex-shrink: 0; }
.diag-dot-ok  { color: var(--accent); font-weight: 700; flex-shrink: 0; }
.diag-fix-steps {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 12px;
  line-height: 1.8;
  color: var(--text-dim);
  font-size: 11px;
  margin-top: 4px;
}
.diag-fix-steps code {
  background: var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}
.diag-spin { animation: spin 1s linear infinite; display: inline-block; }
.diag-retry, .diag-dismiss {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.12s;
}
.diag-retry:hover { border-color: var(--accent); color: var(--accent); }
.diag-dismiss:hover { border-color: var(--red); color: var(--red); }
