:root {
  --bg: #000000;
  --bg-1: #0a0a0a;
  --bg-2: #111111;
  --bg-elevated: #1a1a1a;
  --bg-hover: #1f1f1f;

  --border: rgba(255,255,255,0.06);
  --border-h: rgba(255,255,255,0.12);
  --border-active: rgba(255,255,255,0.25);

  --t1: #f5f5f7;
  --t2: #86868b;
  --t3: #48484a;

  --accent: #ffffff;
  --accent-dim: rgba(255,255,255,0.10);
  --ok: #30d158;
  --ok-dim: rgba(48,209,88,0.12);
  --err: #ff453a;
  --err-dim: rgba(255,69,58,0.12);

  --r: 10px;
  --r-sm: 8px;
  --r-lg: 14px;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --ease: .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font); background: var(--bg); color: var(--t1); min-height: 100vh; line-height: 1.5; }

.hidden { display: none !important; }

/* ── App Shell ─────────────────────────────────────────── */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── Header ────────────────────────────────────────────── */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
  flex-shrink: 0;
}
.header__brand { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.header__logo { height: 24px; width: auto; }
.header__right { display: flex; align-items: center; gap: 12px; }
.balance-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 100px; font-size: .8rem; font-weight: 500; color: var(--t2);
  font-family: var(--mono);
}

/* Clock In / Clock Out chip */
.clock-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 100px; font-size: .78rem; font-weight: 600; color: var(--t2);
  font-family: var(--mono); cursor: pointer; transition: all .2s ease;
}
.clock-chip:hover { border-color: var(--border-h); background: var(--bg-hover); }
.clock-chip--active {
  background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3);
  color: #22c55e;
}
.clock-chip--active:hover { background: rgba(34,197,94,0.18); }
.clock-chip__dot {
  width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
  animation: clockPulse 1.5s ease-in-out infinite;
}
@keyframes clockPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ── Tab Bar ───────────────────────────────────────────── */
.tab-bar {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 24px;
  background: rgba(0,0,0,0.6);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tab {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 8px;
  font-size: .75rem; font-weight: 500; font-family: var(--font);
  color: var(--t3); background: transparent;
  border: none; cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.tab:hover { color: var(--t2); background: rgba(255,255,255,0.04); }
.tab--active {
  color: var(--t1); background: rgba(255,255,255,0.08);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.tab--active:hover { color: var(--t1); }

/* ── Tab Content ───────────────────────────────────────── */
.tab-content {
  flex: 1; overflow-y: auto;
  animation: tabFadeIn .2s ease;
}
.tab-content::-webkit-scrollbar { width: 6px; }
.tab-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
.tab-content--hidden { display: none !important; }
#tab-studio { overflow: hidden; display: flex; flex-direction: column; }
@keyframes tabFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Tab Placeholder (for upcoming phases) */
.tab-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 16px; color: var(--t3); padding: 40px;
}
.tab-placeholder__icon { width: 48px; height: 48px; opacity: .3; }
.tab-placeholder__title { font-size: 1.2rem; font-weight: 700; color: var(--t2); }
.tab-placeholder__text { font-size: .85rem; text-align: center; max-width: 400px; line-height: 1.6; }

/* ── Global Drop Overlay ───────────────────────────────── */
.drop-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center;
  pointer-events: none;
}
.drop-overlay--visible { display: flex; pointer-events: auto; }
.drop-overlay__content {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 60px 80px;
  border: 2px dashed var(--accent);
  border-radius: 24px;
  animation: dropPulse 2s ease infinite;
}
.drop-overlay__icon { width: 56px; height: 56px; color: var(--accent); }
.drop-overlay__text { font-size: 1.3rem; font-weight: 700; color: var(--t1); }
.drop-overlay__hint { font-size: .85rem; color: var(--t2); }
@keyframes dropPulse {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: rgba(255,255,255,0.3); }
}

/* ── Draggable Items ───────────────────────────────────── */
.history-item[draggable="true"] { cursor: grab; }
.history-item[draggable="true"]:active { cursor: grabbing; }
.history-item--dragging { opacity: .4; }
.player-card[draggable="true"] { cursor: grab; }
.dropzone--drag-over {
  border-color: var(--accent) !important;
  background: var(--accent-dim) !important;
  box-shadow: 0 0 20px rgba(255,255,255,0.12);
}
.upload-card--pulse { animation: uploadPulse .6s ease; }
@keyframes uploadPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.25); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ── Layout ────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebar (Left) ────────────────────────────────────── */
.sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  overflow: hidden;
}
.sidebar__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar__scroll::-webkit-scrollbar { width: 0; }

/* Sidebar Mode Switcher (Generate / Upload) */
.sidebar-mode-switcher {
  display: flex; gap: 2px;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-mode-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 12px; border-radius: 8px;
  font-size: .72rem; font-weight: 600; font-family: var(--font);
  color: var(--t3); background: transparent;
  border: none; cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.sidebar-mode-tab:hover { color: var(--t2); background: rgba(255,255,255,0.04); }
.sidebar-mode-tab--active {
  color: var(--t1); background: rgba(255,255,255,0.08);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Sidebar mode panels */
.sidebar-mode {
  display: flex; flex-direction: column; flex: 1; overflow: hidden;
}

/* Upload Final Dropzone */
.upload-final-dropzone {
  position: relative; border: 1.5px dashed var(--border);
  border-radius: var(--r); padding: 32px 16px; text-align: center;
  cursor: pointer; transition: all var(--ease);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.upload-final-dropzone:hover,
.upload-final-dropzone--active {
  border-color: var(--accent); background: var(--accent-dim);
}
.upload-final-dropzone--has-files {
  border-color: var(--ok); border-style: solid; background: var(--ok-dim);
}
.upload-final-dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

/* Upload Preview List */
.upload-final-previews {
  display: flex; flex-direction: column; gap: 6px; margin-top: 8px;
}
.upload-final-preview {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--border);
}
.upload-final-preview__thumb {
  width: 40px; height: 40px; border-radius: 6px; overflow: hidden;
  background: #000; flex-shrink: 0;
}
.upload-final-preview__thumb img,
.upload-final-preview__thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.upload-final-preview__info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px;
}
.upload-final-preview__name {
  font-size: .72rem; font-weight: 500; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-final-preview__meta {
  font-size: .62rem; color: var(--t3); font-family: var(--mono);
}
.upload-final-preview__type {
  font-size: .6rem; font-weight: 600; text-transform: uppercase;
  padding: 1px 6px; border-radius: 4px; letter-spacing: .04em;
}
.upload-final-preview__type--image {
  color: #30d158; background: rgba(48,209,88,0.12);
}
.upload-final-preview__type--video {
  color: #5e5ce6; background: rgba(94,92,230,0.12);
}
.upload-final-preview__remove {
  background: none; border: none; color: var(--t3); cursor: pointer;
  padding: 4px; border-radius: 4px; transition: color var(--ease);
}
.upload-final-preview__remove:hover { color: var(--err); }

/* Upload Status */
.upload-final-status {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--accent); padding: 4px 0;
}

/* Section headers */
.section-label {
  font-size: .65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--t3); margin-bottom: 6px;
}

/* Model dropdown */
.model-select {
  width: 100%; padding: 10px 12px; font-size: .82rem; font-weight: 500;
  appearance: none; -webkit-appearance: none;
  background: var(--bg-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.4)' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border); border-radius: var(--r);
  color: var(--t1); cursor: pointer; transition: border-color var(--ease);
}
.model-select:hover { border-color: var(--border-h); }
.model-select:focus { outline: none; border-color: var(--accent); }

/* Model cost chip */
.model-cost-chip {
  display: flex; align-items: center; gap: 5px;
  margin-top: 6px; font-size: .7rem; color: var(--t3); font-weight: 500;
}
.model-cost-chip span { color: var(--accent); font-weight: 700; }

