:root {
  color-scheme: dark;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  background: #080e19;
  color: #eff3fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --panel: rgba(17, 25, 40, .94);
  --line: #273449;
  --muted: #a6b2c8;
  --accent: #8197ff;
  --good: #66e3ac;
  --warning: #ffd28b;
  --bad: #ff839a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 15% 0%, #172649 0, transparent 42%), #080e19; }
.shell { max-width: 1470px; margin: 0 auto; padding: 34px 26px 80px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 19px; }
.login-card { width: min(100%, 480px); margin: 11vh auto 0; padding: 38px; }
.brand-symbol { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; background: #263c7b; color: #dfe6ff; font-size: 29px; font-weight: 700; }
.brand-symbol.small { width: 44px; height: 44px; border-radius: 14px; font-size: 23px; }
.eyebrow { color: var(--accent); letter-spacing: .14em; font-size: 11px; font-weight: 700; }
h1 { margin: 7px 0; font-size: 27px; }
h2 { margin: 0 0 8px; font-size: 20px; }
.quiet, .metric span { color: var(--muted); line-height: 1.55; font-size: 14px; }
form { display: grid; gap: 16px; }
.login-card form { margin-top: 24px; }
label { display: grid; gap: 7px; color: #dbe4f4; font-size: 13px; }
input, textarea { width: 100%; min-height: 43px; padding: 10px 13px; color: #f2f5ff; background: #0d1523; border: 1px solid #344158; border-radius: 10px; font: inherit; }
textarea { min-height: 88px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); outline: 2px solid #8197ff33; }
.button { min-height: 41px; padding: 9px 15px; color: #eaf0ff; border: 1px solid #334158; border-radius: 10px; background: #172134; font: inherit; font-size: 13px; cursor: pointer; }
.button:hover { border-color: #7b91eb; }
.button.primary { background: #6a7ff0; border-color: #7d91ff; color: white; font-weight: 600; }
.button.subtle { background: transparent; }
.error-message { min-height: 20px; color: var(--bad); font-size: 13px; }
.admin-view { display: grid; gap: 22px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; }
.identity, .toolbar-actions, .section-header, footer { display: flex; align-items: center; gap: 13px; }
.identity h1 { margin: 2px 0 0; font-size: 20px; }
.identity .eyebrow { margin: 0; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.metric { min-height: 103px; padding: 17px 19px; display: grid; gap: 9px; }
.metric strong { font-size: 27px; font-weight: 650; }
.workspace, .audit-panel { padding: 23px; }
.section-header { justify-content: space-between; }
.section-header p { margin: 3px 0 0; }
.search-label { margin: 21px 0; max-width: 470px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 990px; border-collapse: collapse; }
th, td { padding: 13px 10px; text-align: left; border-bottom: 1px solid #273348; font-size: 13px; vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.note { display: block; color: var(--muted); margin-top: 5px; font-size: 12px; }
.status { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #21344d; }
.status.active { color: var(--good); background: #173a30; }
.status.available { color: var(--accent); background: #25345c; }
.status.suspended, .status.expired { color: var(--bad); background: #442633; }
.action-group { display: flex; gap: 6px; flex-wrap: wrap; }
.action-group button { padding: 6px 9px; min-height: 31px; font-size: 11px; white-space: nowrap; }
.empty-message { text-align: center; margin: 24px 0 5px; }
.audit-list { list-style: none; padding: 0; margin: 16px 0 0; }
.audit-list li { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid #273348; font-size: 13px; }
.audit-list time { color: var(--muted); white-space: nowrap; }
dialog { width: min(510px, calc(100vw - 30px)); padding: 26px; color: #eff3fb; background: #111a2a; border: 1px solid #36445d; border-radius: 18px; }
dialog::backdrop { background: #020712c7; }
dialog footer { margin-top: 10px; justify-content: flex-end; }
.checkbox { display: flex; align-items: center; }
.checkbox input { width: 18px; min-height: 18px; margin: 0 7px 0 0; }
.issued-key { display: block; margin: 20px 0; padding: 17px 13px; background: #0c1524; border: 1px solid #384a6b; border-radius: 10px; color: #c6d1ff; font: 16px Consolas, monospace; overflow-wrap: anywhere; }
.toast { position: fixed; right: 22px; bottom: 20px; max-width: 430px; padding: 13px 17px; background: #202d45; border: 1px solid #465b83; border-radius: 11px; }

@media (max-width: 1000px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .toolbar { align-items: flex-start; flex-direction: column; gap: 18px; }
}

@media (max-width: 580px) {
  .shell { padding: 17px 12px 55px; }
  .login-card { padding: 23px; }
  .toolbar-actions { flex-wrap: wrap; }
  .section-header { align-items: flex-start; flex-direction: column; }
  .audit-list li { flex-direction: column; gap: 5px; }
}

.license-key { display: block; margin-bottom: 7px; color: #dce4ff; font: 12px Consolas, "Cascadia Mono", monospace; white-space: nowrap; }
.license-key.unavailable { color: var(--muted); }
td .license-key + .button { min-height: 28px; padding: 4px 8px; font-size: 11px; }

select { width: 100%; min-height: 43px; padding: 10px 13px; color: #f2f5ff; background: #0d1523; border: 1px solid #344158; border-radius: 10px; font: inherit; }
select:focus { border-color: var(--accent); outline: 2px solid #8197ff33; }
.release-current { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.release-current article { padding: 15px; border: 1px solid #2d3b52; border-radius: 12px; background: #0d1625; display: grid; gap: 7px; }
.release-current span { color: var(--muted); font-size: 12px; }
.release-current strong { font-size: 14px; }
.release-current code { font-size: 11px; overflow-wrap: anywhere; color: #bdc9ff; }
.release-form { max-width: 760px; padding-top: 3px; }
.release-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.release-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
@media (max-width: 760px) { .release-current, .release-grid { grid-template-columns: 1fr; } .release-submit { align-items: stretch; flex-direction: column; } }
