:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: rgba(21, 25, 34, .94);
  --panel-2: #11151d;
  --line: #2b3240;
  --text: #f0f2f5;
  --muted: #939baa;
  --gold: #e1b45b;
  --gold-2: #f1ca79;
  --green: #5ed19a;
  --red: #ef7272;
  --blue: #6da9ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(225, 180, 91, .13), transparent 35%),
    radial-gradient(circle at 90% 15%, rgba(77, 107, 159, .13), transparent 32%),
    var(--bg);
}
button, input { font: inherit; }
.hidden { display: none !important; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 70px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(430px, 100%);
  display: grid;
  gap: 18px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(2rem, 5vw, 3.3rem); letter-spacing: -.04em; }
h2 { margin-bottom: 4px; font-size: 1.35rem; }
.eyebrow { margin-bottom: 7px; color: var(--gold); font-size: .73rem; font-weight: 800; letter-spacing: .18em; }
.subtitle, .muted { color: var(--muted); }
.hero, .section-title, .actions, .decision-row, .copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hero { margin-bottom: 26px; }
.card {
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}
label { display: grid; gap: 8px; color: var(--muted); font-size: .84rem; }
input {
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #0b0e14;
}
input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(225, 180, 91, .12); }
.form-error { min-height: 1.2em; margin: -6px 0 0; color: var(--red); font-size: .85rem; }
.button {
  padding: 10px 15px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: #171c25;
  font-weight: 750;
}
.button:hover { filter: brightness(1.1); }
.button:disabled { cursor: wait; opacity: .55; }
.button.primary { color: #1a1408; border-color: transparent; background: linear-gradient(135deg, var(--gold-2), #c18c34); }
.button.danger { color: #ffb0b0; border-color: rgba(239, 114, 114, .35); background: rgba(239, 114, 114, .08); }
.button.ghost { background: transparent; }
.badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge.pending { color: var(--gold-2); border-color: rgba(225,180,91,.35); }
.badge.approved, .badge.active { color: var(--green); border-color: rgba(94,209,154,.35); }
.badge.rejected { color: var(--red); border-color: rgba(239,114,114,.35); }
.search { width: min(330px, 100%); }
.request-head, .license-head, .record-row {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 11px 13px;
}
.request-head, .request-row { grid-template-columns: minmax(230px, 1fr) 190px 110px; }
.license-head, .license-row { grid-template-columns: 1fr 1.35fr 190px 90px; }
.request-head, .license-head { margin-top: 16px; color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .08em; }
.record-row {
  width: 100%;
  color: var(--text);
  text-align: left;
  border: 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  background: transparent;
}
.record-row:hover { background: rgba(255, 255, 255, .025); }
code { color: #d9e3f7; overflow-wrap: anywhere; }
.empty { margin: 22px 0 2px; color: var(--muted); text-align: center; }
.hardware-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.hardware-item { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.hardware-item span, .field-label { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.hardware-item strong { overflow-wrap: anywhere; font-size: .87rem; font-weight: 650; }
.approval-controls { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.decision-row { margin-top: 15px; }
.decision-row input { flex: 1; }
.license-result { margin-top: 20px; padding: 18px; border: 1px solid rgba(94,209,154,.35); border-radius: 12px; background: rgba(94,209,154,.06); }
.license-result .copy-row { margin-top: 9px; }
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(430px, calc(100% - 40px));
  padding: 12px 16px;
  border: 1px solid rgba(94,209,154,.4);
  border-radius: 11px;
  background: #101b16;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: .18s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { color: #ffc2c2; border-color: rgba(239,114,114,.45); background: #241313; }
@media (max-width: 760px) {
  .hero, .section-title, .decision-row { align-items: stretch; flex-direction: column; }
  .actions { justify-content: flex-start; }
  .form-grid, .hardware-grid { grid-template-columns: 1fr; }
  .request-head, .license-head { display: none; }
  .request-row, .license-row { grid-template-columns: 1fr; gap: 7px; padding: 15px 4px; }
  .search { width: 100%; }
}
