:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #0a0c14;
  color: #e8ecfa;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 75% -20%, #282056 0, transparent 38%), #0a0c14;
}

button, input, select, textarea { font: inherit; }

.shell { max-width: 1180px; margin: 0 auto; padding: 36px 28px 24px; }
.topbar, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar { margin-bottom: 28px; }
.eyebrow { color: #22d3ee; font-size: 11px; font-weight: 700; letter-spacing: .16em; margin: 0 0 8px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 0; }
h2 { font-size: 20px; margin-bottom: 8px; }
.muted { color: #929bb6; line-height: 1.5; }
.card { background: #141929; border: 1px solid #252d47; border-radius: 16px; padding: 22px; box-shadow: 0 16px 42px #0002; }
.login-card { max-width: 440px; margin: 7vh auto; }
form { display: grid; gap: 11px; }
label { color: #c4cce1; font-size: 13px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 11px 12px; color: #e8ecfa; background: #0d1120;
  border: 1px solid #303a58; border-radius: 9px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #7c5cff; box-shadow: 0 0 0 3px #7c5cff22; }
.button { border: 0; border-radius: 10px; padding: 11px 16px; color: white; font-weight: 650; cursor: pointer; }
.button:disabled { opacity: .6; cursor: wait; }
.primary { background: linear-gradient(110deg, #7655f5, #287bd8); }
.secondary { color: #dce5fc; background: #20283e; border: 1px solid #34405e; }
.login-card .button { margin-top: 8px; }
.hidden { display: none !important; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.summary { display: grid; gap: 12px; color: #aab4cf; }
.summary strong { font-size: 28px; color: #fff; }
.section-heading { margin-bottom: 18px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; text-align: left; }
th { padding: 12px; color: #9da8c5; font-size: 12px; border-bottom: 1px solid #303852; }
td { padding: 13px 12px; border-bottom: 1px solid #252d43; font-size: 13px; }
.status { display: inline-flex; border-radius: 99px; padding: 5px 9px; font-size: 11px; font-weight: 700; }
.status.active { background: #34d39920; color: #55deb0; }
.status.expired, .status.suspended { background: #fbbf2422; color: #ffd166; }
.row-actions { display: flex; gap: 7px; }
.row-actions button { padding: 6px 9px; font-size: 12px; }
.dialog { width: min(520px, calc(100% - 28px)); max-height: 90vh; overflow-y: auto; color: #e8ecfa; background: #141929; border: 1px solid #343e5c; border-radius: 16px; padding: 24px; }
.dialog::backdrop { background: #03050bcc; backdrop-filter: blur(4px); }
.dialog .section-heading { margin-bottom: 15px; }
.dialog form { gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.icon-button { border: 0; background: transparent; color: #aab4cf; font-size: 25px; cursor: pointer; }
.error { min-height: 18px; color: #ff8585; font-size: 13px; margin: 0; }
.license-code { display: block; overflow-wrap: anywhere; padding: 14px; margin: 15px 0; color: #69e2ca; background: #0b1120; border: 1px solid #2e3b57; border-radius: 10px; font-size: 13px; user-select: all; }
.dialog img { display: block; width: min(220px, 100%); margin: 14px auto; padding: 10px; background: #fff; border-radius: 10px; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 48px)); padding: 14px 18px; color: #fff; background: #20283e; border: 1px solid #3a4767; border-radius: 12px; box-shadow: 0 10px 32px #0006; }
footer { color: #73809f; font-size: 12px; line-height: 1.5; margin: 24px 4px 0; }

@media (max-width: 680px) {
  .shell { padding: 22px 14px; }
  .card { padding: 17px; }
  .summary-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .topbar { align-items: flex-start; }
}
