:root {
  color-scheme: dark;
  --bg: #09080d;
  --panel: #15121d;
  --panel-2: #1d1827;
  --ink: #f5edf8;
  --muted: #b8aabe;
  --line: rgba(255,255,255,.12);
  --gold: #f4c866;
  --gold-2: #a56f1f;
  --pink: #e77ce7;
  --cyan: #7ee7ff;
  --danger: #ff6b7a;
  --ok: #83e68b;
  --shadow: 0 22px 65px rgba(0,0,0,.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at top left, rgba(231,124,231,.16), transparent 32rem), radial-gradient(circle at top right, rgba(126,231,255,.11), transparent 30rem), var(--bg); color: var(--ink); }
body { padding: 24px; }
button, input, select { font: inherit; }
.app-shell { max-width: 1240px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding: 26px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; color: var(--gold); font-weight: 800; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 4.7rem); line-height: .93; letter-spacing: -.065em; }
.hero-copy { margin: 18px 0 0; max-width: 760px; color: var(--muted); font-size: 1.08rem; line-height: 1.55; }
.hero-card { min-width: 220px; padding: 18px; border: 1px solid rgba(244,200,102,.35); border-radius: 22px; background: rgba(244,200,102,.09); display: grid; gap: 6px; }
.hero-card strong { color: var(--gold); font-size: 1.1rem; }
.hero-card span { color: var(--muted); }
main { display: grid; gap: 18px; margin-top: 20px; }
.panel { border: 1px solid var(--line); border-radius: 24px; background: rgba(21,18,29,.86); box-shadow: 0 18px 45px rgba(0,0,0,.24); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.035); }
.panel-heading.compact { align-items: start; }
.panel-heading h2 { margin: 0; font-size: 1.15rem; }
.panel-heading p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.drop-zone { margin: 20px; min-height: 160px; border: 2px dashed rgba(244,200,102,.45); border-radius: 22px; display: grid; place-items: center; text-align: center; gap: 12px; color: var(--muted); background: rgba(0,0,0,.18); cursor: pointer; transition: .18s ease; }
.drop-zone.dragover, .drop-zone:focus { outline: none; border-color: var(--cyan); background: rgba(126,231,255,.08); transform: translateY(-1px); }
.drop-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 50%; background: rgba(244,200,102,.15); color: var(--gold); font-size: 2rem; }
.drop-zone strong, .drop-zone span { display: block; }
.settings-grid { padding: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: .92rem; }
select, input[type="number"] { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); color: var(--ink); padding: 12px 13px; }
.check-row { align-content: start; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.03); }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 20px; }
.btn { border: 1px solid transparent; border-radius: 999px; padding: 11px 16px; cursor: pointer; background: rgba(255,255,255,.08); color: var(--ink); font-weight: 800; transition: .15s ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--cyan), #5084ff); color: #071018; }
.btn.gold { background: linear-gradient(135deg, var(--gold), #ff9f4f); color: #211300; }
.btn.secondary { border-color: var(--line); background: rgba(255,255,255,.07); }
.btn.danger { background: rgba(255,107,122,.14); color: #ffdfe4; border-color: rgba(255,107,122,.35); }
.btn.mini { padding: 8px 11px; font-size: .82rem; }
.queue-stats { color: var(--gold); font-weight: 800; white-space: nowrap; }
.file-list { display: grid; gap: 12px; padding: 20px; }
.file-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.035); overflow: hidden; }
.file-main { display: flex; align-items: start; gap: 14px; min-width: 0; }
.row-check { display: flex; gap: 6px; align-items: center; white-space: nowrap; margin-top: 5px; }
.file-name { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.file-meta, .file-status { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.file-status { color: var(--cyan); }
.file-metrics { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; max-width: 420px; }
.metric { border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; color: var(--muted); background: rgba(0,0,0,.2); font-size: .78rem; white-space: nowrap; }
.metric strong { color: var(--ink); }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.progress-shell { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--gold), var(--pink), var(--cyan)); transition: width .2s ease; }
.json-preview { margin: 0; padding: 20px; max-height: 420px; overflow: auto; color: #e9e1f0; background: #08070b; font-size: .84rem; line-height: 1.5; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 40px)); padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(12,10,16,.96); box-shadow: var(--shadow); color: var(--ink); z-index: 20; }
.toast strong { color: var(--gold); }
@media (max-width: 900px) {
  body { padding: 14px; }
  .hero { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .file-row { grid-template-columns: 1fr; }
  .file-metrics, .row-actions { justify-content: start; }
  .panel-heading { flex-direction: column; align-items: stretch; }
}