/* Generation count + total cost */
.gen-settings { margin-top: -4px; }
.gen-count-row { display: flex; align-items: flex-end; gap: 12px; }
.gen-total {
  display: flex; flex-direction: column; align-items: flex-end;
  padding-bottom: 4px; min-width: 70px;
}
.gen-total__label { font-size: .6rem; color: var(--t3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.gen-total__value { font-size: 1rem; font-weight: 800; color: var(--accent); }
/* Upload cards in sidebar */
.upload-section { display: flex; flex-direction: column; gap: 8px; }
.upload-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px; transition: border-color var(--ease);
}
.upload-card:hover { border-color: var(--border-h); }
.upload-card__header {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; color: var(--t2);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em;
}
.upload-card__header span { flex: 1; }
.card__clear {
  background: none; border: none; color: var(--t3);
  cursor: pointer; padding: 2px; border-radius: 4px;
}
.card__clear:hover { color: var(--err); }

/* Extract first frame from video */
.extract-frame-btn {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 1px solid var(--border); color: var(--t2);
  cursor: pointer; padding: 2px 8px; border-radius: 4px;
  font-size: .65rem; font-weight: 600; letter-spacing: .02em;
  transition: all var(--ease); white-space: nowrap;
}
.extract-frame-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.extract-frame-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

.dropzone {
  position: relative; border: 1.5px dashed var(--border);
  border-radius: var(--r-sm); padding: 16px 8px; text-align: center;
  cursor: pointer; transition: all var(--ease);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.dropzone:hover, .dropzone--active { border-color: var(--accent); background: var(--accent-dim); }
.dropzone--has-file { border-color: var(--ok); border-style: solid; background: var(--ok-dim); }
.dropzone__icon { color: var(--t3); }
.dropzone__text { font-size: .75rem; color: var(--t2); }
.dropzone__hint { font-size: .6rem; color: var(--t3); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.media-preview { border-radius: var(--r-sm); overflow: hidden; position: relative; background: #000; margin-bottom: 6px; }
.media-preview img, .media-preview video { width: 100%; display: block; max-height: 140px; object-fit: contain; }
.preview-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.4); border: none; color: #fff; cursor: pointer;
}
.preview-play:hover { background: rgba(0,0,0,.2); }

.url-row { margin-top: 6px; }
.upload-status { display: flex; align-items: center; gap: 5px; font-size: .7rem; color: var(--accent); margin-top: 4px; }

/* Options */
.options-section { display: flex; flex-direction: column; gap: 8px; }
.options-grid { display: flex; flex-direction: column; gap: 10px; }
.options-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.field { display: flex; flex-direction: column; gap: 3px; }
.field__label { font-size: .65rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--t3); }

/* Model Info Panel */
.model-info { margin-bottom: 8px; }
.model-info__toggle {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 6px 0; font-size: .72rem; color: var(--t3);
  user-select: none; transition: color .15s;
}
.model-info__toggle:hover { color: var(--accent); }
.model-info__chevron { transition: transform .2s ease; }
.model-info__body {
  padding: 8px 12px; margin-top: 4px; border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--border);
}
.model-info__row {
  display: flex; justify-content: space-between; padding: 4px 0;
  font-size: .72rem; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.model-info__row:last-child { border-bottom: none; }
.model-info__row span:first-child { color: var(--t3); }
.model-info__row span:last-child { color: var(--t1); font-weight: 500; }

.input {
  width: 100%; padding: 7px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--t1); font-size: .8rem; font-family: var(--font);
  outline: none; transition: border-color var(--ease);
}
.input:focus { border-color: var(--border-active); }
.input::placeholder { color: var(--t3); }
.input--mono { font-family: var(--mono); font-size: .75rem; }
.input--sm { padding: 4px 8px; font-size: .72rem; }
select.input {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2348484a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; padding-right: 24px;
}
select.input option { background: var(--bg-2); color: var(--t1); }
textarea.input { resize: vertical; min-height: 44px; font-family: var(--font); }

.toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .75rem; color: var(--t2); }
.toggle input { display: none; }
.toggle__slider {
  width: 34px; height: 20px; background: var(--bg-elevated); border-radius: 100px;
  position: relative; transition: background var(--ease); flex-shrink: 0;
}
.toggle__slider::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; background: var(--t3); border-radius: 50%;
  transition: all var(--ease);
}
.toggle input:checked + .toggle__slider { background: var(--ok); }
.toggle input:checked + .toggle__slider::after { left: 16px; background: #fff; }

.preset-row { display: flex; gap: 4px; }
.preset-row .input--sm { flex: 1; }

/* ── Realism Effects ──────────────────────────────────── */
.realism-effects {
  margin-top: 4px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.realism-effects__toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; cursor: pointer; user-select: none;
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--t3);
  transition: color .15s, background .15s;
}
.realism-effects__toggle:hover { color: var(--accent); background: rgba(255,255,255,0.02); }
.realism-effects__toggle span { flex: 1; }
.realism-effects__chevron { transition: transform .2s ease; }
.realism-effects__body {
  padding: 0 10px 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.realism-effects__item {
  padding: 6px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.02);
}
.realism-effects__row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.realism-effects__label {
  font-size: .7rem; font-weight: 500; color: var(--t2);
}
.realism-effects__slider-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px; transition: opacity .2s;
}
.realism-effects__slider-row--disabled { opacity: .3; pointer-events: none; }
.realism-effects__slider {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 3px; border-radius: 2px;
  background: var(--border); outline: none; cursor: pointer;
}
.realism-effects__slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent);
  cursor: pointer; transition: transform .15s;
}
.realism-effects__slider::-webkit-slider-thumb:hover { transform: scale(1.3); }
.realism-effects__slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: none; cursor: pointer;
}
.realism-effects__value {
  font-size: .65rem; font-family: var(--mono);
  color: var(--t3); min-width: 32px; text-align: right;
}


/* Action buttons */
.action-group {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 20px 16px;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r-sm); font-size: .8rem; font-weight: 600;
  font-family: var(--font); cursor: pointer; transition: all var(--ease); border: none;
  text-decoration: none;
}
.btn--primary { background: var(--t1); color: #000; }
.btn--primary:hover:not(:disabled) { opacity: .88; }
.btn--primary:disabled { opacity: .3; cursor: not-allowed; }
.btn--secondary { background: var(--bg-elevated); color: var(--t2); }
.btn--secondary:hover { background: var(--bg-hover); color: var(--t1); }
.btn--ghost { background: transparent; color: var(--t2); border: 1px solid var(--border); }
.btn--ghost:hover { border-color: var(--border-h); color: var(--t1); }
.btn--sm { padding: 5px 10px; font-size: .72rem; }
.btn--danger { background: transparent; color: var(--err); border: 1px solid rgba(255,69,58,.2); }
.btn--danger:hover { background: var(--err-dim); }
.btn--loading { pointer-events: none; opacity: .5; position: relative; }
.btn--loading::after {
  content: ''; position: absolute; width: 12px; height: 12px;
  border: 2px solid transparent; border-top-color: currentColor;
  border-radius: 50%; animation: spin .6s linear infinite;
}

/* ── Output Area (Right) ───────────────────────────────── */
.output {
  overflow-y: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 20px;
}
.output::-webkit-scrollbar { width: 6px; }
.output::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }

/* Active result / player */
.player-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.player-video { width: 100%; display: block; max-height: 60vh; background: #000; object-fit: contain; }
.player-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; gap: 8px;
}
.player-bar__info { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--t2); }
.player-bar__actions { display: flex; gap: 6px; }

/* Status card inside output */
.status-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; text-align: center;
}
.status-card__header { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 16px; }
.status-card__title { font-size: 1rem; font-weight: 600; }
.status-card__subtitle { font-size: .8rem; color: var(--t2); margin-bottom: 12px; }
.status-card__timer { font-family: var(--mono); font-size: .85rem; color: var(--t3); }
.progress-bar { width: 100%; height: 3px; background: var(--bg-elevated); border-radius: 100px; overflow: hidden; margin: 12px 0; }
.progress-bar__fill { height: 100%; background: var(--t1); border-radius: 100px; transition: width .5s ease; }

/* Error */
.error-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-1); border: 1px solid rgba(255,69,58,.2);
  border-radius: var(--r-lg); padding: 16px;
}
.error-card__title { font-size: .85rem; font-weight: 600; color: var(--err); }
.error-card__message { font-size: .78rem; color: var(--t2); font-family: var(--mono); word-break: break-word; margin-top: 2px; }

/* Compare */
.compare-card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
}
.compare-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; font-size: .8rem; font-weight: 600; color: var(--t2);
}
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.compare-side { position: relative; }
.compare-label {
  position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.75);
  padding: 2px 8px; border-radius: 4px; font-size: .6rem; font-weight: 600;
  text-transform: uppercase; z-index: 1;
}
.compare-video { width: 100%; border-radius: var(--r-sm); background: #000; display: block; }

/* ── History Grid ──────────────────────────────────────── */
.history-header {
  display: flex; align-items: center; justify-content: space-between;
}
.history-header__title { font-size: .85rem; font-weight: 600; color: var(--t2); }

.history-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 60px 0; color: var(--t3); font-size: .85rem;
}

.history-grid {
  --history-col-width: 200px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--history-col-width), 1fr));
  gap: 12px;
}

.history-item {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: var(--bg-1); border: 1px solid var(--border);
  cursor: pointer; transition: all var(--ease);
}
.history-item:hover { border-color: var(--border-h); transform: translateY(-1px); }

.history-item__thumb-wrap { position: relative; aspect-ratio: 9/16; background: #000; overflow: hidden; }
.history-item__thumb { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.history-item__overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); opacity: 0; transition: opacity var(--ease);
}
.history-item:hover .history-item__overlay { opacity: 1; }

.history-item__info { padding: 10px 12px; }
.history-item__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.history-item__model { font-size: .7rem; font-weight: 600; color: var(--accent); }
.history-item__time { font-size: .65rem; color: var(--t3); font-family: var(--mono); }
.history-item__actions { display: flex; gap: 3px; margin-top: 6px; }
.history-item__actions .btn { flex: 1; padding: 4px; font-size: .65rem; }

