:root {
  color-scheme: dark;
  --bg: #070810;
  --panel: #111321;
  --line: #292d43;
  --violet: #9d5cff;
  --cyan: #43e8e1;
  --muted: #9298ad;
  --danger: #ff647c;
  --ok: #51df9a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% 0, #24143f 0, transparent 38%), var(--bg);
  color: #f6f7ff;
  font:
    15px/1.45 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  min-height: 100vh;
}
a {
  color: inherit;
}
.shell {
  width: min(1080px, calc(100% - 32px));
  margin: auto;
  padding: 28px 0 64px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}
.mark {
  font-weight: 900;
  letter-spacing: 0.16em;
}
.eyebrow {
  color: var(--cyan);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}
.hero h1 {
  font-size: clamp(38px, 11vw, 72px);
  line-height: 0.9;
  letter-spacing: -0.055em;
  margin: 14px 0;
}
.hero p {
  color: #c2c5d1;
  font-size: 17px;
  max-width: 560px;
}
.panel {
  background: rgba(17, 19, 33, 0.84);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}
.form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}
.field {
  display: grid;
  gap: 7px;
}
.field label {
  font-size: 13px;
  color: #c7cada;
}
.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a0c16;
  color: white;
  padding: 13px 14px;
  font: inherit;
}
.camera {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #06070b;
  aspect-ratio: 3/4;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}
video,
.camera img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera .guide {
  position: absolute;
  width: 60%;
  height: 54%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  pointer-events: none;
}
.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 17px;
  background: linear-gradient(135deg, var(--violet), #7437e5);
  color: white;
  font: 700 14px inherit;
  cursor: pointer;
}
.btn.secondary {
  background: #22263a;
}
.btn.danger {
  background: #50202b;
  color: #ff9bac;
}
.btn.ok {
  background: #17452f;
  color: #9dffd0;
}
.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.btn.mini { padding: 7px 10px; font-size: 12px; }
.icon-trash { border: 0; background: transparent; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 3px; }
.sika-mobile #cameraBtn,
.sika-mobile #snapBtn,
.sika-mobile #retakeBtn {
  flex: 1 1 100%;
  min-height: 62px;
  border-radius: 16px;
  padding: 16px 22px;
  font-size: 17px;
  touch-action: manipulation;
}
.sika-mobile #snapBtn:not(:disabled) {
  min-height: 72px;
  font-size: 19px;
  box-shadow: 0 10px 28px rgba(215, 25, 32, 0.28);
}
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #bbbfd0;
  font-size: 13px;
}
.consent input {
  margin-top: 3px;
}
.note {
  font-size: 12px;
  color: var(--muted);
}
.status-card {
  text-align: center;
  padding: 38px 22px;
}
.spinner {
  width: 52px;
  height: 52px;
  border: 3px solid #292d43;
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}
.status-icon { width:72px; height:72px; margin:0 auto 18px; border-radius:50%; display:grid; place-items:center; background:var(--mobile-primary, #ffd500); color:#151515; font-size:36px; font-weight:900; box-shadow:0 12px 30px rgba(0,0,0,.16); }
.status-icon.is-working { animation:work-bob .8s ease-in-out infinite alternate; }
@keyframes work-bob {
  from { transform: translateY(2px) rotate(-2deg); }
  to { transform: translateY(-4px) rotate(2deg); }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.hidden {
  display: none !important;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.topbar h1 {
  margin: 0;
  font-size: 28px;
}
.operator-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}
.queue {
  display: grid;
  gap: 10px;
  max-height: 72vh;
  overflow: auto;
}
.queue-item {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  cursor: pointer;
  background: #0c0e19;
}
.queue-item.active {
  border-color: var(--violet);
  background: #181329;
}
.queue-item .meta,
.meta {
  color: var(--muted);
  font-size: 12px;
}
.pill {
  padding: 4px 8px;
  border-radius: 99px;
  background: #25283b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pill.is-live, .eyebrow.is-live {
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  border-radius: 99px;
  padding: 5px 10px;
  display: inline-block;
}
.preview {
  width: 100%;
  aspect-ratio: 16/9;
  background: #06070b;
  border-radius: 15px;
  object-fit: contain;
  margin: 15px 0;
}
.identity-audit { display:grid; grid-template-columns:minmax(180px,.42fr) minmax(0,1.58fr); gap:12px; margin:14px 0; }
.raw-card { max-width:280px; }
.audit-card { min-width:0; padding:10px; border:1px solid var(--line); border-radius:15px; background:#080910; }
.audit-label { margin:0 0 8px; color:#f6d44a; font-size:11px; font-weight:900; letter-spacing:.1em; }
.audit-image { display:grid; place-items:center; width:100%; aspect-ratio:16/9; border-radius:10px; object-fit:contain; background:#020306; overflow:hidden; }
.audit-image.raw { aspect-ratio:9/16; object-fit:contain; }
.audit-note { margin:8px 2px 0; color:var(--muted); font-size:11px; line-height:1.45; }
.identity-warning { margin:0 0 15px; padding:11px 13px; border:1px solid #705421; border-radius:10px; color:#ffd27a; background:#30250f; font-size:12px; line-height:1.45; }
.detail-empty {
  min-height: 420px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.settings {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.output-stage {
  position: fixed;
  inset: 0;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.output-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.output-stage .standby {
  text-align: center;
  color: #73778b;
}
.output-stage .standby b {
  display: block;
  color: white;
  font-size: 5vw;
  letter-spacing: 0.15em;
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #20243a;
  border: 1px solid #414660;
  border-radius: 12px;
  padding: 12px 16px;
  z-index: 5;
}
@media (max-width: 760px) {
  .operator-grid {
    grid-template-columns: 1fr;
  }
  .settings {
    grid-template-columns: 1fr;
  }
  .queue {
    max-height: 280px;
  }
  .shell {
    padding-top: 20px;
  }
  .brand {
    margin-bottom: 22px;
  }
}
.live-control { display:grid; grid-template-columns:1fr minmax(320px,46%); gap:20px; align-items:center; }
.live-preview { min-height:220px; border-radius:15px; overflow:hidden; background:#06070b; }
.live-preview img { width:100%; height:100%; object-fit:contain; }
.live-preview-frame { width:100%; aspect-ratio:16/9; border:0; border-radius:15px; overflow:hidden; background:#06070b; }
.elapsed-time { display:inline-flex; margin:4px auto 12px; padding:8px 14px; border-radius:999px; background:rgba(0,0,0,.12); font-variant-numeric:tabular-nums; font-weight:800; letter-spacing:.06em; }
.is-preview .front-controls { display:none !important; }
.air-queue { display:grid; gap:7px; margin-top:14px; }
.air-item { display:flex; justify-content:space-between; gap:10px; padding:9px 11px; border:1px solid var(--line); border-radius:10px; }
.delivery-success { color: var(--ok); font-weight: 800; }
.delivery-warning { color: #ffd27a; border: 1px solid #705421; background: #30250f; padding: 10px 12px; border-radius: 10px; }
.theme-settings { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; align-items:end; }
.compact,.color-row { display:flex; gap:8px; }
.color-row input { min-width:52px; height:45px; padding:3px; }
.span-2 { grid-column:span 2; }
@media (max-width:760px){.live-control,.theme-settings,.identity-audit{grid-template-columns:1fr}.span-2{grid-column:auto}.live-preview{min-height:180px}}
