:root {
  color-scheme: dark;
  --bg: #020806;
  --panel: #0c1712;
  --panel-2: #101f18;
  --line: #24563d;
  --line-bright: #5ef08e;
  --text: #f3fff7;
  --muted: #a9beb0;
  --gold: #f4d36b;
  --green: #72ee94;
  --red: #ff6868;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(61, 180, 94, 0.18), transparent 34rem),
    linear-gradient(135deg, #030806 0%, #0a130f 48%, #04100a 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1600px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 0 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  background: linear-gradient(145deg, #112318, #07110c);
  color: var(--gold);
  font-weight: 950;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 24px rgba(94, 240, 142, 0.1);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  letter-spacing: 0;
  color: var(--gold);
}

.brand p,
.muted,
small {
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(114, 238, 148, 0.24);
  border-radius: 999px;
  background: rgba(9, 19, 14, 0.78);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8a958d;
}

.dot.ready {
  background: var(--green);
  box-shadow: 0 0 18px rgba(114, 238, 148, 0.9);
}

.dot.error {
  background: var(--red);
}

.panel {
  border: 1px solid rgba(94, 240, 142, 0.38);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 31, 24, 0.96), rgba(7, 15, 11, 0.98));
  box-shadow: var(--shadow);
}

.login-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 420px);
  gap: 24px;
  align-items: end;
  padding: 28px;
}

.login-panel h2,
.hero h2,
.queue-panel h2 {
  margin-top: 4px;
  font-size: 24px;
}

.eyebrow {
  color: var(--line-bright);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  min-height: 44px;
  border: 1px solid rgba(180, 210, 190, 0.28);
  border-radius: 8px;
  background: #eef6f1;
  color: #07100c;
  padding: 0 12px;
  font-weight: 750;
}

button {
  min-height: 42px;
  border: 1px solid rgba(244, 211, 107, 0.64);
  border-radius: 8px;
  background: linear-gradient(180deg, #76f19a, #42b96b);
  color: #041008;
  padding: 0 16px;
  font-weight: 950;
  cursor: pointer;
}

button.secondary {
  background: linear-gradient(180deg, #14251c, #0b1610);
  color: var(--text);
  border-color: rgba(114, 238, 148, 0.42);
}

.hidden {
  display: none !important;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.upload-card {
  position: relative;
  min-height: 172px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 2px dashed rgba(94, 240, 142, 0.55);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(94, 240, 142, 0.12), transparent),
    #07110d;
  cursor: pointer;
}

.upload-card input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.upload-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(244, 211, 107, 0.6);
  color: var(--gold);
  font-size: 34px;
  line-height: 1;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(94, 240, 142, 0.22);
  border-radius: 8px;
  background: rgba(2, 8, 6, 0.4);
}

.step span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #183324;
  color: var(--gold);
  font-weight: 950;
}

.step.disabled {
  opacity: 0.58;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
}

.metric {
  padding: 16px;
  background: rgba(2, 8, 6, 0.34);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 25px;
}

.queue-panel {
  margin-top: 14px;
  padding: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  gap: 10px;
}

.empty {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(94, 240, 142, 0.22);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #122119;
  color: var(--line-bright);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: #effff3;
  font-weight: 650;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(114, 238, 148, 0.44);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.pill.warn {
  border-color: rgba(244, 211, 107, 0.64);
  color: var(--gold);
}

.spinner {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
}

.spinner-card {
  width: min(420px, calc(100vw - 34px));
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 34px;
  border: 1px solid rgba(94, 240, 142, 0.52);
  border-radius: 12px;
  background: #07110d;
  text-align: center;
}

.ring {
  width: 74px;
  height: 74px;
  border: 6px solid rgba(94, 240, 142, 0.14);
  border-top-color: var(--line-bright);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

dialog {
  width: min(980px, calc(100vw - 36px));
  border: 1px solid rgba(94, 240, 142, 0.5);
  border-radius: 12px;
  background: #07110d;
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 22px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.x {
  position: absolute;
  right: 12px;
  top: 12px;
  min-height: 30px;
  width: 32px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.18);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.detail {
  padding: 12px;
  border: 1px solid rgba(94, 240, 142, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.detail span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .login-panel,
  .hero,
  .workflow,
  .summary-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