/* Loading skeleton card */
.history-item--loading { pointer-events: none; }
.history-item__skeleton {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; gap: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  animation: skeletonPulse 1.5s ease-in-out infinite;
}
.history-item__skeleton .icon-md { color: var(--accent); opacity: .6; }
.history-item__skeleton-text { font-size: .72rem; color: var(--text-dim); font-weight: 500; }
@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* Loading card ETA progress */
.loading-eta {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.loading-eta__label {
  font-size: .72rem; color: var(--accent); font-weight: 600;
  font-family: var(--mono);
}
.loading-eta__countdown {
  font-size: .65rem; color: var(--t3); font-family: var(--mono);
}
.loading-motivation {
  font-size: .7rem; color: var(--t2); text-align: center;
  padding: 6px 10px; font-style: italic; letter-spacing: .2px;
  transition: opacity .3s ease; line-height: 1.4;
}
.loading-progress-wrap {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,0.06);
}
.loading-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #ffffff, #a0a0a0);
  border-radius: 0 2px 2px 0;
  transition: width .5s ease;
}
.loading-elapsed {
  font-family: var(--mono);
  color: var(--accent) !important;
  font-weight: 600 !important;
}

/* ── Fullscreen ────────────────────────────────────────── */
.fullscreen-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.95); z-index: 1000;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  backdrop-filter: blur(20px);
}
.fullscreen-overlay--visible { display: flex; }
.fullscreen-close {
  position: absolute; top: 16px; right: 16px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--t1); cursor: pointer;
}
.fullscreen-close:hover { background: var(--bg-hover); }
.fullscreen-video { max-width: 88vw; max-height: 72vh; border-radius: var(--r-lg); }
.fullscreen-actions { display: flex; gap: 8px; }

/* ── Icons ─────────────────────────────────────────────── */
.icon-xs { width: 13px; height: 13px; }
.icon-sm { width: 15px; height: 15px; }
.icon-md { width: 22px; height: 22px; }
.icon-lg { width: 28px; height: 28px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Multi-File Upload ─────────────────────────────────── */
.multi-files { display: flex; flex-direction: column; gap: 6px; }
.multi-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.multi-thumb {
  position: relative; width: 56px; height: 56px; border-radius: 6px;
  overflow: hidden; border: 1px solid var(--border);
}
.multi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.multi-thumb__remove {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  background: rgba(0,0,0,.7); border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer; opacity: 0; transition: opacity var(--ease);
}
.multi-thumb:hover .multi-thumb__remove { opacity: 1; }

/* ── Header: Left section ─────────────────────────────── */
.header__left { display: flex; align-items: center; gap: 8px; }

/* Hamburger (hidden on desktop) */
.header__hamburger {
  display: none;
  background: none; border: none; color: var(--t2);
  cursor: pointer; padding: 4px; border-radius: var(--r-sm);
  transition: color var(--ease), background var(--ease);
}
.header__hamburger:hover { color: var(--t1); background: var(--bg-hover); }

/* Session cost chip */
.cost-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px; background: var(--accent-dim); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px; font-size: .8rem; font-weight: 500; color: var(--accent);
  font-family: var(--mono); cursor: default; transition: background var(--ease);
}
.cost-chip:hover { background: rgba(255,255,255,0.15); }

/* Accent button */
.btn--accent {
  background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(255,255,255,0.15);
  transition: background var(--ease), border-color var(--ease);
}
.btn--accent:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.25); }

/* Shortcut hints */
.shortcut-hint {
  font-family: var(--mono); font-size: .65rem; font-weight: 500;
  color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.06);
  padding: 1px 5px; border-radius: 4px; margin-left: 6px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Sidebar backdrop (hidden on desktop, shown by JS on mobile) */
.sidebar__backdrop {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.sidebar__backdrop--visible { opacity: 1; pointer-events: auto; }

/* ── Gallery ──────────────────────────────────────────── */
.gallery {
  display: flex; flex-direction: column; height: 100%;
  overflow-y: auto; padding: 20px 24px;
}
.gallery::-webkit-scrollbar { width: 6px; }
.gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }

.gallery__toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.gallery__toolbar-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; }
.gallery__toolbar-right { display: flex; align-items: center; gap: 6px; }

.gallery__zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--t3);
  margin-left: 4px;
}
.gallery__zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
.gallery__zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: transform .15s ease;
}
.gallery__zoom-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }
.gallery__zoom-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
.gallery__search-wrap { position: relative; flex: 1; min-width: 140px; max-width: 240px; }
.gallery__search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--t3); pointer-events: none; }
.gallery__search { padding-left: 30px !important; font-size: .72rem !important; padding: 5px 10px 5px 30px !important; }
.gallery__filter { min-width: 90px; max-width: 140px; font-size: .72rem; padding: 5px 22px 5px 8px !important; }
.gallery__sort { min-width: 90px; font-size: .72rem; padding: 5px 22px 5px 8px !important; }

.gallery__fav-btn--active {
  background: rgba(255,69,58,0.12) !important;
  color: var(--err) !important;
  border-color: rgba(255,69,58,0.25) !important;
}

.gallery__hide-failed-btn--active {
  background: rgba(255,159,10,0.12) !important;
  color: #ff9f0a !important;
  border-color: rgba(255,159,10,0.25) !important;
}

.sub-needs-attention-btn--active {
  background: rgba(255,69,58,0.12) !important;
  color: var(--error) !important;
  border-color: rgba(255,69,58,0.3) !important;
}

.gallery__stats {
  font-size: .75rem; color: var(--t3); font-weight: 500;
  margin-bottom: 16px; font-family: var(--mono);
}

.gallery__grid {
  --gallery-col-width: 200px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--gallery-col-width), 1fr));
  gap: 14px;
}

.gallery__card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: all var(--ease);
}
.gallery__card:hover { border-color: var(--border-h); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,.3); }

.gallery__card-thumb {
  position: relative; aspect-ratio: 9/16; background: #000; overflow: hidden;
}
.gallery__card-thumb img, .gallery__card-thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease;
}
.gallery__card:hover .gallery__card-thumb img,
.gallery__card:hover .gallery__card-thumb video { transform: scale(1.03); }

.gallery__card-fav {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,.6); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--t2); transition: all .2s ease;
  opacity: 0;
}
.gallery__card:hover .gallery__card-fav { opacity: 1; }
.gallery__card-fav--active {
  opacity: 1 !important;
  color: var(--err) !important;
  background: rgba(255,69,58,0.3) !important;
}
.gallery__card-fav--active svg { fill: var(--err); }

.gallery__card-status {
  position: absolute;
  bottom: .4rem;
  left: .4rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .65rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
  z-index: 2;
  text-transform: uppercase;
}

.gallery__card-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); opacity: 0; transition: opacity var(--ease);
}
.gallery__card:hover .gallery__card-overlay { opacity: 1; }

.gallery__card-info { padding: 12px 14px; }
.gallery__card-top {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px;
}
.gallery__card-model { font-size: .7rem; font-weight: 600; color: var(--accent); }
.gallery__card-cost { font-size: .65rem; font-family: var(--mono); color: var(--t3); }
.gallery__card-prompt {
  font-size: .72rem; color: var(--t2); line-height: 1.4;
  margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gallery__card-bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.gallery__card-date { font-size: .6rem; color: var(--t3); font-family: var(--mono); }
.gallery__card-actions { display: flex; gap: 3px; }
.gallery__card-actions .btn { padding: 3px 6px; }

/* Gallery loading/empty */
.gallery__loading, .gallery__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 40px 0; color: var(--t3); font-size: .85rem;
}

