* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a25;
  --border: #2a2a3a;
  --text: #e0e0e8;
  --text-dim: #888898;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e17055;
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

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

/* Claude usage stats in header — sleek text strip */
.header-stats {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  opacity: 0.65;
  white-space: nowrap;
  pointer-events: none;
  flex: 1;
  text-align: center;
  padding: 0 16px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) { .header-stats { display: none; } }

nav { display: flex; align-items: center; gap: 16px; }
nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all 0.2s;
}
nav a:hover, nav a.active { color: var(--text); background: var(--surface2); }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}

.loading { text-align: center; padding: 48px; color: var(--text-dim); }

/* Model Grid */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-header h1 { font-size: 24px; font-weight: 600; }

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.model-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.model-preview {
  height: 200px;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.model-preview iframe {
  width: 200%;
  height: 200%;
  border: none;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
}

.model-info {
  padding: 16px;
}

.model-info h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.model-info p {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.model-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.model-meta .badge {
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-light); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea { min-height: 100px; resize: vertical; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90vw;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
}

/* Model Detail */
.model-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.model-detail-header h1 { font-size: 28px; }

.model-detail-preview {
  width: 100%;
  height: 600px;
  background: #0c0d14;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.model-detail-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.model-controls-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  pointer-events: auto;
  user-select: none;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

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

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Submissions list */
.submission-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.submission-item .status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending { background: var(--warning); color: #000; }
.status-processing { background: var(--accent); color: #fff; }
.status-reviewed { background: var(--accent-light); color: #000; }
.status-applied { background: var(--success); color: #fff; }
.status-rejected { background: var(--danger); color: #fff; }
.status-error { background: var(--danger); color: #fff; }

/* Admin */
.admin-section { margin-bottom: 32px; }
.admin-section h2 { margin-bottom: 16px; font-size: 20px; }

.trust-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.trust-0 { background: var(--border); color: var(--text-dim); }
.trust-25 { background: #2d3436; color: var(--warning); }
.trust-50 { background: #2d3436; color: var(--accent-light); }
.trust-75 { background: #2d3436; color: var(--success); }
.trust-100 { background: var(--success); color: #fff; }

/* Version History */
.version-item {
  padding: 12px;
  border-left: 2px solid var(--border);
  margin-left: 8px;
  margin-bottom: 8px;
}

.version-item.current { border-left-color: var(--accent); }

/* API info box */
.api-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}

.api-box code {
  display: block;
  background: var(--bg);
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  overflow-x: auto;
  margin-top: 8px;
  white-space: pre;
}

/* Responsive */
@media (max-width: 640px) {
  .model-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .model-detail-preview { height: 300px; }
}

/* Diff view */
.diff-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.diff-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.diff-panel h4 {
  padding: 8px 12px;
  background: var(--surface2);
  font-size: 13px;
  color: var(--text-dim);
}

.diff-panel iframe {
  width: 100%;
  height: 300px;
  border: none;
}

/* User images in submission */
.submission-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.submission-images img {
  max-width: 120px;
  max-height: 80px;
  border-radius: 4px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--text-dim);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 14px;
  z-index: 300;
  animation: slideUp 0.3s ease;
}

.toast.error { border-color: var(--danger); }
.toast.success { border-color: var(--success); }

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

/* ── Gallery search + category tabs ─────────────────────────── */
.gallery-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 9px 14px 9px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
}
.search-input:focus { outline: none; border-color: var(--accent); }

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-wrap::before {
  content: '⌕';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 18px;
  pointer-events: none;
}

.gallery-count {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}

.cat-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cat-tab {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.cat-tab:hover { border-color: var(--accent); color: var(--text); }
.cat-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Compact sticky gallery bar ──────────────────────────── */
.gallery-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(18, 18, 26, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  margin-bottom: 16px;
  position: sticky;
  top: 56px;
  z-index: 89;
}
.gallery-bar .search-wrap { flex: 1; min-width: 120px; }
.gallery-bar .search-input {
  padding: 5px 10px 5px 30px;
  font-size: 13px;
  height: 32px;
  min-width: 0;
  width: 100%;
}
.gallery-bar .search-wrap::before { font-size: 14px; left: 8px; }
.gallery-bar-select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  height: 32px;
  cursor: pointer;
  flex-shrink: 0;
}
.gallery-bar-count {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.gallery-type-tab {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
  line-height: 1.6;
  cursor: pointer;
}
.gallery-type-tab:hover { color: var(--text); border-color: var(--accent); }
.gallery-type-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Iframe loading skeleton ─────────────────────────────────── */
.model-preview { position: relative; }
.preview-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  pointer-events: none;
  transition: opacity 0.3s;
}
.preview-loader::after {
  content: '';
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.model-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Nav user info ───────────────────────────────────────────── */
.nav-user-pts {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── API docs section ────────────────────────────────────────── */
.api-section {
  margin-top: 48px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.api-section h2 { font-size: 18px; margin-bottom: 6px; }
.api-section .subtitle { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; }
.api-endpoints { display: flex; flex-direction: column; gap: 10px; }
.api-endpoint {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.api-endpoint .method {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #1a3a1a;
  color: var(--success);
  margin-top: 2px;
}
.api-endpoint .path { font-family: 'Courier New', monospace; font-size: 13px; margin-bottom: 2px; }
.api-endpoint .desc { font-size: 12px; color: var(--text-dim); }

/* ── Priority badges ─────────────────────────────────────────── */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.priority-standard { background: var(--surface2); color: var(--text-dim); }
.priority-rising   { background: #332d1a; color: var(--warning); }
.priority-trusted  { background: #1a1a30; color: var(--accent-light); }
.priority-elite    { background: #0d2b1e; color: var(--success); }

/* ── Filter bar ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-bar label { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.filter-bar select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
}
.filter-bar select:focus { outline: none; border-color: var(--accent); }
.filter-stat {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Queue card ──────────────────────────────────────────────── */
.queue-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.queue-pos {
  font-size: 14px;
  color: var(--text-dim);
}

.queue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.queue-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.queue-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.queue-left {
  padding: 20px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: 520px;
}
.queue-right {
  display: flex;
  flex-direction: column;
}
.queue-render {
  flex: 1;
  min-height: 360px;
  background: #fff;
}
.queue-render iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.queue-history {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  max-height: 160px;
  overflow-y: auto;
}
.queue-history h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.history-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}
.history-row:last-child { border-bottom: none; }
.history-row .hv {
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  margin-top: 2px;
}
.queue-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  align-items: center;
}

/* Keyboard shortcut badges */
kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  font-family: monospace;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* My Submissions stats */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
}
.stat-val {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-lbl {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Claude Queue tab ─────────────────────────────────────────────── */
/* ── Stats strip ───────────────────────────────────────────── */
.cq-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 18px;
  margin-bottom: 16px;
  font-family: 'Courier New', Courier, monospace;
  overflow-x: auto;
  white-space: nowrap;
}
.cqs-cell {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.cqs-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.cqs-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.cqs-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 16px;
  flex-shrink: 0;
}

/* ── Section headers ───────────────────────────────────────── */
.cq-section-hdr {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Pulsing live indicator dot ────────────────────────────── */
.cq-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf50;
  flex-shrink: 0;
  animation: cq-pulse 1.5s ease-in-out infinite;
}
@keyframes cq-pulse { 0%,100% { opacity:1; } 50% { opacity:0.25; } }

/* ── Recently completed items ──────────────────────────────── */
.cq-recent-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 9px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 3px;
  transition: background 0.12s;
}
.cq-recent-item:hover { background: var(--surface2); }
.cqr-icon { font-size: 12px; font-weight: 700; padding-top: 2px; text-align: center; }
.cqr-ok  { color: #4caf50; }
.cqr-err { color: #ef5350; }
.cqr-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.cqr-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.cqr-name:hover { color: var(--accent-light); }
.cqr-meta {
  font-size: 10px;
  color: var(--accent-light);
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}
.cqr-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}
.cqr-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cqr-err-msg {
  font-size: 11px;
  color: #ef5350;
  margin: 3px 0 0;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  word-break: break-all;
}
/* Status tag pill on recent items */
.cqr-status-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
}
.cqr-st-applied  { background: rgba(76,175,80,0.15);  color: #4caf50; }
.cqr-st-rejected { background: rgba(239,83,80,0.12);  color: #ef5350; }
.cqr-st-error    { background: rgba(239,83,80,0.12);  color: #ef5350; }

.cq-review-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #e65100;
  border-color: rgba(230, 81, 0, 0.3);
}
.cq-review-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(230, 81, 0, 0.35);
  background: rgba(230, 81, 0, 0.06);
  margin-bottom: 6px;
  transition: background 0.12s;
}
.cq-review-item:hover { background: rgba(230, 81, 0, 0.1); }
.cqrev-body { flex: 1; min-width: 0; }
.cqrev-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.cqrev-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.cqrev-name:hover { color: var(--accent-light); }
.cqrev-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.claude-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

#claude-queue-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.claude-queue-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: background 0.15s;
}
.claude-queue-item:hover { background: var(--surface2); }
.claude-queue-item.cqi-active { border-color: #2a5c2a; background: #111a11; }

.cqi-pos {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
  min-width: 28px;
}

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

.cqi-body { min-width: 0; }

/* ── Console tab ────────────────────────────────────────────── */
.console-log {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: var(--radius);
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  overflow: auto;
  max-height: 72vh;
}
.ce-entry {
  padding: 7px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  border-left: 3px solid transparent;
}
.ce-entry:last-child { border-bottom: none; }
.ce-ok  { border-left-color: #4caf50; }
.ce-err { border-left-color: #ef5350; background: rgba(239,83,80,0.04); }
.ce-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ce-icon { font-weight: 700; width: 14px; flex-shrink: 0; }
.ce-ok  .ce-icon { color: #4caf50; }
.ce-err .ce-icon { color: #ef5350; }
.ce-model { font-weight: 600; color: #e6edf3; }
.ce-dur   { font-size: 11px; color: #8b949e; }
.ce-tok   { font-size: 11px; color: #58a6ff; }
.ce-tok-err { color: #ef5350; }
.ce-ts    { font-size: 10px; color: #8b949e; margin-left: auto; white-space: nowrap; }
.ce-desc  { color: #8b949e; font-size: 11px; margin: 3px 0 0 24px; }
.ce-toggle {
  background: none;
  border: 1px solid #30363d;
  color: #8b949e;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}
.ce-toggle:hover { background: #21262d; color: #e6edf3; }
.ce-detail {
  margin: 8px 0 4px 24px;
  padding: 10px 12px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 4px;
  color: #ffa198;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 320px;
  overflow-y: auto;
  line-height: 1.5;
}

.cqi-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.cqi-desc {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}

.cqi-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

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

/* status badge for queued */
.status-queued { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-light); }

/* ── Projects ─────────────────────────────────────────────────────── */
.proj-badge {
  background: rgba(108,92,231,0.18);
  color: var(--accent-light);
  border: 1px solid rgba(108,92,231,0.3);
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.proj-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.proj-name {
  font-weight: 600;
  font-size: 15px;
  margin-right: 8px;
}
.proj-slug {
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
  margin-right: 8px;
}
.proj-count {
  font-size: 11px;
  color: var(--accent-light);
  background: rgba(108,92,231,0.12);
  padding: 1px 6px;
  border-radius: 8px;
}
.proj-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.proj-ruleset-preview {
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  max-height: 100px;
  overflow: hidden;
}
.proj-no-ruleset {
  color: #e65100;
  font-family: inherit;
  font-style: italic;
}

@media (max-width: 768px) {
  .queue-card-body { grid-template-columns: 1fr; }
  .queue-left { border-right: none; border-bottom: 1px solid var(--border); max-height: none; }
  .queue-render { min-height: 260px; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .stat-card { padding: 12px; }
  .stat-val { font-size: 22px; }
  .claude-queue-header { flex-direction: column; }
  .claude-queue-item { grid-template-columns: 28px 1fr; }
  .cqi-actions { grid-column: 2; }
}
