:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --subtle: #98a2b3;
  --line: #e3e8ef;
  --canvas: #f4f7fb;
  --surface: #ffffff;
  --brand: #5146e5;
  --brand-dark: #3e35c5;
  --brand-soft: #eeedff;
  --green: #16a66a;
  --green-soft: #e9f9f1;
  --amber: #d78600;
  --amber-soft: #fff6df;
  --red: #dc3b4b;
  --red-soft: #fff0f2;
  --shadow: 0 14px 40px rgba(18, 30, 61, .09);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 12%, rgba(114, 103, 255, .22), transparent 34%), radial-gradient(circle at 86% 86%, rgba(22, 166, 106, .12), transparent 30%), #11172a; }
.login-card { width: min(430px, 100%); padding: 34px; border: 1px solid rgba(255,255,255,.58); border-radius: 22px; background: rgba(255,255,255,.97); box-shadow: 0 28px 90px rgba(4,10,26,.34); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: 15px; }
.login-brand span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.login-card h1 { margin-bottom: 10px; font-size: 30px; }
.login-copy { margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.login-form { display: grid; gap: 14px; }
.login-form .button { width: 100%; margin-top: 2px; }
.login-error { margin: 0; padding: 10px 12px; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 11px; }
.login-note { margin: 18px 0 0; color: var(--subtle); font-size: 10px; line-height: 1.5; text-align: center; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; background: #11172a; color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, #7267ff, #4c42df); font-weight: 800; box-shadow: 0 10px 24px rgba(88, 75, 236, .35); }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand span { color: #aeb6cb; margin-top: 2px; font-size: 12px; }
.nav { display: grid; gap: 7px; }
.nav__item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 13px; border: 0; border-radius: 11px; background: transparent; color: #abb4cb; text-align: left; }
.nav__item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav__item.is-active { background: rgba(105, 94, 255, .19); color: #fff; box-shadow: inset 0 0 0 1px rgba(137, 128, 255, .2); }
.nav__icon { width: 20px; text-align: center; font-size: 18px; }
.sidebar__guard { margin-top: auto; display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; background: rgba(255,255,255,.04); }
.sidebar__guard strong, .sidebar__guard span { display: block; }
.sidebar__guard strong { font-size: 12px; }
.sidebar__guard span { margin-top: 3px; color: #96a1ba; font-size: 10px; line-height: 1.4; }
.status-dot { flex: none; width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; background: #38d996; box-shadow: 0 0 0 4px rgba(56,217,150,.12); }
.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 26px 32px 22px; }
.eyebrow { margin: 0 0 5px; color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 26px; letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -.03em; }
.topbar__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; }
.search { display: flex; align-items: center; gap: 8px; width: 280px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--subtle); }
.search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.button { min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; font-weight: 700; transition: .15s ease; }
.button:disabled { cursor: wait; opacity: .7; transform: none; }
.button--icon-label { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button__icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.button.is-loading .button__icon { animation: refresh-spin .75s linear infinite; }
.button--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(81,70,229,.2); }
.button--primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.button--secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button--secondary:hover { border-color: #c5ccda; background: #fafbfc; }
.button--danger { border-color: #facbd1; background: #fff; color: var(--red); }
.button--small { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 12px; }
.view { padding: 0 32px 40px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat, .panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: 0 3px 12px rgba(18,30,61,.03); }
.stat { padding: 20px; }
.stat__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--muted); font-size: 12px; font-weight: 700; }
.stat__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: 17px; }
.stat__value { font-size: 29px; font-weight: 800; letter-spacing: -.05em; }
.stat__foot { margin-top: 5px; color: var(--muted); font-size: 11px; }
.stat__foot strong { color: var(--green); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 16px; margin-top: 16px; }
.panel__header { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel__header h3 { margin: 0; font-size: 15px; }
.panel__header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.panel__body { padding: 18px 20px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 14px; background: #f8fafc; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { padding: 14px; border-top: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: #fbfcff; }
.entity { display: flex; align-items: center; gap: 11px; }
.entity__mark { display: grid; place-items: center; flex: none; width: 37px; height: 37px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; }
.entity strong, .entity span { display: block; }
.entity span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: capitalize; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--active { background: var(--green-soft); color: var(--green); }
.badge--trial { background: var(--amber-soft); color: var(--amber); }
.badge--paused { background: #eef1f6; color: #6b7280; }
.badge--expired { background: var(--red-soft); color: var(--red); }
.usage { min-width: 90px; }
.usage__label { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 10px; }
.usage__track { height: 6px; overflow: hidden; border-radius: 99px; background: #edf0f5; }
.usage__fill { height: 100%; border-radius: inherit; background: var(--brand); }
.actions { display: flex; gap: 7px; justify-content: flex-end; }
.activity { display: grid; gap: 16px; }
.activity__item { display: grid; grid-template-columns: 10px 1fr; gap: 11px; }
.activity__dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.activity strong { display: block; font-size: 12px; }
.activity span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); }
.dialog { width: min(680px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(8,16,35,.25); }
.dialog--compact { width: min(520px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(13,20,37,.58); backdrop-filter: blur(3px); }
.dialog__header, .dialog__footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 20px 22px; }
.dialog__header { border-bottom: 1px solid var(--line); }
.dialog__body { padding: 22px; }
.dialog__footer { justify-content: flex-end; border-top: 1px solid var(--line); background: #fafbfc; }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #f3f5f8; color: var(--muted); font-size: 21px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; color: #344054; font-size: 11px; font-weight: 700; }
.field--wide { grid-column: 1 / -1; }
.field input, .field select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #d7dce5; border-radius: 10px; outline: none; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus { border-color: #837af1; box-shadow: 0 0 0 3px rgba(81,70,229,.1); }
.entitlement-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 20px 0 16px; padding: 15px; border: 1px solid #dcd9ff; border-radius: 12px; background: #f8f7ff; }
.entitlement-card strong, .entitlement-card span { display: block; }
.entitlement-card strong { font-size: 13px; }
.entitlement-card span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.switch input { position: absolute; opacity: 0; }
.switch span { display: block; position: relative; width: 42px; height: 24px; border-radius: 99px; background: #cbd2df; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.stack { display: grid; gap: 16px; }
.callout { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--brand-soft); color: #4d478b; font-size: 11px; line-height: 1.55; }
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 20; display: grid; gap: 9px; }
.toast { min-width: 300px; padding: 13px 15px; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 11px; background: #fff; box-shadow: var(--shadow); font-size: 12px; animation: toast-in .2s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
@media (max-width: 1050px) { .stats { grid-template-columns: 1fr 1fr; } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; width: 100%; height: auto; } .nav { grid-template-columns: repeat(4, 1fr); } .nav__item { justify-content: center; font-size: 0; } .nav__icon { font-size: 18px; } .sidebar__guard { display: none; } .topbar { align-items: flex-start; padding: 20px; } .topbar__actions { align-items: stretch; flex-direction: column; } .search { width: 100%; } .view { padding: 0 20px 30px; } .stats { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } .field--wide { grid-column: auto; } }