/* Lightbox */
.gallery__lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.92); backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.gallery__lightbox-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--t1); cursor: pointer; z-index: 1;
}
.gallery__lightbox-close:hover { background: var(--bg-hover); }
.gallery__lightbox-body {
  display: flex; gap: 20px; max-width: 90vw; max-height: 85vh; align-items: flex-start;
}
.gallery__lightbox-content {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
}
.gallery__lightbox-img { max-width: 100%; max-height: 80vh; border-radius: var(--r-lg); object-fit: contain; }
.gallery__lightbox-video { max-width: 100%; max-height: 80vh; border-radius: var(--r-lg); }
.gallery__lightbox-sidebar {
  width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px;
  max-height: 80vh; overflow-y: auto;
}
.gallery__lightbox-meta {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 16px; width: 100%;
}
.lightbox-meta__row {
  display: flex; gap: 12px; padding: 4px 0; font-size: .78rem;
  border-bottom: 1px solid var(--border);
}
.lightbox-meta__row:last-child { border-bottom: none; }
.lightbox-meta__label { color: var(--t3); font-weight: 600; min-width: 60px; text-transform: uppercase; font-size: .65rem; letter-spacing: .04em; }
.lightbox-meta__value { color: var(--t1); flex: 1; }
.lightbox-meta__prompt { font-family: var(--font); line-height: 1.5; max-height: 120px; overflow-y: auto; }
.gallery__lightbox-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Shared Media Modal (submissions + approval) ──────── */
.media-modal {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.92); backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; cursor: pointer;
}
.media-modal__close {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--t1); cursor: pointer; z-index: 1;
}
.media-modal__close:hover { background: var(--bg-hover); }
.media-modal video,
.media-modal img {
  max-width: 90vw; max-height: 85vh; border-radius: var(--r-lg);
  object-fit: contain; cursor: default;
}
.media-modal video { background: #000; }

/* ── Cost Dashboard ───────────────────────────────────── */
.costs {
  display: flex; flex-direction: column; gap: 20px;
  padding: 20px 24px;
}

.costs__kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.costs__kpi {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; border-radius: var(--r-lg);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  transition: all var(--ease);
}
.costs__kpi:hover { border-color: var(--border-h); background: rgba(255,255,255,0.05); }
.costs__kpi-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.08); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.costs__kpi-body { display: flex; flex-direction: column; gap: 2px; }
.costs__kpi-label { font-size: .65rem; color: var(--t3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.costs__kpi-value { font-size: 1.3rem; font-weight: 700; color: var(--t1); font-family: var(--mono); }
.costs__kpi-sub { font-size: .68rem; color: var(--t3); }

.costs__section-title {
  font-size: .78rem; color: var(--t2); font-weight: 600;
  display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .03em;
}

.costs__chart-wrap {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 20px;
}
.costs__chart-container { height: 240px; position: relative; }

.costs__kpi-value--green { color: var(--ok) !important; }

.costs__combined-section {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 20px;
}
.costs__combined-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.costs__combined-filter { display: flex; align-items: center; gap: 8px; }
/* Global filter bar */
.costs__global-filter {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; padding: 12px 16px;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); margin-bottom: 16px;
}
.costs__global-filter-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.costs__global-filter-dates { display: flex; align-items: center; gap: 8px; }
.costs__filter-btn--active {
  background: rgba(255,255,255,0.15) !important;
  color: var(--t1) !important;
  border-color: rgba(255,255,255,0.30) !important;
  font-weight: 600;
}
.costs__filter-label { font-size: .78rem; color: var(--text-dim); }
.costs__filter-date {
  font-size: .78rem; padding: 4px 8px; border-radius: 6px;
  background: var(--bg-1); border: 1px solid var(--border); color: var(--text);
}
.costs__combined-summary {
  display: flex; gap: 16px; margin-bottom: 12px;
  font-size: .82rem; color: var(--text-dim);
}
.costs__usage-stat strong { color: var(--text); }

.costs__table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.costs__table th {
  text-align: left; padding: 10px 12px; font-weight: 600; color: var(--t3);
  border-bottom: 1px solid var(--border); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
}
.costs__th--sortable { cursor: pointer; user-select: none; }
.costs__th--sortable:hover { color: var(--accent); }
.costs__table td { padding: 10px 12px; color: var(--t1); border-bottom: 1px solid rgba(255,255,255,0.03); }
.costs__td-model { font-weight: 600; color: var(--accent); }
.costs__td-date { color: var(--t3); font-family: var(--mono); font-size: .65rem; }
.costs__table-empty { text-align: center; padding: 30px; color: var(--t3); font-size: .8rem; }

/* ── Per Creator Section ──────────────────────────────── */
.costs__creator-filter {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
}
.costs__creator-filter .costs__filter-date {
  width: 130px; flex-shrink: 0;
}
.costs__pct-cell {
  position: relative; min-width: 80px;
}
.costs__pct-cell span {
  position: relative; z-index: 1;
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
}
.costs__pct-bar {
  position: absolute; left: 0; bottom: 2px;
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.35), rgba(255,255,255,0.12));
  transition: width .4s ease;
  min-width: 2px;
}
.costs__pct-bar--accent {
  background: linear-gradient(90deg, rgba(10,132,255,0.6), rgba(10,132,255,0.2));
}
.costs__pct-bar--ok {
  background: linear-gradient(90deg, rgba(48,209,88,0.6), rgba(48,209,88,0.2));
}
.costs__pct-bar--err {
  background: linear-gradient(90deg, rgba(255,69,58,0.5), rgba(255,69,58,0.15));
}

/* ── Settings ─────────────────────────────────────────── */
.settings {
  display: flex; flex-direction: column; gap: 24px;
  overflow-y: auto; padding: 20px 24px; height: 100%;
}
.settings::-webkit-scrollbar { width: 6px; }
.settings::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
.settings__section { margin: 0; }
.settings__title {
  font-size: .78rem; color: var(--t2); font-weight: 600;
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .03em;
}
.settings__card {
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 4px 0; overflow: hidden;
}

/* Key rows */
.settings__key-row {
  padding: 12px 16px; display: flex; flex-direction: column; gap: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.settings__key-row:last-child { border-bottom: none; }
.settings__key-row--disabled { opacity: 0.5; }
.settings__key-info { display: flex; align-items: center; gap: 8px; }
.settings__key-name { font-size: .78rem; font-weight: 600; color: var(--t1); }
.settings__key-badge {
  font-size: .6rem; padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.06); color: var(--t3);
}
.settings__key-field { display: flex; gap: 6px; }
.settings__key-input { flex: 1; font-family: var(--mono); font-size: .72rem; }
.settings__key-status { font-size: .72rem; }
.settings__status--ok { color: var(--ok); }
.settings__status--err { color: var(--err); }

/* Preference rows */
.settings__pref-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.settings__pref-row:last-child { border-bottom: none; }
.settings__pref-label { font-size: .78rem; color: var(--t1); }
.settings__pref-select { max-width: 200px; }
.settings__pref-input { max-width: 160px; font-family: var(--mono); font-size: .75rem; }

/* Toggle switch */
.settings__toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.settings__toggle input { opacity: 0; width: 0; height: 0; }
.settings__toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 22px; transition: all .3s ease;
}
.settings__toggle-slider::before {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--t3); transition: all .3s ease;
}
.settings__toggle input:checked + .settings__toggle-slider {
  background: var(--accent); border-color: var(--accent);
}
.settings__toggle input:checked + .settings__toggle-slider::before {
  transform: translateX(18px); background: #fff;
}

/* Data management */
.settings__data-card { padding: 4px 0; }
.settings__data-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.settings__data-row:last-child { border-bottom: none; }
.settings__data-info { display: flex; flex-direction: column; gap: 1px; }
.settings__data-name { font-size: .78rem; color: var(--t1); font-weight: 500; }
.settings__data-desc { font-size: .65rem; color: var(--t3); }
.settings__divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.settings__btn--warn { color: var(--warn) !important; }
.settings__btn--danger { color: var(--err) !important; }

/* Shortcuts table */
.settings__shortcuts-table { width: 100%; font-size: .78rem; }
.settings__shortcuts-table td { padding: 6px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.settings__shortcuts-table tr:last-child td { border-bottom: none; }
.settings__shortcut-key {
  font-family: var(--mono); font-weight: 600; color: var(--accent);
  min-width: 100px; font-size: .72rem;
}

/* ── Mobile Sidebar Trigger (hidden on desktop) ───────── */
.mobile-sidebar-trigger {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  margin-bottom: 12px;
  transition: background .15s;
}
.mobile-sidebar-trigger:hover { background: rgba(10,132,255,0.15); }

/* ── Debug ID (barely visible, for troubleshooting) ───── */
.debug-id {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.12);
  font-family: monospace;
  padding: 1px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
  line-height: 1.2;
}

