:root {
  --bg: #0c0c0f;
  --panel: rgba(20, 20, 28, 0.9);
  --panel-2: rgba(28, 28, 38, 0.86);
  --line: rgba(255, 255, 255, 0.08);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --green: #22c55e;
  --blue: #3b82f6;
  --red: #f87171;
  --amber: #f59e0b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "Noto Sans SC", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.16), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.1), transparent 28%),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

.staff-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.staff-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.login-panel {
  width: min(430px, 100%);
  margin: 12vh auto 0;
  padding: 28px;
}

.panel-title h1,
.desk-head h1,
.section-head h2 {
  margin: 0;
  letter-spacing: 0;
}

.eyebrow {
  display: block;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.staff-form,
.claim-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  min-height: 42px;
  width: 100%;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
}

input:focus,
select:focus {
  border-color: rgba(59, 130, 246, 0.7);
  outline: none;
}

.primary-button,
.ghost-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(135deg, var(--blue), #2563eb);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
}

.message[data-type="error"] {
  color: var(--red);
}

.message[data-type="success"] {
  color: var(--green);
}

.desk-head,
.section-head,
.record-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.desk-head {
  margin-bottom: 20px;
}

.session-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.staff-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
}

.claim-panel,
.records-panel {
  padding: 22px;
}

.section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stock-pill {
  padding: 8px 12px;
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 999px;
  white-space: nowrap;
}

.claim-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.claim-form .wide {
  grid-column: 1 / -1;
}

.claim-form .primary-button {
  grid-column: 1 / -1;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 10px;
}

.result-box {
  min-height: 180px;
  margin: 0;
  padding: 14px;
  color: #dbeafe;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  white-space: pre-wrap;
}

.records-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-height: 70vh;
  overflow: auto;
}

.record-item {
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.record-top strong {
  display: block;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.record-top span,
.record-meta {
  color: var(--muted);
  font-size: 12px;
}

.record-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.record-cards {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.record-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
}

.record-card code {
  color: #bfdbfe;
  overflow-wrap: anywhere;
}

.record-card span {
  color: var(--green);
  white-space: nowrap;
}

.empty-state {
  padding: 32px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

@media (max-width: 820px) {
  .staff-shell {
    width: min(100vw - 20px, 1180px);
    padding: 20px 0;
  }

  .desk-head,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .staff-grid,
  .claim-form {
    grid-template-columns: 1fr;
  }

  .session-box {
    width: 100%;
    justify-content: space-between;
  }
}
