:root {
  --ink: #10233f;
  --muted: #6d7d91;
  --line: #e3e9f1;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --nav: #112844;
  --blue: #2463eb;
  --blue-dark: #1748b5;
  --orange: #ec7b2c;
  --green: #159766;
  --red: #d14b4b;
  --amber: #c88716;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 15%, #dceaff, transparent 32%), radial-gradient(circle at 90% 90%, #ffe5d1, transparent 28%), #f6f8fc; }
.login-card { width: min(440px, 100%); padding: 42px; border: 1px solid rgba(255,255,255,.8); border-radius: 26px; background: rgba(255,255,255,.92); box-shadow: 0 30px 90px rgba(24,50,84,.14); }
.brand-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: white; font-weight: 900; letter-spacing: -.05em; background: linear-gradient(145deg, var(--blue), var(--nav)); box-shadow: 0 12px 28px rgba(36,99,235,.3); }
.brand-mark.small { width: 42px; height: 42px; border-radius: 12px; box-shadow: none; }
.eyebrow { margin: 22px 0 7px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: 31px; letter-spacing: -.035em; }
h2 { margin-bottom: 6px; letter-spacing: -.025em; }
h3 { margin-bottom: 0; font-size: 18px; }
.muted { color: var(--muted); line-height: 1.6; }
.stack-form { display: grid; gap: 17px; margin-top: 28px; }
label { display: grid; gap: 7px; color: #32455e; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; color: var(--ink); background: #fbfcfe; outline: none; transition: .2s; }
input:focus, select:focus, textarea:focus { border-color: #80a8fa; box-shadow: 0 0 0 4px rgba(36,99,235,.1); background: white; }
textarea { resize: vertical; }
.button { border: 0; border-radius: 11px; padding: 11px 16px; font-weight: 800; transition: .18s; }
.button.primary { color: white; background: var(--blue); box-shadow: 0 8px 20px rgba(36,99,235,.2); }
.button.primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.button.secondary { color: var(--ink); background: #edf2f8; box-shadow: none; }
.form-error { margin: 0; padding: 10px 12px; color: #a83333; background: #fff0f0; border: 1px solid #ffd4d4; border-radius: 9px; font-size: 13px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; display: flex; flex-direction: column; color: white; background: var(--nav); }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-row div { display: grid; }
.brand-row small { margin-top: 2px; color: #8fa4bd; }
nav { display: grid; gap: 5px; }
nav button { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 0; border-radius: 10px; color: #b9c8d9; background: transparent; text-align: left; font-weight: 700; }
nav button:hover, nav button.active { color: white; background: rgba(255,255,255,.1); }
nav button span { width: 20px; text-align: center; color: #7ca7ff; font-size: 18px; }
.sidebar-footer { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.admin-identity { display: grid; gap: 2px; margin-bottom: 8px; font-size: 13px; }
.admin-identity small { color: #91a5bc; }
.text-button { padding: 4px 0; border: 0; color: var(--blue); background: transparent; font-weight: 800; }
.sidebar .text-button { color: #a8bdd5; font-size: 12px; }
.content-shell { min-width: 0; padding: 34px 38px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 26px; }
.topbar .eyebrow { margin: 0 0 5px; }
.topbar h2 { font-size: 28px; }
.notice { position: fixed; right: 30px; top: 28px; z-index: 30; max-width: 440px; padding: 14px 18px; border-radius: 12px; color: white; background: var(--green); box-shadow: 0 18px 45px rgba(16,35,63,.2); }
.notice.error { background: var(--red); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.metric { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 24px rgba(30,52,78,.04); }
.metric .label { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { display: block; margin-top: 10px; font-size: 29px; letter-spacing: -.035em; }
.metric small { display: block; margin-top: 4px; color: var(--muted); }
.panel-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 8px 24px rgba(30,52,78,.035); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-heading .eyebrow { margin: 0 0 5px; }
.table-panel { min-height: 230px; }
.toolbar { display: flex; gap: 12px; margin-bottom: 14px; }
.toolbar input { flex: 1; }
.toolbar select { width: 200px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 16px; color: var(--muted); background: #f8fafc; font-size: 11px; letter-spacing: .06em; text-align: left; }
td { padding: 13px 16px; border-top: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
tr[data-open] { cursor: pointer; }
tr[data-open]:hover td { background: #f8fbff; }
.entity-name { display: grid; gap: 3px; }
.entity-name strong { font-size: 13px; }
.entity-name small { color: var(--muted); }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; background: #eaf0f7; color: #53667b; }
.badge.active, .badge.paid { color: #0e7c50; background: #e7f8f0; }
.badge.trial, .badge.grace, .badge.warning { color: #9a6507; background: #fff3d9; }
.badge.suspended, .badge.cancelled, .badge.critical, .badge.revoked, .badge.expired { color: #b43838; background: #ffebeb; }
.badge.published { color: #0e7c50; background: #e7f8f0; }
.badge.draft { color: #53667b; background: #eaf0f7; }
.badge.paused { color: #9a6507; background: #fff3d9; }
.badge.withdrawn { color: #b43838; background: #ffebeb; }
.empty { padding: 38px 20px; color: var(--muted); text-align: center; }
.modal { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 20px; border: 0; background: rgba(13,30,51,.55); }
.modal[open] { display: grid; place-items: center; }
.modal::backdrop { background: transparent; }
.modal-card { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; border-radius: 20px; background: white; box-shadow: 0 30px 100px rgba(10,28,50,.3); }
.modal-card.wide { width: min(760px, 100%); }
.modal-card.extra-wide { width: min(980px, 100%); }
.modal-card > .eyebrow { margin-top: 0; }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.modal-heading .eyebrow { margin-top: 0; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 10px; color: #61738a; background: #edf2f7; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full-field { grid-column: 1 / -1; }
.check-row { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.check-row input { width: auto; }
.check-row.compact { align-self: end; margin: 0 0 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.warning-copy { padding: 10px 12px; color: #855b13; border-radius: 10px; background: #fff4dd; }
.credential-box { display: grid; gap: 10px; margin: 16px 0; padding: 17px; border: 1px dashed #9bb4d2; border-radius: 12px; background: #f7faff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; }
.credential-box div { display: grid; gap: 3px; }
.credential-box span { color: var(--muted); font-family: Inter, sans-serif; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 12px 0 20px; }
.detail-item { padding: 13px; border-radius: 11px; background: #f5f8fc; }
.detail-item small { display: block; color: var(--muted); margin-bottom: 5px; }
.section-title { margin: 22px 0 10px; font-size: 14px; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.feature-chip { padding: 6px 9px; border-radius: 8px; color: #245044; background: #e9f7f2; font-size: 11px; font-weight: 800; }
.feature-chip { border: 0; }
.feature-chip.off { color: #7d8795; background: #edf0f4; }
.feature-chip.limit { color: #315a9e; background: #eaf1ff; }
.client-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.action-link { border: 0; color: var(--blue); background: transparent; font-weight: 800; }
.release-help { padding: 14px 22px; color: #665020; background: #fff8e8; border-bottom: 1px solid #f3e4bc; font-size: 12px; line-height: 1.6; }
.release-actions { display: flex; flex-wrap: wrap; gap: 7px; }
@media (max-width: 1000px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } .panel-grid { grid-template-columns: 1fr; } .detail-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 720px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; padding: 15px; } .sidebar nav { grid-template-columns: repeat(5, 1fr); } nav button { justify-content: center; font-size: 0; } .brand-row { padding-bottom: 14px; } .sidebar-footer { display: none; } .content-shell { padding: 24px 15px 45px; } .topbar { align-items: flex-start; } .metrics-grid { grid-template-columns: 1fr 1fr; } .form-grid { grid-template-columns: 1fr; } .full-field { grid-column: auto; } .toolbar { flex-direction: column; } .toolbar select { width: 100%; } .table-panel { overflow-x: auto; } table { min-width: 680px; } }