/* ── Responsive: Mobile ───────────────────────────────── */
@media (max-width: 768px) {
  /* Header compact */
  .header__hamburger { display: none !important; }
  .shortcut-hint { display: none; }
  .header { padding: 8px 12px; }
  .header__brand { font-size: .8rem; }

  /* Show sidebar trigger on mobile */
  .mobile-sidebar-trigger { display: flex; }

  /* ── Tab bar: fixed at bottom ── */
  .tab-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 200;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 4px 0 env(safe-area-inset-bottom, 4px);
    gap: 0;
    justify-content: space-around;
    align-items: stretch;
  }

  /* Tab buttons: vertical icon + label */
  .tab-bar .tab {
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px 4px;
    border-radius: 0 !important;
    font-size: .58rem;
    min-width: 0;
  }
  .tab-bar .tab span { display: block !important; }
  .tab-bar .tab .icon-xs { width: 18px; height: 18px; }

  .tab-bar .tab--active {
    background: transparent !important;
    color: var(--accent);
  }
  .tab-bar .tab--active::after { display: none; }

  /* Main content area: leave room for bottom bar */
  .layout { grid-template-columns: 1fr; padding-bottom: 60px; }
  .output { padding: 12px; padding-bottom: 72px; }
  .tab-content { padding-bottom: 60px; }

  /* ── Sidebar: slide overlay (opened by hamburger JS or swipe) ── */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 60px; width: 320px; max-width: 85vw;
    z-index: 150; transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    border-right: 1px solid var(--border);
    padding-top: 50px;
  }
  .sidebar--open { transform: translateX(0); }
  .sidebar__backdrop { display: block; }
  .sidebar__backdrop--visible { opacity: 1; pointer-events: auto; }

  /* History */
  .history-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }

  /* Player */
  .player-bar { flex-direction: column; gap: 8px; }

  /* Costs mobile */
  .costs { padding: 12px; }
  .costs__kpi-row { grid-template-columns: 1fr 1fr; }
  .costs__chart-row { grid-template-columns: 1fr; }
  .costs__kpi-value { font-size: 1rem; }

  /* Settings mobile */
  .settings { padding: 12px; }
  .player-bar__actions { flex-wrap: wrap; gap: 4px; }

  /* Fullscreen */
  .fullscreen-actions { flex-direction: column; gap: 8px; padding: 16px; }

  /* Compare */
  .compare-grid { grid-template-columns: 1fr; }

  /* Buttons */
  .action-group .btn { font-size: .85rem; }

  /* Cost chip compact */
  .cost-chip span, .balance-chip span { font-size: .72rem; }

  /* Gallery mobile */
  .gallery { padding: 12px; }
  .gallery__toolbar { flex-direction: column; }
  .gallery__toolbar-left, .gallery__toolbar-right { width: 100%; }
  .gallery__search-wrap { max-width: 100%; }
  .gallery__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .gallery__lightbox-body { flex-direction: column; align-items: center; max-height: 90vh; overflow-y: auto; }
  .gallery__lightbox-content { max-width: 95vw; }
  .gallery__lightbox-sidebar { width: 100%; max-width: 95vw; }
  .gallery__lightbox-meta { max-width: 95vw; }

  /* Profile */
  .profile { padding: 12px; }
}

@media (max-width: 400px) {
  .header { padding: 10px 12px; }
  .header__brand { font-size: .8rem; }
  .history-grid { grid-template-columns: 1fr; }
  .sidebar { width: 100%; max-width: 100vw; }
}

/* ── EXIF Camouflage Settings ─────────────────────────────── */
.settings__exif-config { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.settings__pref-row--top { align-items: flex-start; }
.settings__pref-hint { font-size: .72rem; color: var(--text-dim); margin-top: 2px; }
.settings__checkbox-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.settings__chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  cursor: pointer; font-size: .78rem; color: var(--text-dim);
  transition: all .15s;
}
.settings__chip:hover { background: rgba(255,255,255,0.08); }
.settings__chip:has(input:checked) { background: rgba(255,255,255,0.12); border-color: var(--accent); color: var(--text); }
.settings__chip input { display: none; }
.settings__range-wrap { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.settings__range { flex: 1; accent-color: var(--accent); }
.settings__range-value { font-size: .78rem; color: var(--text-dim); white-space: nowrap; min-width: 100px; }
.settings__exif-preview {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
}
.settings__exif-preview-title {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--text-dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px;
}
.settings__exif-preview-body { display: flex; flex-direction: column; gap: 4px; }
.settings__exif-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; padding: 3px 0;
}
.settings__exif-row span:first-child { color: var(--text-dim); }
.settings__exif-row span:last-child { color: var(--text); font-family: 'SF Mono', monospace; }

/* ── Costs Usage / Daily Summary ───────────────────────────── */
.costs__usage-section { margin-top: 20px; }
.costs__usage-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}
.costs__usage-filter { display: flex; align-items: center; gap: 8px; }
.costs__filter-label { font-size: .78rem; color: var(--text-dim); }
.costs__filter-date {
  font-size: .78rem; padding: 4px 8px; border-radius: 6px;
  background: var(--bg-1); border: 1px solid var(--border); color: var(--text);
}
.costs__usage-summary {
  display: flex; gap: 16px; margin-bottom: 12px;
  font-size: .82rem; color: var(--text-dim);
}
.costs__usage-stat strong { color: var(--text); }
.costs__day-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 4px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  transition: background .15s;
}
.costs__day-card:hover { background: rgba(255,255,255,0.04); }
.costs__day-header {
  font-size: .78rem; font-weight: 600; color: var(--text);
  min-width: 90px;
}
.costs__day-bar {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.5), rgba(255,255,255,0.15));
  min-width: 5%;
}
.costs__day-stats {
  display: flex; gap: 16px; font-size: .75rem; color: var(--text-dim);
  margin-left: auto; white-space: nowrap;
}
.costs__day-stats span:last-child {
  font-family: 'SF Mono', monospace; color: var(--accent);
}
/* Spin animation for loader icon */
.spin { animation: spinAnim 1s linear infinite; }
@keyframes spinAnim { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }


/* ── Toast Notifications ───────────────────────────────── */
.toast-container {
  position: fixed; top: 68px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; max-width: 420px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--r);
  background: rgba(28,28,30,0.95); border: 1px solid var(--border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  color: var(--t1); font-size: .82rem; pointer-events: all;
  transform: translateX(120%); transition: transform .3s ease, opacity .3s ease;
  opacity: 0; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast--visible { transform: translateX(0); opacity: 1; }
.toast--error { border-color: rgba(255,69,58,0.4); }
.toast--error svg { color: var(--err); }
.toast--warning { border-color: rgba(255,159,10,0.4); }
.toast--warning svg { color: #ff9f0a; }
.toast--success { border-color: rgba(48,209,88,0.4); }
.toast--success svg { color: var(--ok); }
.toast--info { border-color: rgba(255,255,255,0.25); }
.toast--info svg { color: var(--accent); }
.toast__message { flex: 1; line-height: 1.4; }
.toast__close {
  background: none; border: none; color: var(--t2); cursor: pointer;
  padding: 2px; border-radius: 4px;
}
.toast__close:hover { color: var(--t1); background: var(--bg-hover); }

/* ── Error History Cards ───────────────────────────────── */
.history-item--error {
  border: 1px solid rgba(255,69,58,0.3) !important;
  background: rgba(255,69,58,0.05);
}
.history-item__error-icon {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 80px;
  color: var(--err); opacity: 0.6;
}
.history-item__error-msg {
  font-size: .7rem; color: var(--err); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  margin-top: 2px;
}

/* ── Delete Button Danger Hover ────────────────────────── */
.h-delete:hover, .h-delete-card:hover {
  color: var(--err) !important;
  background: var(--err-dim) !important;
}

/* ── Model Info Feature Tags ───────────────────────────── */
.model-info__features {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 8px 0 4px;
}
.model-info__tag {
  display: inline-block; font-size: .65rem;
  padding: 2px 8px; border-radius: 100px;
  background: var(--accent-dim); color: var(--accent);
  white-space: nowrap;
}
.model-info__link {
  color: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .75rem;
}
.model-info__link:hover { text-decoration: underline; }

/* ── User Badge ────────────────────────────────────────────── */
.user-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  font-size: .75rem;
}
.user-badge__name {
  color: var(--t2);
  font-weight: 500;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#logout-btn:hover { color: var(--err) !important; }

/* ── Profile Page ──────────────────────────────────────────── */
.profile {
  padding: 32px 20px; display: flex; flex-direction: column; gap: 24px;
}
.profile__header {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.profile__avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #444444, #222222);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile__avatar-text {
  font-size: 1.4rem; font-weight: 700; color: #fff;
}
.profile__header-info { flex: 1; min-width: 0; }
.profile__name { font-size: 1.1rem; font-weight: 600; color: var(--t1); margin: 0; }
.profile__email { font-size: .8rem; color: var(--t3); margin: 4px 0 6px; }
.profile__role-badge {
  display: inline-block; font-size: .65rem;
  padding: 2px 10px; border-radius: 100px;
  background: var(--accent-dim); color: var(--accent);
  text-transform: uppercase; font-weight: 600;
}

.profile__section {
  padding: 20px; border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.profile__section--danger { border-color: rgba(239,68,68,.2); }
.profile__section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 600; color: var(--t1);
  margin: 0 0 16px;
}
.profile__form { display: flex; flex-direction: column; gap: 10px; }
.profile__label { font-size: .7rem; color: var(--t3); text-transform: uppercase; letter-spacing: 0.5px; }
.profile__input { max-width: 100%; }
.profile__input--disabled { opacity: 0.5; cursor: not-allowed; }
.profile__input-row { display: flex; gap: 8px; align-items: center; }
.profile__input-row .profile__input { flex: 1; }
.profile__hint { font-size: .7rem; color: var(--t4); margin: 4px 0 0; }
.profile__pw-btn { align-self: flex-start; margin-top: 4px; }

.profile__stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.profile__stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 8px; border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}
.profile__stat-value { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.profile__stat-label { font-size: .65rem; color: var(--t3); margin-top: 4px; text-transform: uppercase; }

.btn--danger {
  background: rgba(239,68,68,.15); color: #ef4444;
  border: 1px solid rgba(239,68,68,.3);
}
.btn--danger:hover { background: rgba(239,68,68,.25); }

/* ══════════════════════════════════════════════════════════════
   SUBMISSIONS TAB
   ══════════════════════════════════════════════════════════════ */
.submissions-page, .approval-page, .admin-page {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}
.submissions-page__toolbar, .approval-page__toolbar, .admin-page__toolbar {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1rem;
}
.submissions-page__title, .approval-page__title, .admin-page__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.submissions-page__filters, .approval-page__filters, .admin-page__filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.submissions-page__filters .input,
.approval-page__filters .input {
  min-width: 0;
  flex: 1 1 120px;
  max-width: 200px;
  font-size: .75rem;
  padding: .4rem .5rem;
}
.toggle-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--t2);
  cursor: pointer;
  white-space: nowrap;
}
.toggle-label input[type="checkbox"] {
  accent-color: var(--accent);
}

