:root {
  color-scheme: dark;
  --bg: #0a0d12;
  --panel: #111722;
  --panel-2: #151d29;
  --line: #273244;
  --text: #f4f7fb;
  --muted: #94a0b3;
  --accent: #6de0b7;
  --accent-ink: #05251b;
  --danger: #ff6b7d;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(84, 102, 255, .18), transparent 30rem),
    radial-gradient(circle at 90% 10%, rgba(74, 226, 172, .10), transparent 28rem),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

button, input { font: inherit; }
.hidden { display: none !important; }
.shell { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 64px; }
.masthead { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.masthead h1, .panel h2, .license-card h3 { margin: 0; }
.masthead .button { margin-left: auto; }
.mark {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #8b92ff); color: #07100e; font-weight: 900;
}
.eyebrow { margin: 0 0 3px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.muted { margin: 4px 0; color: var(--muted); }
.small { font-size: 12px; }
.panel { background: rgba(17, 23, 34, .94); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.login-panel { width: min(480px, 100%); margin: 10vh auto 0; }
.stack { display: grid; gap: 16px; margin-top: 20px; }
label { display: grid; gap: 7px; color: #cbd4e2; font-size: 13px; font-weight: 650; }
input { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #0b111a; color: var(--text); padding: 11px 12px; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109, 224, 183, .12); }
.button { border: 1px solid transparent; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 750; }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button.ghost, .button.compact { border-color: var(--line); background: #18202c; color: var(--text); }
.button.danger { border-color: rgba(255, 107, 125, .4); background: rgba(255, 107, 125, .08); color: #ffabb6; }
.button.compact { padding: 6px 9px; font-size: 12px; }
.error, .message { min-height: 20px; margin: 0; color: #ff9daa; }
.message { color: var(--accent); overflow-wrap: anywhere; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.summary { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
.summary span { display: block; color: var(--muted); font-size: 12px; }
.summary strong { font-size: 30px; }
.layout { display: grid; grid-template-columns: minmax(270px, .72fr) minmax(440px, 1.6fr); gap: 14px; align-items: start; }
.editor { position: sticky; top: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inventory-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.search { width: min(260px, 48%); }
.license-list { display: grid; gap: 11px; }
.license-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.license-card-head, .key-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.badge.valid { background: rgba(109, 224, 183, .14); color: var(--accent); }
.badge.expired, .badge.revoked { background: rgba(255, 107, 125, .12); color: #ff9daa; }
.key-row { margin: 14px 0 8px; padding: 10px; border-radius: 10px; background: #0b111a; }
code { color: #cdd6ff; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 12px; }
.empty { padding: 45px 12px; text-align: center; color: var(--muted); }

@media (max-width: 760px) {
  .summary-grid { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .editor { position: static; }
  .inventory-head { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .license-card-head, .key-row { align-items: flex-start; }
}
