:root{
  --bg:#050a15;
  --panel:#0f172a;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --stroke:rgba(148,163,184,.22);
  --stroke-strong:rgba(148,163,184,.38);
}

*{box-sizing:border-box}
html,body{height:100%}
.hidden{display:none!important}
body{
  margin:0;
  font-family:"SF Pro Text","Inter","Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 650px at 12% -5%, rgba(56,189,248,.12), transparent 60%),
    radial-gradient(900px 500px at 95% 105%, rgba(34,197,94,.08), transparent 52%),
    var(--bg);
}

.app{min-height:100%;display:grid;grid-template-rows:auto 1fr}

.topbar{
  border-bottom:1px solid var(--stroke);
  background:rgba(2,6,23,.62);
  backdrop-filter:blur(12px);
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.topbarLeft{display:grid;gap:4px}
.title{font-size:18px;font-weight:700;letter-spacing:.01em}
.sub{font-size:12px;color:var(--muted)}
.topbarActions{display:flex;gap:8px;flex-wrap:wrap}

.btn{
  border:1px solid var(--stroke);
  background:rgba(15,23,42,.64);
  color:var(--text);
  border-radius:12px;
  padding:9px 12px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
}
.btn:hover{border-color:var(--stroke-strong);background:rgba(30,41,59,.72)}
.btn.primary{border-color:rgba(56,189,248,.58);background:rgba(56,189,248,.2)}
.btn.active{border-color:rgba(56,189,248,.62);background:rgba(56,189,248,.22)}
.btn:disabled{opacity:.55;cursor:not-allowed}

.shell{
  display:grid;
  grid-template-columns:340px minmax(0,1fr) 340px;
  gap:14px;
  padding:14px;
  min-height:0;
}

.column{
  min-height:0;
  border:1px solid var(--stroke);
  border-radius:18px;
  background:rgba(9,14,28,.72);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02), 0 18px 40px rgba(2,6,23,.35);
}
.leftCol,.rightCol{overflow:auto;padding:12px}

.centerCol{
  padding:12px;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:12px;
  min-height:0;
}

.sectionCard{
  border:1px solid rgba(148,163,184,.18);
  border-radius:14px;
  background:rgba(15,23,42,.58);
  padding:12px;
  display:grid;
  gap:10px;
}

.sectionTitle{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:700;
}