/* Submissions / Approval Grid */
.submissions-grid, .approval-grid {
  --sub-col-width: 200px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--sub-col-width), 1fr));
  gap: 1rem;
}
.sub-card, .approval-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s, transform .15s;
}
.sub-card:hover, .approval-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}
.sub-card__media, .approval-card__media {
  position: relative;
  aspect-ratio: 9/16;
  overflow: hidden;
  background: var(--bg-2);
}
.sub-card__img, .sub-card__video, .approval-card__img, .approval-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sub-card__badge {
  position: absolute;
  top: .5rem;
  left: .5rem;
  padding: .2rem .5rem;
  border-radius: 6px;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.sub-card__enhanced-badge {
  position: absolute;
  top: .5rem;
  right: .5rem;
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .5rem;
  border-radius: 6px;
  font-size: .6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.sub-card__video-icon {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  color: #fff;
  opacity: .8;
}
.sub-card__info, .approval-card__info {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.sub-card__model, .approval-card__model {
  font-size: .75rem;
  font-weight: 600;
  color: var(--t1);
}
.sub-card__creator, .approval-card__creator, .approval-card__dev {
  font-size: .7rem;
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: .25rem;
}
.sub-card__date, .approval-card__date {
  font-size: .65rem;
  color: var(--t3);
}
.approval-card__reviewer {
  font-size: .65rem;
  color: var(--accent);
}
.sub-card__actions, .approval-card__actions {
  padding: .5rem .75rem .75rem;
  display: flex;
  gap: .4rem;
}
.sub-card--downloaded {
  opacity: 0.55;
  position: relative;
}
.sub-card--downloaded:hover { opacity: 0.8; }
.sub-card__check {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #22c55e;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sub-card__check .icon-xs { width: 1.5rem; height: 1.5rem; }

/* ══════════════════════════════════════════════════════════════
   APPROVAL STATS BAR
   ══════════════════════════════════════════════════════════════ */
.approval-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.approval-stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}
.approval-stat-card__value {
  font-size: 1.5rem;
  font-weight: 800;
}
.approval-stat-card__label {
  font-size: .7rem;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ══════════════════════════════════════════════════════════════
   ADMIN DASHBOARD
   ══════════════════════════════════════════════════════════════ */
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
  margin-bottom: 2rem;
}
.admin-kpi {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.admin-kpi__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--t1);
}
.admin-kpi__label {
  font-size: .7rem;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: .25rem;
}
.admin-section {
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-section__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: .6rem .75rem;
  cursor: pointer;
  user-select: none;
  background: var(--bg2);
  transition: background .15s;
}
.admin-section__title:hover { background: var(--bg3); }
.admin-section__title .toggle-chevron {
  margin-left: auto;
  transition: transform .2s;
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.admin-section.collapsed .toggle-chevron { transform: rotate(-90deg); }
.admin-section__body {
  padding: .75rem;
  transition: max-height .25s ease, opacity .2s ease;
  overflow: hidden;
}
.admin-section.collapsed .admin-section__body {
  max-height: 0 !important;
  padding: 0 .75rem;
  opacity: 0;
  pointer-events: none;
}

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.data-table th {
  text-align: left;
  padding: .6rem .75rem;
  background: var(--bg-2);
  color: var(--t2);
  font-weight: 600;
  text-transform: uppercase;
  font-size: .65rem;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--t1);
}
.data-table tbody tr:hover {
  background: var(--bg-hover);
}
.data-table .input--sm {
  padding: .25rem .4rem;
  font-size: .75rem;
  min-width: 100px;
}
.data-table--compact th, .data-table--compact td { padding: .4rem .5rem; text-align: center; }
.data-table--compact td:first-child, .data-table--compact th:first-child { text-align: left; }
.th-group { text-align: center !important; font-size: .7rem; border-bottom: 1px solid var(--border); }
.th-group--image { background: rgba(59,130,246,.08); }
.th-group--video { background: rgba(168,85,247,.08); }
.th-sub { font-size: .6rem; text-align: center !important; }

/* Badges */
.badge { padding: .15rem .5rem; border-radius: 4px; font-size: .65rem; font-weight: 600; }
.badge--image { background: rgba(255,255,255,.08); color: #d4d4d4; }
.badge--video { background: rgba(255,255,255,.08); color: #a0a0a0; }

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 420px;
  max-width: 90vw;
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal__header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--t1);
}
.modal__body {
  padding: 1.25rem;
}
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: .3rem;
}

/* Responsive */
@media (max-width: 640px) {
  .submissions-grid, .approval-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-kpis { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .approval-stats { flex-wrap: wrap; }
  .data-table { font-size: .7rem; }
  .data-table th, .data-table td { padding: .4rem .5rem; }

  /* Admin page mobile */
  .admin-page { padding: .75rem; }
  .admin-page__toolbar { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .admin-page__filters { width: 100%; flex-wrap: wrap; gap: .35rem; }
  .admin-page__filters .input { flex: 1; min-width: 100px; font-size: .78rem; }
  .admin-page__title { font-size: .9rem; }

  /* Admin sections compact */
  .admin-section__title { font-size: .8rem; padding: .5rem .6rem; }
  .admin-section__body { padding: .5rem; }

  /* KPI cards compact */
  .kpi { padding: .5rem .6rem; }
  .kpi__value { font-size: 1rem; }
  .kpi__label { font-size: .55rem; }

  /* Tables in admin: horizontal scroll */
  .admin-section__body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-section__body .data-table { min-width: 500px; }
  .data-table--compact th, .data-table--compact td { padding: .3rem .35rem; font-size: .65rem; white-space: nowrap; }

  /* Creator chips smaller */
  .creator-chip { font-size: .72rem !important; padding: .2rem .4rem !important; }

  /* Costs per developer & model table: horizontal scroll */
  .costs__combined-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .costs__combined-section .data-table,
  .costs__combined-section .costs__table { min-width: 600px; }
  .costs__table th, .costs__table td { white-space: nowrap; }
  .costs__combined-header { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .costs__combined-filter { width: 100%; flex-wrap: wrap; gap: .35rem; }
  .costs__creator-filter { width: 100%; flex-wrap: wrap; gap: .35rem; }
  .costs__creator-filter .costs__filter-date { flex: 1; min-width: 100px; }
}

/* ══════════════════════════════════════════════════════════════
   PROMPTS TAB
   ══════════════════════════════════════════════════════════════ */
.prompts-page {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}
.prompts-page__toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.prompts-page__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.prompts-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  min-height: 400px;
}
.prompts-creator-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.prompts-creator-list__header {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .25rem;
}
.prompts-creator-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 1rem;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}
.prompts-creator-card:hover {
  border-color: var(--border-active);
  background: rgba(255,255,255,.05);
}
.prompts-creator-card--active {
  border-color: var(--accent);
  background: rgba(255,255,255,.06);
}
.prompts-creator-card__name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--t1);
}
.prompts-creator-card__badge {
  font-size: .65rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
}
.prompts-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.prompts-content__header {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.prompts-content__header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
}
.prompts-cards {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.prompts-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 3rem;
  color: var(--t3);
  font-size: .85rem;
}
.prompt-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(16px);
  transition: border-color .15s;
}
.prompt-card:hover {
  border-color: var(--border-active);
}
.prompt-card__header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.prompt-card__title {
  flex: 1;
  font-size: .82rem;
  font-weight: 600;
}
.prompt-card__actions {
  display: flex;
  gap: .25rem;
}
.prompt-card__text {
  font-size: .8rem;
  resize: vertical;
  min-height: 60px;
}
.prompts-add-btn {
  align-self: flex-start;
}

/* ── Prompt Template Button (Studio Sidebar) ──────────────── */
.prompt-template-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--t2);
  cursor: pointer;
  padding: 2px 5px;
  margin-left: 6px;
  vertical-align: middle;
  transition: all .15s;
}
.prompt-template-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255,255,255,.06);
}
.prompt-template-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(28,28,30,0.98);
  border: 1px solid var(--border);
  border-radius: 10px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}
