:root {
  color-scheme: light;
  --ink: #17233a;
  --muted: #68758d;
  --line: #e4e9f1;
  --soft: #f5f7fb;
  --blue: #315be8;
  --blue-dark: #2447bf;
  --green: #147d59;
  --red: #b33c47;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f4f6fb; color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 6vw, 92px); border-bottom: 1px solid rgba(29, 45, 72, .08); background: rgba(255,255,255,.88); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; letter-spacing: .06em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--blue); color: #fff; font-size: 20px; font-weight: 750; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 13px; letter-spacing: .11em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .2em; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.secure-label { display: inline-flex; align-items: center; gap: 8px; color: #596782; font-size: 12px; }
.admin-access { padding: 4px 6px; border: 0; border-radius: 5px; background: transparent; color: #8792a4; font: inherit; font-size: 10px; opacity: .72; }
.admin-access:hover, .admin-access:focus-visible { background: #f1f3f8; color: #536079; opacity: 1; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #27a879; display: inline-block; box-shadow: 0 0 0 3px rgba(39,168,121,.12); }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.intro { padding: 62px 0 34px; max-width: 590px; }
.eyebrow { margin: 0 0 17px; color: var(--blue); font-size: 10px; font-weight: 760; letter-spacing: .19em; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 62px); letter-spacing: -.055em; line-height: .99; font-weight: 690; }
h1 span { color: var(--blue); }
.intro-copy { max-width: 460px; margin: 20px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.card { background: #fff; border: 1px solid rgba(34,50,77,.07); border-radius: 18px; box-shadow: 0 18px 60px rgba(28,44,74,.075); }
.portal { overflow: hidden; margin-bottom: 42px; }
.tabs { display: flex; gap: 30px; padding: 0 32px; border-bottom: 1px solid var(--line); }
.tab { position: relative; min-height: 58px; padding: 0 2px; border: 0; background: transparent; color: #7c879a; font-size: 13px; font-weight: 640; }
.tab.active { color: var(--blue); }
.tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--blue); content: ""; }
.view { padding: 30px 32px 36px; }
.view[hidden] { display: none !important; }
.view-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 25px; }
.icon-box { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #edf1ff; color: var(--blue); font-size: 24px; }
.admin-icon { background: #f1f3f8; color: #5e6c84; font-size: 19px; }
h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.view-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.stack { display: grid; gap: 9px; }
label { color: #45536a; font-size: 11px; font-weight: 680; }
.input-row { display: flex; gap: 10px; }
input, select, textarea { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #dfe5ef; border-radius: 8px; outline: none; background: #fff; color: var(--ink); font-size: 12px; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #7891f4; box-shadow: 0 0 0 3px rgba(49,91,232,.1); }
input::placeholder { color: #a7b0bf; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 17px; border: 1px solid transparent; border-radius: 8px; font-size: 11px; font-weight: 680; white-space: nowrap; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--blue-dark); }
.secondary { background: #edf1ff; color: #2f51c7; }
.secondary:hover { background: #e1e8ff; }
.subtle { border-color: var(--line); background: #fff; color: #536079; }
.subtle:hover { background: var(--soft); }
.small { min-height: 31px; padding: 0 11px; font-size: 10px; }
.field-note { margin: 1px 0 0; color: #8994a6; font-size: 10px; line-height: 1.5; }
.result { margin-top: 22px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; font-size: 12px; }
.result.loading { color: var(--muted); }
.result.error { border-color: #f2c9cd; background: #fff8f8; color: var(--red); }
.result-title { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.result-badge, .pill { display: inline-flex; align-items: center; min-height: 23px; padding: 0 9px; border-radius: 99px; font-size: 10px; font-weight: 720; }
.result-badge.good, .pill.active { background: #e8f7f0; color: var(--green); }
.result-badge.bad, .pill.revoked { background: #fff0f0; color: var(--red); }
.pill.suspended { background: #fff6e5; color: #966210; }
.details { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 9px 16px; margin: 17px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 580; overflow-wrap: anywhere; }
.hidden { display: none !important; }
.login-form { max-width: 540px; }
.console-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 20px; padding: 10px 12px; border: 1px solid #e4efe9; border-radius: 9px; background: #f7fcf9; font-size: 11px; }
.console-bar > div { display: flex; align-items: center; gap: 9px; }
.muted { color: var(--muted); font-size: 10px; font-weight: 450; }
.admin-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.admin-summary > div { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.admin-summary strong { color: var(--blue); font-size: 17px; }
.admin-summary span { color: var(--muted); font-size: 10px; }
.admin-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.admin-summary > div { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.admin-summary strong { color: var(--blue); font-size: 17px; }
.admin-summary span { color: var(--muted); font-size: 10px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.admin-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.admin-card h3 { margin: 0 0 14px; font-size: 12px; letter-spacing: -.01em; }
.stack.compact { gap: 7px; }
.stack.compact label:not(:first-child) { margin-top: 4px; }
.stack.compact input, .stack.compact select { min-height: 37px; padding: 8px 10px; }
.stack.compact .button { margin-top: 5px; }
.wide { grid-column: 1 / -1; }
.license-create-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.full-row { grid-column: 1 / -1; }
.section-note { margin: -6px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.entitlement-fields { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.entitlement-heading { display: grid; gap: 4px; margin-bottom: 12px; }
.entitlement-heading strong { font-size: 11px; }
.entitlement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.entitlement-field { display: grid; align-content: start; gap: 6px; }
.entitlement-field > label { font-size: 10px; }
.entitlement-toggle { display: flex; align-items: center; gap: 8px; min-height: 37px; color: #45536a; font-size: 11px; }
.entitlement-toggle input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--blue); }
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.table-heading h3 { margin: 0 0 4px; }
.table-heading p { margin: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 10px; }
th { padding: 9px 8px; border-bottom: 1px solid var(--line); color: #7b8799; font-size: 9px; font-weight: 680; text-transform: uppercase; letter-spacing: .06em; }
td { padding: 10px 8px; border-bottom: 1px solid #eff2f6; color: #394861; white-space: nowrap; }
.empty-row { padding: 20px 8px; color: #8b96a7; text-align: center; white-space: normal; }
.actions-cell { display: flex; gap: 6px; }
.table-action { padding: 5px 8px; border: 0; border-radius: 6px; background: #f0f3fa; color: #44536e; font-size: 9px; font-weight: 650; }
.table-action.assign { background: #edf1ff; color: #2f51c7; }
.table-action.revoke { background: #fff0f0; color: #a53b45; }
.table-action.delete { background: #fff0f0; color: #a53b45; }
.table-action.activate { background: #e8f7f0; color: var(--green); }
.key-result { margin-top: 16px; padding: 15px; border: 1px solid #cfe7d9; border-radius: 9px; background: #f3fbf6; font-size: 11px; }
.key-result p { margin: 6px 0 12px; color: var(--muted); }
.key-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.key-copy-row code { min-width: 0; overflow-wrap: anywhere; color: #155a42; }
.message { margin-top: 14px; padding: 10px 12px; border-radius: 8px; font-size: 11px; }
.message.error { background: #fff0f0; color: var(--red); }
.message.success { background: #eaf7f0; color: var(--green); }
.message.loading { background: #f1f4fa; color: #56657e; }
footer { display: flex; justify-content: space-between; padding: 0 3px 28px; color: #8a95a6; font-size: 10px; }

@media (max-width: 700px) {
  .topbar { height: 66px; padding: 0 20px; }
  .topbar-actions { gap: 9px; }
  .secure-label { font-size: 10px; }
  .topbar-actions { gap: 9px; }
  .secure-label { font-size: 10px; }
  .shell { width: min(100% - 24px, 560px); }
  .intro { padding: 40px 3px 26px; }
  .intro-copy { font-size: 13px; }
  .view { padding: 23px 17px 26px; }
  .tabs { gap: 23px; padding: 0 18px; }
  .tab { min-height: 53px; font-size: 11px; }
  .input-row { flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-summary { gap: 6px; }
  .admin-summary > div { align-items: flex-start; flex-direction: column; gap: 3px; padding: 9px; }
  .entitlement-grid { grid-template-columns: 1fr; }
  .admin-summary { gap: 6px; }
  .admin-summary > div { align-items: flex-start; flex-direction: column; gap: 3px; padding: 9px; }
  .entitlement-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .license-create-grid { grid-template-columns: 1fr; }
  .full-row { grid-column: auto; }
  .details { grid-template-columns: 1fr; gap: 4px; }
  .details dd { margin-bottom: 7px; }
  footer { padding-bottom: 20px; }
}