.fieldRow{display:grid;gap:6px}
.fieldRow label{font-size:12px;color:#cbd5e1;font-weight:600}

.input,.select,.textarea{
  width:100%;
  border:1px solid rgba(148,163,184,.24);
  border-radius:11px;
  background:rgba(2,6,23,.55);
  color:var(--text);
  padding:10px 11px;
  font-size:13px;
  outline:none;
}
.textarea{resize:vertical;min-height:70px}

.input:focus,.select:focus,.textarea:focus{
  border-color:rgba(56,189,248,.62);
  box-shadow:0 0 0 3px rgba(56,189,248,.14);
}

.inline2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.inline3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.uploadRow{display:grid;gap:8px}
.uploadMeta{font-size:11px;color:var(--muted);min-height:14px}
.hiddenInput{display:none}
.bulkMeta{
  border:1px solid rgba(148,163,184,.2);
  border-radius:10px;
  background:rgba(2,6,23,.4);
  padding:8px 10px;
  font-size:11px;
  color:#cbd5e1;
  min-height:34px;
}
.rowActions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.diffPanel{
  border:1px solid rgba(148,163,184,.2);
  border-radius:10px;
  background:rgba(2,6,23,.45);
  padding:8px;
  display:grid;
  gap:8px;
}
.diffBody{
  font-size:11px;
  line-height:1.45;
  max-height:150px;
  overflow:auto;
  white-space:pre-wrap;
  color:#cbd5e1;
}
.qaStatus{
  font-size:11px;
  color:#cbd5e1;
  border:1px solid rgba(148,163,184,.18);
  border-radius:10px;
  padding:7px 8px;
  background:rgba(2,6,23,.4);
}
.qaList{display:grid;gap:7px;max-height:170px;overflow:auto;padding-right:2px}
.qaItem{
  border:1px solid rgba(148,163,184,.2);
  border-radius:10px;
  background:rgba(2,6,23,.45);
  padding:7px 8px;
  font-size:11px;
  display:grid;
  gap:4px;
}
.qaItemTop{display:flex;justify-content:space-between;gap:8px}
.qaItemMeta{color:#94a3b8;font-size:10px}
.qualityBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:2px 8px;
  font-size:10px;
  letter-spacing:.05em;
  text-transform:uppercase;
  border:1px solid rgba(148,163,184,.26);
}
.qualityBadge.pass{background:rgba(34,197,94,.16);color:#86efac;border-color:rgba(34,197,94,.36)}
.qualityBadge.fail{background:rgba(244,63,94,.16);color:#fecdd3;border-color:rgba(244,63,94,.34)}
.complianceBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  justify-self:start;
  align-self:start;
  flex:0 0 auto;
  border-radius:999px;
  height:20px;
  padding:0 8px;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  line-height:1;
  white-space:nowrap;
  letter-spacing:.04em;
  border:1px solid rgba(148,163,184,.3);
  color:#cbd5e1;
  width:fit-content;
  max-width:max-content;
  -webkit-text-size-adjust:100%;
}
.complianceBadge.good{background:rgba(34,197,94,.16);color:#86efac;border-color:rgba(34,197,94,.34)}
.complianceBadge.mid{background:rgba(245,158,11,.16);color:#fde68a;border-color:rgba(245,158,11,.34)}
.complianceBadge.bad{background:rgba(244,63,94,.18);color:#fecdd3;border-color:rgba(244,63,94,.35)}
.specInfoRow{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.jobHistory{display:grid;gap:8px;max-height:260px;overflow:auto;padding-right:2px}
.zipPaywallCard{position:relative}
.downloadCenterInner{display:grid;gap:8px}
.zipPaywallCard.locked .downloadCenterInner{
  filter:blur(2.2px);
  pointer-events:none;
  user-select:none;
  opacity:.72;
}
.zipPaywallOverlay{
  position:absolute;
  inset:0;
  border-radius:14px;
  display:grid;
  align-content:center;
  justify-items:center;
  gap:8px;
  padding:16px;
  background:linear-gradient(180deg, rgba(2,6,23,.45), rgba(2,6,23,.72));
  z-index:2;
}
.zipPaywallTitle{font-size:12px;letter-spacing:.11em;text-transform:uppercase;color:#cbd5e1}
.zipPaywallText{font-size:12px;color:#cbd5e1;text-align:center;max-width:280px;line-height:1.45}
.btn.proLocked{
  filter:blur(1.6px);
  opacity:.56;
}
.jobItem{
  border:1px solid rgba(148,163,184,.2);
  border-radius:10px;
  background:rgba(2,6,23,.45);
  padding:8px;
  display:grid;
  gap:7px;
}
.jobTop{display:flex;justify-content:space-between;gap:8px;align-items:center}
.jobMeta{font-size:11px;color:#94a3b8}
.jobActions{display:flex;gap:6px;flex-wrap:wrap}
.jobActions .btn{padding:6px 8px;font-size:11px;border-radius:8px}
.jobFailureDetails{
  border:1px solid rgba(148,163,184,.22);
  border-radius:10px;
  background:rgba(2,6,23,.35);
  overflow:hidden;
}
.jobFailureDetails summary{
  cursor:pointer;
  list-style:none;
  padding:7px 9px;
  font-size:11px;
  color:#fecdd3;
  border-bottom:1px solid rgba(148,163,184,.15);
}
.jobFailureList{
  display:grid;
  gap:6px;
  padding:8px;
  max-height:160px;
  overflow:auto;
}
.jobFailureItem{
  border:1px solid rgba(148,163,184,.2);
  border-radius:8px;
  background:rgba(2,6,23,.45);
  padding:6px 7px;
  font-size:11px;
  display:grid;
  gap:4px;
}
.jobFailureHint{color:#fde68a}

.checkboxRow{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:#d1d5db;
  border:1px solid rgba(148,163,184,.18);
  border-radius:10px;
  padding:8px 10px;
  background:rgba(2,6,23,.38);
}
.checkboxRow input{accent-color:#38bdf8}

.toolbar{
  border:1px solid rgba(148,163,184,.18);
  border-radius:14px;
  background:rgba(15,23,42,.58);
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.toolbarLeft{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.toolbarRight{display:flex;gap:8px;align-items:center}

.pill{
  border:1px solid rgba(148,163,184,.26);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  color:#dbeafe;
  background:rgba(2,6,23,.46);
}

.heroWrap{
  border:1px solid rgba(148,163,184,.18);
  border-radius:18px;
  background:rgba(2,6,23,.38);
  padding:12px;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  gap:10px;
  min-height:0;
}

.heroPreview{
  min-height:280px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:14px;
  background:rgba(2,6,23,.72);
  display:block;
  overflow:auto;
  padding:10px;
}
.heroCanvas{
  display:inline-block;
  transform-origin:top left;
}
.heroCanvas svg{
  display:block;
  border-radius:12px;
  box-shadow:0 20px 50px rgba(2,6,23,.46);
}
.heroMeta{font-size:12px;color:var(--muted)}
.previewEmpty{font-size:13px;color:var(--muted)}

.previewStrip{
  border:1px solid rgba(148,163,184,.18);
  border-radius:14px;
  background:rgba(2,6,23,.38);
  padding:10px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(156px,1fr));
  gap:10px;
  overflow:auto;
}
.previewStrip.listMode{grid-template-columns:1fr}

.previewCard{
  border:1px solid rgba(148,163,184,.24);
  border-radius:12px;
  background:rgba(15,23,42,.56);
  padding:8px;
  text-align:left;
  color:inherit;
  cursor:pointer;
  display:grid;
  gap:6px;
}
.previewCard:hover{border-color:rgba(148,163,184,.42)}
.previewCard.active{border-color:rgba(56,189,248,.68);background:rgba(56,189,248,.14)}

.previewThumb{
  border:1px solid rgba(148,163,184,.18);
  border-radius:10px;
  background:rgba(2,6,23,.75);
  min-height:94px;
  display:block;
  overflow:hidden;
  padding:6px;
}
.previewThumb img{max-width:100%;max-height:140px}
.previewThumb svg{
  width:100%;
  height:auto;
  display:block;
  border-radius:8px;
}
.previewLabel{font-size:12px;font-weight:700}
.previewMeta{font-size:11px;color:var(--muted)}

.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.muted{color:var(--muted)}
.outputCount{font-size:42px;font-weight:800;line-height:1;color:#e2e8f0}

.specList{display:grid;gap:8px;max-height:330px;overflow:auto;padding-right:3px}
.specItem{
  border:1px solid rgba(148,163,184,.2);
  border-radius:10px;
  background:rgba(2,6,23,.42);
  padding:8px 10px;
  display:grid;
  gap:6px;
  font-size:12px;
}
.specItem.readonly{opacity:.94}
.specItem input{accent-color:#38bdf8}
.specLeft{display:flex;align-items:center;gap:8px}
.specRight{display:flex;align-items:center;gap:8px;justify-content:flex-end}
.customSpec{cursor:pointer}

.statusBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:3px 8px;
  font-size:10px;
  letter-spacing:.05em;
  text-transform:uppercase;
  border:1px solid transparent;
}
.statusBadge.idle{background:rgba(148,163,184,.12);color:#94a3b8;border-color:rgba(148,163,184,.2)}
.statusBadge.queued{background:rgba(59,130,246,.14);color:#93c5fd;border-color:rgba(59,130,246,.32)}
.statusBadge.rendering{background:rgba(56,189,248,.2);color:#67e8f9;border-color:rgba(56,189,248,.38)}
.statusBadge.done{background:rgba(34,197,94,.16);color:#86efac;border-color:rgba(34,197,94,.32)}
.statusBadge.failed{background:rgba(244,63,94,.18);color:#fecdd3;border-color:rgba(244,63,94,.34)}

.statusError{font-size:11px;color:#fecdd3}

.progressCard{display:grid;gap:8px}
.progressTrack{
  width:100%;
  height:10px;
  border-radius:999px;
  background:rgba(148,163,184,.18);
  overflow:hidden;
}
.progressBar{width:0%;height:100%;background:linear-gradient(90deg,#38bdf8,#22c55e);transition:width .25s ease}
.status{font-size:12px;color:var(--muted)}
.rightActions{display:grid;gap:8px}

*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{background:rgba(148,163,184,.4);border-radius:999px;border:2px solid transparent;background-clip:padding-box}
*::-webkit-scrollbar-thumb:hover{background:rgba(148,163,184,.58);background-clip:padding-box}

@media (max-width:1260px){
  .shell{grid-template-columns:320px minmax(0,1fr)}
  .rightCol{grid-column:1/-1}
}

@media (max-width:940px){
  .shell{grid-template-columns:1fr}
  .leftCol,.centerCol,.rightCol{max-height:none}
  .heroPreview{min-height:220px}
  .inline3{grid-template-columns:1fr}
}