.prompt-template-dropdown__item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: .78rem;
  color: var(--t1);
  cursor: pointer;
  transition: background .1s;
}
.prompt-template-dropdown__item:hover {
  background: rgba(255,255,255,.10);
  color: var(--accent);
}

/* Responsive: Prompts */
@media (max-width: 768px) {
  .prompts-layout {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════ PRIVACY MODE BLUR ═══════════════ */
body.privacy-blur .gallery__grid img,
body.privacy-blur .gallery__grid video,
body.privacy-blur .output img,
body.privacy-blur .output video,
body.privacy-blur .submissions-grid img,
body.privacy-blur .submissions-grid video,
body.privacy-blur .history-grid img,
body.privacy-blur .history-grid video,
body.privacy-blur .approval-grid img,
body.privacy-blur .approval-grid video {
  filter: blur(35px) saturate(0.5);
  transition: filter 0.3s ease;
}

body.privacy-blur .gallery__grid img:hover,
body.privacy-blur .gallery__grid video:hover,
body.privacy-blur .output img:hover,
body.privacy-blur .output video:hover,
body.privacy-blur .submissions-grid img:hover,
body.privacy-blur .submissions-grid video:hover,
body.privacy-blur .history-grid img:hover,
body.privacy-blur .history-grid video:hover,
body.privacy-blur .approval-grid img:hover,
body.privacy-blur .approval-grid video:hover,
body.privacy-blur .enhance-grid img:hover {
  filter: blur(0px) saturate(1);
}

/* ══════════════════════════════════════════════════════════════
   ENHANCE TAB
   ══════════════════════════════════════════════════════════════ */
.enhance-page {
  padding: 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
}
.enhance-page::-webkit-scrollbar { width: 6px; }
.enhance-page::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
.enhance-page__toolbar {
  margin-bottom: 1rem;
}

/* Sub-tabs */
.enhance-sub-tabs {
  display: inline-flex;
  gap: .25rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.enhance-sub-tab {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 1rem;
  border: none;
  background: none;
  color: var(--t2);
  font-size: .8rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  font-family: inherit;
}
.enhance-sub-tab:hover {
  color: var(--t1);
  background: rgba(255,255,255,.06);
}
.enhance-sub-tab--active {
  color: var(--t1);
  background: rgba(255,255,255,.10);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.enhance-sub-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: .65rem;
  font-weight: 700;
}

/* Grid – px-based zoom like gallery */
.enhance-grid {
  --enhance-col-width: 200px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--enhance-col-width), 1fr));
  gap: 14px;
}

/* Card */
.enhance-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg, 12px);
  overflow: hidden;
  transition: all .2s ease;
  position: relative;
}
.enhance-card:hover {
  border-color: var(--border-h, var(--border-active));
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}

/* Card image wrapper – 9:16 portrait */
.enhance-card__img-wrap {
  position: relative;
  aspect-ratio: 9/16;
  overflow: hidden;
  background: #000;
}
.enhance-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.enhance-card:hover .enhance-card__img-wrap img {
  transform: scale(1.03);
}

/* Card overlay (view button) */
.enhance-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .2s;
}
.enhance-card:hover .enhance-card__overlay { opacity: 1; }

/* Card info – matches gallery */
.enhance-card__footer {
  padding: .5rem .65rem;
}
.enhance-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .35rem;
  margin-bottom: 2px;
}
.enhance-card__model {
  font-size: .72rem;
  font-weight: 600;
  color: var(--t1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.enhance-card__cost {
  font-size: .68rem;
  font-weight: 500;
  color: var(--t3);
  font-family: var(--mono, monospace);
  white-space: nowrap;
}
.enhance-card__prompt {
  font-size: .68rem;
  color: var(--t3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  margin-bottom: 4px;
  line-height: 1.3;
}
.enhance-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  margin-top: 2px;
}
.enhance-card__date {
  font-size: .65rem;
  color: var(--t4, #555);
  white-space: nowrap;
}
.enhance-card__creator {
  color: var(--accent);
  font-size: .68rem;
  font-weight: 500;
  white-space: nowrap;
}
.enhance-card__actions {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}

/* Enhance button in card footer */
.enhance-card__enhance-btn {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .25rem .55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  color: var(--t1);
  font-size: .65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.enhance-card__enhance-btn:hover:not([disabled]) {
  background: rgba(255,255,255,.12);
  border-color: var(--accent);
  color: var(--accent);
}
.enhance-card__enhance-btn--done {
  background: rgba(48, 209, 88, .1) !important;
  color: #30d158 !important;
  border-color: rgba(48,209,88,.2) !important;
  cursor: default;
}

/* Enhanced badge */
.enhance-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: .2rem .5rem;
  border-radius: 6px;
  font-size: .65rem;
  font-weight: 700;
  background: rgba(48,209,88,.2);
  color: #30d158;
  backdrop-filter: blur(8px);
  z-index: 2;
}

/* Loading / Empty states */
.enhance-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 2rem;
  color: var(--t3);
  font-size: .85rem;
}
.enhance-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 4rem 2rem;
  color: var(--t3);
  font-size: .9rem;
  text-align: center;
  grid-column: 1 / -1;
}
.enhance-empty__hint {
  font-size: .78rem;
  color: var(--t4);
}

/* ── Before/After Slider ─────────────────────────────────────── */
.before-after-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  overflow: hidden;
  background: var(--bg-2);
  cursor: ew-resize;
  border-radius: 0;
}
.enhance-card--slider .before-after-slider {
  border-radius: 12px 12px 0 0;
}
.before-after-slider__before,
.before-after-slider__after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.before-after-slider__before {
  clip-path: inset(0 50% 0 0);
  z-index: 1;
}
.before-after-slider__after {
  z-index: 0;
}
.before-after-slider__divider {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255,255,255,.7);
  z-index: 2;
  cursor: ew-resize;
  transform: translateX(-50%);
  transition: background .15s;
}
.before-after-slider__divider:hover {
  background: #fff;
}
.before-after-slider__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.before-after-slider__label {
  position: absolute;
  bottom: 8px;
  padding: .2rem .5rem;
  border-radius: 4px;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  color: #fff;
  z-index: 3;
  pointer-events: none;
}
.before-after-slider__label--before { left: 8px; }
.before-after-slider__label--after { right: 8px; }

/* Large slider (lightbox) */
.before-after-slider--large {
  width: 80vw;
  max-width: 900px;
  height: 80vh;
  max-height: 80vh;
  aspect-ratio: unset;
  border-radius: 12px;
}
.before-after-slider--large .before-after-slider__before,
.before-after-slider--large .before-after-slider__after {
  object-fit: contain;
}
.before-after-slider--large .before-after-slider__handle {
  width: 40px;
  height: 40px;
}

/* ── Enhance Confirm Modal ─────────────────────────────────── */
.enhance-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.enhance-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}
.enhance-modal__dialog {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 400px;
  max-width: 90vw;
  padding: 1.5rem;
  animation: modalFadeIn .2s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
}
.enhance-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--t2);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background .15s;
}
.enhance-modal__close:hover { background: var(--bg-hover); color: var(--t1); }
.enhance-modal__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--t1);
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 1rem;
}
.enhance-modal__preview {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 9/16;
  max-height: 250px;
  margin-bottom: 1rem;
  background: var(--bg-2);
}
.enhance-modal__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.enhance-modal__fields {
  margin-bottom: 1rem;
}
.enhance-modal__label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: .3rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.enhance-modal__cost {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.enhance-cost-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .8rem;
  border-radius: 100px;
  background: rgba(255,159,10,.1);
  border: 1px solid rgba(255,159,10,.2);
  color: #ff9f0a;
  font-size: .78rem;
  font-weight: 600;
}
.enhance-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

