:root {
  --navy: #0a1d38;
  --navy-2: #132d50;
  --blue: #1768d5;
  --teal: #0b8c80;
  --gold: #c8932f;
  --red: #bd3434;
  --ink: #12243c;
  --muted: #627286;
  --line: #dbe3eb;
  --paper: #fff;
  --surface: #f3f6f9;
  --shadow: 0 22px 55px rgba(18, 36, 60, .1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 14px/1.55 Inter, "Segoe UI", Arial, sans-serif; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
a { color: inherit; }

.hub-auth { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: #e9eef4; }
.auth-shell { width: min(1080px, 100%); min-height: 650px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); border: 1px solid #cdd8e4; border-radius: 8px; background: #fff; box-shadow: 0 30px 90px rgba(10, 29, 56, .16); overflow: hidden; }
.auth-brand { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(42px, 7vw, 84px); background: var(--navy); color: #fff; }
.hub-mark { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 56px; border-radius: 6px; background: var(--gold); color: var(--navy); font-size: 18px; font-weight: 900; }
.auth-brand > span, .panel-head > span, .portal-login > span, .portal-welcome span, .section-title span, .console-head > div > span, .new-key span { color: var(--gold); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.auth-brand h1 { max-width: 580px; margin: 15px 0; font-size: clamp(37px, 5vw, 60px); line-height: 1.04; }
.auth-brand p { max-width: 540px; margin: 0; color: #bdccdc; font-size: 16px; line-height: 1.75; }
.auth-brand ul { margin: 44px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; color: #d8e3ef; font-size: 12px; font-weight: 700; }
.auth-brand li::before { content: "✓"; display: inline-grid; place-items: center; width: 21px; height: 21px; margin-inline-end: 9px; border-radius: 50%; background: rgba(11,140,128,.24); color: #55d1c2; }
.auth-brand > a { margin-top: 52px; color: #fff; font-size: 12px; font-weight: 800; text-decoration: none; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px, 5vw, 68px); }
.auth-panel.compact { max-width: 520px; }
.panel-head { margin-bottom: 30px; }
.panel-head h2 { margin: 10px 0 7px; font-size: 32px; line-height: 1.15; }
.panel-head p { margin: 0; color: var(--muted); }

.hub-form { display: grid; gap: 16px; }
.hub-form.grid-form, .hub-form.setup-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hub-form label { min-width: 0; display: grid; gap: 7px; color: #34475f; font-size: 11px; font-weight: 800; }
.hub-form label.wide, .hub-form .wide { grid-column: 1 / -1; }
.hub-form input, .hub-form select, .hub-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c9d5e1;
  border-radius: 6px;
  outline: none;
  padding: 10px 12px;
  background: #fbfcfd;
  color: var(--ink);
}
.hub-form textarea { resize: vertical; }
.hub-form input:focus, .hub-form select:focus, .hub-form textarea:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(23,104,213,.1); }
.hub-form label small { color: var(--muted); font-size: 10px; font-weight: 500; overflow-wrap: anywhere; }
.form-divider { display: flex; align-items: center; gap: 12px; margin: 10px 0; color: var(--gold); font-size: 9px; font-weight: 900; }
.form-divider::before, .form-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hub-btn { min-height: 48px; border: 0; border-radius: 6px; padding: 0 17px; cursor: pointer; font-weight: 800; }
.hub-btn.primary { display: flex; align-items: center; justify-content: space-between; background: var(--blue); color: #fff; box-shadow: 0 10px 22px rgba(23,104,213,.18); }
.hub-btn.primary:hover { background: #1159b9; }
.hub-btn.dark { background: var(--navy); color: #fff; }
.hub-alert { margin-bottom: 20px; border: 1px solid; border-radius: 6px; padding: 12px 14px; font-size: 12px; }
.hub-alert.success { border-color: #b8dfd7; background: #e7f6f3; color: #126b5f; }
.hub-alert.error { border-color: #f0c5c5; background: #fff0f0; color: #942b2b; }

.portal-head { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px clamp(20px, 5vw, 70px); border-bottom: 1px solid var(--line); background: #fff; }
.brand-inline { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-inline > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 5px; background: var(--gold); color: var(--navy); font-weight: 900; }
.portal-head nav { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.portal-head nav a { color: var(--blue); font-size: 12px; font-weight: 800; text-decoration: none; }
.portal-main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 90px; }
.purchase-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 42px; }
.purchase-hero { max-width: 800px; margin-bottom: 38px; }
.purchase-hero > span { color: var(--gold); font-size: 10px; font-weight: 900; }
.purchase-hero h1 { margin: 12px 0 14px; font-size: clamp(34px, 5vw, 58px); line-height: 1.06; }
.purchase-hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.purchase-alert { margin-bottom: 24px; }
.purchase-flow { display: grid; gap: 24px; }
.purchase-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.purchase-plan { min-width: 0; position: relative; cursor: pointer; }
.purchase-plan > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.plan-select { min-height: 250px; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 10px 30px rgba(18,36,60,.05); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.purchase-plan:hover .plan-select { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(18,36,60,.09); }
.purchase-plan > input:checked + .plan-select { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,104,213,.1), 0 18px 38px rgba(18,36,60,.09); }
.plan-select small { color: var(--gold); font-size: 9px; font-weight: 900; }
.plan-select strong { margin: 20px 0 5px; font-size: 24px; }
.plan-select em { color: var(--blue); font-size: 11px; font-style: normal; font-weight: 800; }
.plan-select p { margin: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.plan-select i { margin-top: auto; color: #5d7188; font-size: 10px; font-style: normal; overflow-wrap: anywhere; }
.purchase-form { padding: clamp(24px, 4vw, 42px); border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.purchase-consent { grid-template-columns: 18px minmax(0, 1fr) !important; align-items: flex-start; gap: 10px !important; font-weight: 600 !important; line-height: 1.55; }
.purchase-consent input { width: 17px !important; min-height: 17px !important; margin: 2px 0 0; }
.purchase-trap { width: 1px; height: 1px; position: absolute; overflow: hidden; clip-path: inset(50%); }
.purchase-footer { padding: 34px 0 8px; color: var(--muted); font-size: 10px; text-align: center; }
.portal-login { width: min(520px, 100%); margin: 6vh auto; padding: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.portal-login h1 { margin: 12px 0; font-size: 38px; line-height: 1.12; }
.portal-login > p { margin: 0 0 28px; color: var(--muted); line-height: 1.7; }
.portal-welcome { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.portal-welcome h1 { margin: 11px 0 8px; font-size: 42px; }
.portal-welcome p { margin: 0; color: var(--muted); }
.status { border-radius: 999px; padding: 8px 12px; font-size: 10px; }
.status.active { background: #ddf3ee; color: #087467; }
.status.suspended, .status.revoked { background: #fde9e9; color: #a82e2e; }
.portal-section { margin-top: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.portal-section .section-title { padding: 22px; border-bottom: 1px solid var(--line); }

.hub-console { min-height: 100vh; padding-inline-start: 240px; }
.hub-sidebar { width: 240px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 22px 15px; background: var(--navy); color: #fff; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 7px 24px; border-bottom: 1px solid rgba(255,255,255,.12); text-decoration: none; }
.sidebar-brand > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 5px; background: var(--gold); color: var(--navy); font-weight: 900; }
.sidebar-brand b, .sidebar-brand small { display: block; }
.sidebar-brand b { font-size: 14px; }
.sidebar-brand small { margin-top: 2px; color: #9fb2c8; font-size: 10px; }
.hub-sidebar nav { display: grid; gap: 5px; padding: 28px 0; }
.hub-sidebar nav a, .sidebar-foot a { min-height: 40px; display: flex; align-items: center; border-radius: 5px; padding: 0 12px; color: #b9c8d8; text-decoration: none; font-size: 12px; font-weight: 700; }
.hub-sidebar nav a:hover, .hub-sidebar nav a.active { background: #18395f; color: #fff; }
.hub-sidebar nav a.active { border-inline-start: 3px solid var(--gold); }
.sidebar-foot { margin-top: auto; display: grid; border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; }
.hub-main { width: min(1500px, 100%); padding: 28px clamp(22px, 4vw, 54px) 50px; }
.console-head { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.console-head h1 { margin: 7px 0 0; font-size: 30px; }
.vendor-chip { display: flex; align-items: center; gap: 10px; }
.vendor-chip > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #dfe9f4; color: var(--blue); font-style: normal; font-weight: 900; }
.vendor-chip b, .vendor-chip small { display: block; }
.vendor-chip small { color: var(--muted); font-size: 10px; }

.new-key { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 24px; border: 1px solid #c8ddda; border-inline-start: 4px solid var(--teal); border-radius: 6px; padding: 18px 20px; background: #eaf7f4; }
.new-key strong { display: block; margin: 6px 0 2px; color: #075c53; font: 800 18px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.new-key p { margin: 0; color: #54706c; font-size: 11px; }
.new-key button { flex: 0 0 auto; min-height: 38px; border: 1px solid #8fc7bf; border-radius: 5px; padding: 0 13px; background: #fff; color: #086d61; cursor: pointer; font-weight: 800; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric-grid article { min-width: 0; min-height: 126px; position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgba(18,36,60,.05); }
.metric-grid small, .metric-grid strong { display: block; }
.metric-grid small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.metric-grid strong { margin-top: 20px; font-size: 32px; line-height: 1; }
.metric-grid i { position: absolute; inset: 17px 17px auto auto; border-radius: 999px; padding: 4px 7px; background: #e8f4f2; color: var(--teal); font-size: 8px; font-style: normal; font-weight: 900; }
.portal-metrics article { min-height: 110px; }
.portal-metrics strong { font-size: 21px; line-height: 1.25; }
.console-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 22px; }
.console-panel { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 22px; background: #fff; box-shadow: 0 8px 24px rgba(18,36,60,.04); }
.console-panel.full { margin-bottom: 22px; padding: 0; overflow: hidden; }
.console-panel.full .section-title { padding: 21px 22px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-title h2 { margin: 6px 0 0; font-size: 19px; }
.section-title > small { color: var(--muted); font-size: 10px; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; white-space: nowrap; }
th { background: #f8fafc; color: #5e7086; font-size: 9px; font-weight: 900; text-transform: uppercase; }
td { font-size: 12px; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
td code { font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
.table-status { display: inline-block; border-radius: 999px; padding: 5px 8px; background: #e5f4f1; color: #087668; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.table-status.suspended, .table-status.revoked, .table-status.deactivated, .table-status.spam { background: #fbe7e7; color: #a42e2e; }
.table-status.pending { background: #fff3dc; color: #9a6500; }
.table-status.contacted { background: #e7effb; color: #225ca8; }
.request-message { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.inline-form { display: flex; gap: 6px; }
.inline-form select { width: 92px; min-height: 32px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 10px; }
.inline-form button, .text-btn { min-height: 32px; border: 0; border-radius: 4px; padding: 0 9px; background: var(--navy); color: #fff; cursor: pointer; font-size: 10px; font-weight: 800; }
.text-btn.danger { background: #fae8e8; color: var(--red); }
.empty { padding: 30px; color: var(--muted); text-align: center; }
.plan-list, .release-list { display: grid; gap: 9px; }
.plan-list article, .release-list article { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; }
.plan-list b, .plan-list small, .release-list b, .release-list small { display: block; }
.plan-list small, .release-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.plan-list article > span { border-radius: 999px; padding: 5px 8px; background: #eaf0f7; font-size: 9px; font-weight: 800; }
.release-list a { border-radius: 5px; padding: 7px 10px; background: var(--blue); color: #fff; text-decoration: none; font-size: 10px; font-weight: 800; }
.release-list code { color: var(--muted); font-size: 10px; }
.console-footer { padding-top: 26px; color: var(--muted); font-size: 10px; text-align: center; }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console-grid { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .purchase-plans { grid-template-columns: 1fr; }
  .auth-brand { min-height: 330px; padding: 45px; }
  .hub-mark { margin-bottom: 30px; }
  .auth-brand h1 { font-size: 40px; }
}
@media (max-width: 760px) {
  .hub-console { padding-inline-start: 0; }
  .hub-sidebar { width: 100%; height: auto; position: relative; }
  .hub-sidebar nav { grid-template-columns: repeat(3, 1fr); }
  .hub-sidebar nav a { justify-content: center; }
  .sidebar-foot { grid-template-columns: repeat(2, 1fr); }
  .hub-main { padding: 22px 16px 40px; }
  .hub-auth { padding: 14px; }
  .auth-brand, .auth-panel { padding: 30px 24px; }
  .auth-brand h1 { font-size: 33px; }
  .hub-form.grid-form, .hub-form.setup-form { grid-template-columns: 1fr; }
  .hub-form label.wide, .hub-form .wide { grid-column: auto; }
  .portal-welcome { flex-direction: column; }
  .portal-welcome h1 { font-size: 34px; }
}
@media (max-width: 520px) {
  .metric-grid { grid-template-columns: 1fr; }
  .console-head { align-items: flex-start; }
  .vendor-chip span { display: none; }
  .new-key { align-items: stretch; flex-direction: column; }
  .portal-login { padding: 28px 20px; }
  .purchase-main { width: min(100% - 28px, 1180px); padding-top: 42px; }
  .hub-sidebar nav { grid-template-columns: repeat(2, 1fr); }
  .portal-head nav { justify-content: flex-end; gap: 8px; }
  .portal-head nav a { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