/* ── Enhance Lightbox ──────────────────────────────────────── */
.enhance-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.enhance-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
}
.enhance-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  z-index: 10001;
  transition: background .15s;
}
.enhance-lightbox__close:hover { background: rgba(255,255,255,.2); }
.enhance-lightbox__content {
  position: relative;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
  gap: .75rem;
}
.enhance-lightbox__zoom-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(12px);
  padding: .4rem .8rem;
  border-radius: 999px;
  color: #fff;
}
.enhance-lightbox__zoom-slider {
  width: 120px;
  accent-color: var(--accent, #8b5cf6);
  cursor: pointer;
}
.enhance-lightbox__zoom-label {
  font-size: .75rem;
  min-width: 2.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.before-after-slider--large img {
  transition: transform .15s ease;
}

/* ── Settings Section Toggle ───────────────────────────────── */
.settings__title--toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings__title-left {
  display: flex; align-items: center; gap: .5rem;
}
.settings__chevron {
  transition: transform .25s ease;
  color: var(--t3);
  flex-shrink: 0;
}
.settings__title--collapsed .settings__chevron {
  transform: rotate(-90deg);
}
.settings__body {
  overflow: hidden;
  max-height: 2000px;
  transition: max-height .35s ease, opacity .25s ease;
  opacity: 1;
}
.settings__body--collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.settings__section-desc {
  font-size: .82rem; color: var(--t3); margin: -.25rem 0 1rem;
}
.settings__card-actions {
  display: flex; align-items: center; gap: 1rem;
  margin-top: .75rem;
  padding-left: .25rem;
}

/* ── Enhancement Settings (in Settings tab) ───────────────── */
.enhance-settings__radio {
  accent-color: var(--accent);
  width: 16px; height: 16px;
  flex-shrink: 0;
}

/* Model selection chips */
.enhance-settings__model-picks {
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.enhance-settings__model-pick {
  display: flex; align-items: center; gap: .5rem;
  cursor: pointer;
  padding: .55rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  transition: border-color .2s, background .2s, box-shadow .2s;
  font-size: .82rem;
}
.enhance-settings__model-pick:hover {
  background: rgba(255,255,255,.05);
}
.enhance-settings__model-pick--active,
.enhance-settings__model-pick:has(input:checked) {
  border-color: var(--accent);
  background: rgba(10,132,255,.06);
  box-shadow: 0 0 0 1px rgba(10,132,255,.15);
}
.enhance-settings__model-chip {
  display: flex; align-items: center; gap: .4rem;
  font-weight: 550; color: var(--t1);
}
.enhance-settings__model-name {
  font-weight: 550; color: var(--t1);
}
.enhance-settings__tag {
  font-size: .58rem; font-weight: 700;
  padding: 2px 6px; border-radius: 5px;
  text-transform: uppercase; letter-spacing: .03em;
}
.enhance-settings__tag--default {
  background: rgba(48,209,88,.15); color: #30d158;
}

/* Preset pick rows */
.enhance-settings__preset-picks {
  display: flex; flex-direction: column; gap: .3rem;
}
.enhance-settings__preset-pick {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .6rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .8rem;
  transition: background .15s;
}
.enhance-settings__preset-pick:hover {
  background: rgba(255,255,255,.04);
}
.enhance-settings__preset-pick:has(input:checked) {
  background: rgba(10,132,255,.06);
}
.enhance-settings__preset-pick input[type="radio"] {
  accent-color: var(--accent);
  width: 14px; height: 14px;
  flex-shrink: 0;
}
.enhance-settings__preset-pick span:nth-child(2) {
  flex: 1; color: var(--t1); font-weight: 500;
}

/* Cost tags */
.enhance-settings__cost {
  font-size: .72rem; font-weight: 600;
  color: var(--t3); background: rgba(255,255,255,.05);
  padding: 2px 8px; border-radius: 6px;
  font-family: var(--font-mono, 'SF Mono', monospace);
}
.enhance-settings__cost--low {
  color: #30d158; background: rgba(48,209,88,.08);
}

/* Status */
.enhance-settings__status {
  font-size: .78rem; font-weight: 500;
  transition: opacity .3s;
}
.enhance-settings__status--ok { color: #30d158; }
.enhance-settings__status--err { color: #ff453a; }

/* Modal info rows */
.enhance-modal__info {
  display: flex; flex-direction: column; gap: .35rem;
  margin-bottom: .75rem;
}
.enhance-modal__info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .3rem .65rem;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  font-size: .78rem;
}
.enhance-modal__info-label {
  color: var(--t3); font-weight: 500;
}
.enhance-modal__info-value {
  color: var(--t1); font-weight: 600;
}

/* ── Admin Feature Flags Toggle ────────────────────────────── */
.admin-ff-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.admin-ff-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}
.admin-ff-item:hover {
  border-color: var(--border-active);
  background: rgba(255,255,255,.05);
}
.admin-ff-item__info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.admin-ff-item__label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--t1);
}
.admin-ff-item__desc {
  font-size: .7rem;
  color: var(--t3);
}
.admin-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.admin-toggle__input {
  opacity: 0;
  width: 0;
  height: 0;
}
.admin-toggle__slider {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: rgba(255,255,255,.12);
  cursor: pointer;
  transition: background .2s;
}
.admin-toggle__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.admin-toggle__input:checked + .admin-toggle__slider {
  background: var(--accent);
}
.admin-toggle__input:checked + .admin-toggle__slider::before {
  transform: translateX(20px);
}

/* ── Privacy blur: Enhance ────────────────────────────────── */
body.privacy-blur .enhance-grid img {
  filter: blur(35px) saturate(0.5);
  transition: filter 0.3s ease;
}

/* ── Responsive: Enhance ──────────────────────────────────── */
@media (max-width: 640px) {
  .enhance-page { padding: .75rem; }
  .enhance-grid { gap: .5rem; }
  .enhance-card__enhance-btn { opacity: 1; }
  .enhance-modal__dialog { padding: 1rem; }
}

/* ── Enhance Loading Card ─────────────────────────────────── */
.enhance-card--loading .enhance-card__img-wrap {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
}
.enhance-loading__skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 2rem 1rem;
  min-height: 180px;
  animation: enhancePulse 2s ease-in-out infinite;
}
.enhance-loading__skeleton--error {
  animation: none;
}
@keyframes enhancePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.enhance-loading__eta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.enhance-loading__eta-label {
  font-size: .72rem;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--mono);
}
.enhance-loading__countdown {
  font-size: .65rem;
  color: var(--t3);
  font-family: var(--mono);
}
.enhance-loading__motivation {
  font-size: .7rem;
  color: var(--t2);
  text-align: center;
  padding: 6px 10px;
  font-style: italic;
  letter-spacing: .2px;
  transition: opacity .3s ease;
  line-height: 1.4;
}
.enhance-loading__progress-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.06);
}
.enhance-loading__progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #a0a0a0);
  border-radius: 0 2px 2px 0;
  transition: width .5s ease;
}
.enhance-loading__elapsed {
  font-family: var(--mono) !important;
  color: var(--accent) !important;
  font-weight: 600 !important;
}
.enhance-card--error .enhance-card__img-wrap {
  border-color: rgba(239,68,68,.3);
}

/* ── Admin: API Quick Links ──────────────────────────────── */
.admin-api-table .input--sm {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r);
  padding: 4px 8px;
  transition: border-color .2s, background .2s;
}
.admin-api-table .input--sm:hover {
  border-color: var(--border);
  background: var(--bg-1);
}
.admin-api-table .input--sm:focus {
  border-color: var(--accent);
  background: var(--bg-1);
  outline: none;
}
.admin-api-table td {
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════════════
   FEEDBACK TAB — 3-Column Board
   ═══════════════════════════════════════════════════════════════════════ */

.feedback-page {
  padding: 24px 24px 40px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.feedback-page__toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.feedback-page__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--t1);
  margin: 0;
}

/* ── 3-Column Board ──────────────────────────────────────────── */

.fb-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.fb-column {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fb-column__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--t2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.fb-column__count {
  margin-left: auto;
  background: var(--bg-elevated);
  color: var(--t3);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
}

.fb-column__input-row {
  display: flex;
  gap: 4px;
  padding: 8px 8px 0;
  flex-shrink: 0;
  align-items: center;
}

.fb-column__input {
  flex: 1;
  font-size: 0.75rem;
  height: 28px;
  padding: 4px 8px;
  font-family: inherit;
}

.fb-column__submit {
  flex-shrink: 0;
}

.fb-column__list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ── Compact Cards ───────────────────────────────────────────── */

.fb-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md, 6px);
  padding: 5px 8px;
  transition: border-color 0.15s ease;
}

.fb-card:hover {
  border-color: var(--border-h);
}

.fb-card__row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fb-card__text {
  flex: 1;
  font-size: 0.75rem;
  color: var(--t1);
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  min-width: 0;
}

.fb-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.fb-card__user {
  font-size: 0.6rem;
  color: var(--t3);
  opacity: 0.7;
  font-weight: 500;
}

.fb-card__date {
  font-size: 0.6rem;
  color: var(--t3);
  opacity: 0.5;
  flex-shrink: 0;
  white-space: nowrap;
}

.fb-card__done {
  color: var(--success, #22c55e) !important;
}

.fb-card__done:hover {
  background: rgba(34, 197, 94, 0.12) !important;
}

.fb-card__delete {
  color: var(--t3) !important;
}

.fb-card__delete:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.fb-card--empty {
  font-size: 0.72rem;
  color: var(--t3);
  text-align: center;
  padding: 16px 0;
}

/* ── Extra-small buttons ─────────────────────────────────────── */

.btn--xxs {
  padding: 2px 4px;
  font-size: 0.65rem;
  min-height: 0;
  line-height: 1;
}

.icon-xxs {
  width: 12px;
  height: 12px;
}

/* ── Inline Edit ─────────────────────────────────────────────── */

.fb-edit__row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.fb-edit__input {
  flex: 1;
  font-size: 0.75rem;
  height: 26px;
  padding: 3px 6px;
  font-family: inherit;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 768px) {
  .fb-board {
    grid-template-columns: 1fr;
  }
  .fb-column__list {
    max-height: 300px;
  }
}
