@font-face {
  font-family: "Baloo Paaji 2";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/baloo-paaji-2-400.woff2") format("woff2");
}

@font-face {
  font-family: "Baloo Paaji 2";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/baloo-paaji-2-600.woff2") format("woff2");
}

@font-face {
  font-family: "Baloo Paaji 2";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/baloo-paaji-2-700.woff2") format("woff2");
}

@font-face {
  font-family: "Baloo Paaji 2";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/baloo-paaji-2-800.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --primary: #252c65;
  --primary-2: #39427f;
  --primary-soft: #edf0ff;
  --coral: #ef494f;
  --coral-dark: #d83b42;
  --green: #12994c;
  --green-soft: #e8f7ee;
  --ink: #111827;
  --muted: #667085;
  --line: #dfe2e8;
  --surface: #f5f5f5;
  --panel: #ffffff;
  --accent: #252c65;
  --accent-strong: #39427f;
  --warm: #ef494f;
  --bg: #f5f5f5;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    "Baloo Paaji 2", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(15, 23, 42, 0.56), rgba(30, 41, 59, 0.7)),
    url("/assets/starbase-bg.png") center / cover fixed,
    #111827;
  color: var(--ink);
}

.muted {
  color: var(--muted);
}

.shell {
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  width: min(440px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 28px 0;
}

.brand {
  margin-bottom: 24px;
}

.portal-brand {
  display: grid;
  justify-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.portal-mark {
  width: 106px;
  height: 106px;
  object-fit: cover;
  border-radius: 999px;
  margin: -72px 0 16px;
  box-shadow:
    0 16px 42px rgba(20, 28, 45, 0.22),
    0 0 0 8px rgba(255, 255, 255, 0.86);
}

.eyebrow {
  margin: 0 0 8px;
  color: #4f46e5;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portal-brand h1 {
  margin: 0;
  color: #3730a3;
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

body[data-flow-mode="buy"] .portal-brand h1 {
  font-size: 1.5rem;
}

.brand-subline {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 28px 72px rgba(6, 12, 24, 0.36);
  margin-top: 64px;
  padding: 34px 32px 28px;
  backdrop-filter: blur(10px);
}

.context-card {
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 8px;
  background: #eef2ff;
  margin-bottom: 16px;
  padding: 14px;
}

.context-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.context-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
}

.context-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.flow-steps[hidden] {
  display: none;
}

.flow-steps li {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #7b8794;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.flow-steps li::after {
  content: "";
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: #dfe6ee;
  grid-row: 1;
  grid-column: 1;
  align-self: center;
}

.flow-steps li span {
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 3px solid #dfe6ee;
  border-radius: 50%;
  background: #fff;
  color: #697586;
  grid-row: 1;
  grid-column: 1;
}

.flow-steps li.active,
.flow-steps li.complete {
  color: #1e3a8a;
}

.flow-steps li.active::after,
.flow-steps li.complete::after {
  background: #2563eb;
}

.flow-steps li.active span,
.flow-steps li.complete span {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.section-title {
  margin: 0 0 14px;
  color: #273244;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 18px;
  border-bottom: 1px solid #e5edf2;
}

.login-tabs button {
  min-height: 58px;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #6a7580;
  box-shadow: none;
  border-bottom: 3px solid transparent;
  padding: 0 10px;
}

.login-tabs button:hover,
.login-tabs button.active {
  background: #eef2ff;
  color: #4338ca;
  border-bottom-color: #6366f1;
}

.hotspot-actions {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.existing-user-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  flex-wrap: wrap;
}

.existing-user-actions a {
  color: var(--primary);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border: 2px solid #6366f1;
  border-radius: 8px;
  color: #4338ca;
  background: #fff;
  font-weight: 900;
  padding: 0 18px;
  text-decoration: none;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  background: #eef2ff;
  outline: none;
}

.receipt-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
}

.packages {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.package-select-field {
  gap: 7px;
}

.package-select-field span {
  color: #2e3a4b;
  font-size: 0.92rem;
  font-weight: 850;
}

.package-select {
  color: #172554;
  font-weight: 800;
  overflow: hidden;
  padding-right: 42px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-summary {
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  background: #f8faff;
  padding: 11px 13px;
  text-align: left;
}

.package-summary strong,
.package-summary span,
.package-summary b {
  display: block;
}

.package-summary strong {
  color: #1e293b;
  font-size: 1rem;
  line-height: 1.25;
}

.package-summary span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.package-summary b {
  margin-top: 7px;
}

.empty-packages {
  grid-column: 1 / -1;
  min-height: 96px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 14px;
  color: var(--muted);
  display: grid;
  align-content: center;
  gap: 4px;
}

.empty-packages strong {
  color: var(--text);
}

.price {
  font-weight: 900;
  color: #2563eb;
}

.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.order-summary[hidden] {
  display: none;
}

.order-summary-label {
  grid-column: 1 / -1;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.order-summary-details strong,
.order-summary-details span {
  display: block;
}

.order-summary-details span {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

.order-summary-total {
  color: #1d4ed8;
  font-size: 1.05rem;
  white-space: nowrap;
}

.consent-field {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: #526071;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.45;
}

.consent-field input {
  width: 20px;
  min-height: 20px;
  margin: 1px 0 0;
  accent-color: #2563eb;
}

.card-details {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  background: #f8faff;
  padding: 14px;
}

.card-details[hidden] {
  display: none;
}

.card-details legend {
  color: #3730a3;
  font-size: 0.86rem;
  font-weight: 900;
  padding: 0 6px;
}

.card-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.55fr);
  gap: 10px;
}

.voucher-login {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

label {
  display: grid;
  gap: 7px;
  color: #2e3a4b;
  font-size: 0.92rem;
  font-weight: 850;
  text-align: left;
}

input,
select {
  width: 100%;
  min-height: 56px;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  background: #fff;
  padding: 0 16px;
  color: var(--ink);
  font: inherit;
}

textarea,
.code-output {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  font:
    0.86rem ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    monospace;
}

.code-output {
  min-height: 180px;
  margin: 14px 0 0;
  overflow-x: auto;
  padding: 14px;
  white-space: pre-wrap;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #6366f1;
  outline: 3px solid rgba(99, 102, 241, 0.16);
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0 18px;
  box-shadow: none;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

#login-submit-button,
#pay-button,
.voucher > button {
  min-height: 56px;
  background: #2563eb;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.24);
}

#login-submit-button:hover,
#pay-button:hover,
.voucher > button:hover {
  background: #1d4ed8;
}

.message,
.card-challenge,
.voucher {
  margin-top: 16px;
  border-radius: 8px;
  border: 1px solid #dce4ec;
  padding: 14px;
  background: #fff;
  line-height: 1.45;
}

.message {
  font-weight: 800;
}

.message[data-kind="attention"],
.message[data-kind="info"] {
  border: 2px solid #dc2626;
  background: #fff1f2;
  color: #b91c1c;
  font-weight: 900;
}

.message[data-kind="success"] {
  border-color: rgba(22, 163, 74, 0.28);
  background: #f0fdf4;
  color: #14532d;
}

.message[data-kind="error"] {
  border: 2px solid #be123c;
  background: #fff1f2;
  color: #881337;
  font-weight: 900;
}

.card-challenge {
  border-color: rgba(37, 99, 235, 0.26);
  background: #f8faff;
}

.card-challenge h3 {
  margin: 0 0 8px;
  color: #172554;
  font-size: 1rem;
}

.card-challenge-frame {
  min-height: 420px;
  margin-top: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  overflow: auto;
}

.card-challenge-frame iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
}

.voucher {
  border-color: rgba(99, 102, 241, 0.24);
  background: #f5f7ff;
}

.voucher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.voucher-grid div {
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.voucher-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.voucher-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.receipt-page {
  background: #f3f6f8;
}

.receipt-shell {
  width: min(860px, calc(100% - 32px));
  margin: 32px auto;
}

.receipt-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.receipt-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.receipt-toolbar h1 {
  margin: 0;
  font-size: 2rem;
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.receipt-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.receipt-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.receipt-table th,
.receipt-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

.receipt-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.receipt-note {
  color: var(--muted);
  line-height: 1.5;
}

.connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  background: var(--warm);
  color: #2b2110;
  font-weight: 900;
  padding: 0 16px;
  text-decoration: none;
}

.admin-page {
  min-height: 100vh;
  background: #f3f6f8;
}

.operator-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #eef2f6;
}

.operator-login-card {
  width: min(460px, 100%);
  display: grid;
  gap: 18px;
  border: 1px solid #d8e1ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(21, 37, 58, 0.14);
  padding: 32px;
}

.operator-login-card > p {
  margin: 0;
  color: #5b6877;
  line-height: 1.5;
}

.operator-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.operator-login-brand h1 {
  margin: 0;
  color: #203141;
  font-size: 1.45rem;
}

.operator-login-brand .eyebrow {
  margin-bottom: 4px;
  color: #0f766e;
}

.admin-console {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: #35465d;
  color: #eef4f5;
  box-shadow: 10px 0 28px rgba(26, 35, 48, 0.12);
}

.sidebar-brand {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: #2f3f55;
  font-size: 1.28rem;
  font-weight: 850;
}

.sidebar-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #75b843;
  color: #132114;
  font-size: 0.8rem;
  font-weight: 900;
}

.mobile-nav-toggle {
  display: none;
}

.side-nav {
  display: grid;
  gap: 3px;
  padding: 10px 0 20px;
}

.side-item,
.side-group-toggle,
.side-subnav button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e8eff2;
  font-weight: 650;
  text-align: left;
  padding: 0 18px;
}

.side-group-toggle {
  justify-content: flex-start;
}

.side-group-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid #bac8d0;
  border-bottom: 2px solid #bac8d0;
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.side-group.open .side-group-toggle::after {
  transform: rotate(45deg);
}

.side-item:hover,
.side-group-toggle:hover,
.side-subnav button:hover,
.side-item.active,
.side-subnav button.active {
  background: #26384d;
  color: #ffffff;
}

.side-item.active,
.side-subnav button.active {
  box-shadow: inset 4px 0 0 #25b7aa;
}

.side-icon {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  color: #c8f0eb;
  font-size: 0.68rem;
  font-weight: 900;
}

.side-subnav {
  display: none;
  padding-bottom: 5px;
}

.side-group.open .side-subnav {
  display: grid;
}

.side-subnav button {
  min-height: 34px;
  color: #d6e2e7;
  font-size: 0.9rem;
  padding-left: 50px;
}

.admin-content {
  min-width: 0;
  padding: 28px 32px 42px;
}

.admin-topbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(520px, 1.25fr);
  align-items: end;
  gap: 20px;
  margin-bottom: 16px;
}

.operator-toolbar {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 16px;
}

.operator-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid #d9e1e8;
  padding-left: 16px;
}

.operator-profile div {
  min-width: 120px;
  display: grid;
  gap: 3px;
}

.operator-profile strong,
.operator-profile span {
  display: block;
}

.operator-profile span {
  color: #657384;
  font-size: 0.78rem;
  text-transform: capitalize;
}

.secondary-button {
  background: #e7edf2;
  color: #203141;
}

.secondary-button:hover {
  background: #d8e2ea;
}

.admin-title h1 {
  font-size: 2rem;
  line-height: 1;
}

.admin-access {
  justify-self: end;
  width: min(720px, 100%);
}

.admin-form {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(160px, 0.6fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-form.wide,
.package-form,
.router-form,
.operator-form,
.onboarding-form {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.wide-field {
  grid-column: span 2;
}

.admin-message {
  margin: 0 0 16px;
}

.admin-section {
  display: none;
  background: #ffffff;
  border: 1px solid #dde5e9;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(33, 44, 58, 0.06);
  padding: 18px;
}

.admin-section.active {
  display: block;
}

.admin-section h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.section-toolbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e2eaee;
  padding-bottom: 12px;
}

.toolbar-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.toolbar-controls label {
  min-width: 140px;
}

.admin-workspace {
  display: grid;
  gap: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.control-tower {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.3fr);
  gap: 14px 24px;
  margin-bottom: 18px;
  border-bottom: 1px solid #dde5e9;
  padding-bottom: 18px;
}

.section-intro h2,
.section-intro h3 {
  margin: 0;
  color: #203141;
  font-size: 1rem;
}

.section-intro p {
  margin: 6px 0 0;
  color: #64727c;
  line-height: 1.45;
}

.global-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.global-search-form input {
  min-height: 48px;
}

.search-results {
  grid-column: 1 / -1;
  border: 1px solid #d8e2e8;
  background: #f9fbfb;
}

.search-result-count {
  margin: 0;
  border-bottom: 1px solid #d8e2e8;
  padding: 10px 12px;
  color: #536476;
  font-size: 0.82rem;
  font-weight: 800;
}

.search-result-list {
  display: grid;
}

.search-result-item {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid #e1e8ec;
  border-radius: 0;
  background: #fff;
  color: #203141;
  padding: 10px 12px;
  text-align: left;
}

button.search-result-item:hover {
  background: #edf7f6;
}

.search-result-item:last-child {
  border-bottom: 0;
}

.search-result-item > div {
  min-width: 0;
}

.search-result-item > div:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.search-result-secondary,
.search-result-time {
  display: block;
  margin-top: 3px;
  color: #657384;
  font-size: 0.78rem;
  font-weight: 600;
}

.search-result-status {
  color: #324659;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill {
  border: 1px solid #b8d9d5;
  background: #e8f6f4;
  color: #116158;
  padding: 4px 7px;
  font-size: 0.72rem;
  font-weight: 850;
}

.muted-text {
  color: #657384;
  font-size: 0.78rem;
  font-weight: 700;
}

.topology-workspace {
  display: grid;
  gap: 28px;
}

.topology-band {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid #dde5e9;
  padding-bottom: 24px;
}

.topology-band:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-card {
  min-height: 98px;
  border: 1px solid #dde5e9;
  border-radius: 8px;
  background: #f9fbfb;
  padding: 15px;
}

.summary-card span {
  display: block;
  color: #64727c;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 10px;
  color: #203141;
  font-size: 2rem;
  line-height: 1;
}

.admin-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-split > div {
  border: 1px solid #dde5e9;
  border-radius: 8px;
  padding: 14px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.analytics-panel {
  min-width: 0;
  border: 1px solid #dde5e9;
  border-radius: 8px;
  padding: 14px;
}

.analytics-panel h3 {
  margin: 0 0 12px;
  font-size: 0.96rem;
}

.bar-chart {
  min-height: 210px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  align-items: end;
  gap: 6px;
  padding-top: 8px;
}

.bar-item {
  min-width: 0;
  height: 190px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
}

.bar-item span {
  align-self: end;
  display: block;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  background: #25b7aa;
}

.bar-item small {
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
  writing-mode: vertical-rl;
}

.compact-table table {
  min-width: 520px;
}

.stat-list {
  display: grid;
  grid-template-columns: minmax(120px, 0.3fr) 1fr;
  gap: 8px 12px;
  margin: 0;
}

.stat-list.compact {
  grid-template-columns: minmax(110px, 0.45fr) 1fr;
}

.stat-list dt {
  color: var(--muted);
  font-weight: 800;
}

.stat-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.session-table-wrap {
  margin-top: 12px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.88rem;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  overflow-wrap: anywhere;
}

tr:last-child td {
  border-bottom: 0;
}

tr[data-severity="critical"] td:first-child {
  border-left: 4px solid #c2410c;
}

tr[data-severity="warning"] td:first-child {
  border-left: 4px solid #ca8a04;
}

tr[data-severity="notice"] td:first-child {
  border-left: 4px solid #2563eb;
}

tr[data-severity="pass"] td:first-child {
  border-left: 4px solid #15803d;
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  width: auto;
  margin: 0 6px 6px 0;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  text-decoration: none;
}

.table-action.secondary {
  background: #eef3f5;
  color: #203141;
  box-shadow: none;
}

.button-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 14px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.button-link.secondary {
  border: 1px solid #cfdbe2;
  background: #eef3f5;
  color: #203141;
}

.timeline-dialog {
  width: min(860px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  border: 1px solid #cbd8df;
  border-radius: 8px;
  background: #fff;
  color: #203141;
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}

.timeline-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #dce5ea;
  background: #fff;
  padding: 18px 20px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.icon-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cfdbe2;
  border-radius: 6px;
  background: #f3f6f8;
  color: #203141;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
}

.icon-button:hover {
  background: #e3ebef;
}

.timeline-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid #dce5ea;
  padding: 10px 20px;
}

.timeline-summary > div {
  min-width: 0;
}

.timeline-summary dt,
.timeline-summary dd {
  display: inline;
  margin: 0;
}

.timeline-summary dt {
  color: #657384;
  font-size: 0.76rem;
  font-weight: 800;
}

.timeline-summary dd {
  margin-left: 7px;
  color: #203141;
  font-size: 0.82rem;
  font-weight: 800;
}

.support-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-bottom: 1px solid #dce5ea;
  background: #f8fafb;
  padding: 18px 20px;
}

.support-form input,
.support-form select {
  min-height: 44px;
}

.support-note-field {
  grid-column: 1 / -1;
}

.support-note-field textarea {
  min-height: 84px;
  resize: vertical;
  padding: 12px;
  font-family: inherit;
}

.support-form > button {
  grid-column: 1 / -1;
  justify-self: end;
}

.payment-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 18px 20px 24px;
  list-style: none;
}

.payment-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  min-height: 68px;
}

.payment-timeline li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: -2px;
  left: 6px;
  width: 2px;
  background: #cfdce3;
}

.timeline-marker {
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0f766e;
  box-shadow: 0 0 0 1px #0f766e;
}

.payment-timeline li > div > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.payment-timeline time,
.timeline-actor {
  color: #657384;
  font-size: 0.74rem;
}

.payment-timeline p {
  margin: 5px 0 0;
  color: #425466;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 560px);
    padding: 28px 0;
  }

  .admin-console {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: sticky;
    z-index: 20;
    height: auto;
    overflow: visible;
  }

  .sidebar-brand {
    min-height: 56px;
  }

  .mobile-nav-toggle {
    width: 40px;
    height: 40px;
    min-height: 40px;
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    padding: 0;
    font-size: 1.35rem;
  }

  .mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .side-nav {
    display: none;
    max-height: 52vh;
    overflow-y: auto;
  }

  .admin-sidebar.nav-open .side-nav {
    display: grid;
  }

  .admin-content {
    padding: 18px 12px 28px;
  }

  .admin-topbar,
  .summary-grid,
  .admin-split,
  .analytics-grid,
  .control-tower,
  .timeline-summary,
  .support-form {
    grid-template-columns: 1fr;
  }

  .global-search-form {
    grid-template-columns: 1fr;
  }

  .search-result-item {
    grid-template-columns: 1fr;
  }

  .search-result-item > div:last-child {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .timeline-dialog {
    width: calc(100% - 16px);
    max-height: calc(100vh - 16px);
  }

  .dialog-header,
  .timeline-summary,
  .support-form,
  .payment-timeline {
    padding-left: 14px;
    padding-right: 14px;
  }

  .support-form > button {
    justify-self: stretch;
  }

  .admin-access {
    justify-self: stretch;
  }

  .operator-toolbar,
  .operator-profile {
    width: 100%;
    align-items: stretch;
  }

  .operator-toolbar {
    flex-direction: column;
  }

  .operator-profile {
    justify-content: space-between;
    border-left: 0;
    border-top: 1px solid #d9e1e8;
    padding: 12px 0 0;
  }

  .packages,
  .form,
  .card-details-grid,
  .voucher-login,
  .admin-form,
  .admin-form.wide,
  .package-form,
  .router-form,
  .operator-form,
  .onboarding-form,
  .voucher-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-controls {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .wide-field {
    grid-column: auto;
  }

  .package {
    min-height: 116px;
  }

  button {
    width: 100%;
  }

  .table-action {
    width: auto;
  }

  .receipt-toolbar,
  .receipt-grid {
    grid-template-columns: 1fr;
  }

  .receipt-toolbar {
    display: grid;
  }

  .receipt-table {
    min-width: 0;
  }
}

@media (min-width: 761px) and (max-width: 1160px) {
  .admin-console {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-topbar,
  .summary-grid,
  .admin-split,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .admin-access {
    justify-self: stretch;
  }

  .admin-form.wide,
  .package-form,
  .router-form,
  .operator-form,
  .onboarding-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Manager workflow */
.context-notice {
  margin: 0 0 14px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
}

.context-notice[data-kind="neutral"] {
  border-left-color: #98a2b3;
  background: #f2f4f7;
  color: var(--muted);
}

.management-panel {
  scroll-margin-top: 96px;
  border-bottom: 1px solid var(--line);
  background: #f8f9fb;
  padding: 16px;
}

.management-panel-header,
.location-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.management-panel-header h3,
.location-workspace-header h3 {
  margin: 2px 0 0;
  font-size: 1.18rem;
}

.field-help,
.table-subtext {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.35;
}

.table-actions {
  min-width: 180px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.table-actions .table-action {
  margin: 0;
}

.section-toolbar > button,
.table-action,
.button-link,
.wizard-footer button {
  white-space: nowrap;
}

.admin-page input::placeholder,
.admin-page textarea::placeholder {
  color: #98a2b3;
  font-weight: 400;
  opacity: 1;
}

.status-pill[data-tone="neutral"] {
  border-color: #d0d5dd;
  background: #f2f4f7;
  color: #475467;
}

.status-pill[data-tone="warning"] {
  border-color: #f5d58b;
  background: #fff8e5;
  color: #8a5700;
}

.status-pill[data-tone="danger"] {
  border-color: #f2b8bb;
  background: #fff0f1;
  color: #a4262c;
}

.inventory-disclosure,
.advanced-settings {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.inventory-disclosure summary,
.advanced-settings summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
}

.inventory-disclosure .table-wrap {
  margin-top: 12px;
}

.advanced-settings {
  grid-column: 1 / -1;
  margin: 2px 0 0;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.location-workspace {
  scroll-margin-top: 96px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--coral);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.location-workspace-header {
  margin-bottom: 14px;
}

.location-workspace-header p:last-child {
  margin: 4px 0 0;
  color: var(--muted);
}

.readiness-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.readiness-item {
  min-width: 0;
  display: grid;
  gap: 2px;
  background: #fff;
  padding: 11px 12px;
}

.readiness-item[data-ready="true"] {
  box-shadow: inset 0 3px 0 var(--green);
}

.readiness-item[data-ready="false"] {
  box-shadow: inset 0 3px 0 #f2b84b;
}

.readiness-item strong,
.readiness-item small {
  overflow-wrap: anywhere;
}

.readiness-item small,
.readiness-state {
  color: var(--muted);
  font-size: 0.72rem;
}

.readiness-state {
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
}

.readiness-item[data-ready="false"] .readiness-state {
  color: #8a5700;
}

.workspace-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  margin: 16px 0 0;
  border-bottom: 1px solid var(--line);
}

.workspace-tabs button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
}

.workspace-tabs button.active {
  border-bottom-color: var(--coral);
  color: var(--primary);
}

.workspace-content {
  min-height: 170px;
  padding-top: 16px;
}

.workspace-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.workspace-metric {
  min-width: 0;
  border-left: 3px solid var(--primary);
  background: #f8f9fb;
  padding: 12px;
}

.workspace-metric span,
.workspace-metric small {
  display: block;
  color: var(--muted);
}

.workspace-metric strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.workspace-next-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.workspace-next-actions h4 {
  width: 100%;
  margin: 0 0 2px;
  color: var(--primary);
}

.workspace-list {
  display: grid;
  gap: 8px;
}

.workspace-list article {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1fr) minmax(180px, 1.2fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 4px;
}

.workspace-list article:last-child {
  border-bottom: 0;
}

.workspace-list span,
.workspace-list small {
  color: var(--muted);
}

.workspace-empty {
  max-width: 640px;
}

.workspace-empty h4 {
  margin: 0;
  color: var(--primary);
}

.workspace-empty .table-action {
  margin: 4px 6px 0 0;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-item {
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
}

.review-item span,
.review-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.review-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.setup-wizard-dialog {
  width: min(960px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0;
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.26);
}

.setup-wizard-dialog::backdrop {
  background: rgba(17, 24, 39, 0.58);
}

.setup-wizard-dialog form {
  display: grid;
  grid-template-rows: auto auto minmax(280px, 1fr) auto auto;
  max-height: calc(100vh - 32px);
}

.wizard-header {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 14px;
}

.wizard-header h2 {
  margin: 2px 0;
  color: var(--primary);
  font-size: 1.35rem;
}

.wizard-header p:last-child {
  margin: 0;
  color: var(--muted);
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  list-style: none;
  padding: 0 20px;
}

.wizard-steps li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  padding: 11px 6px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.wizard-steps li span {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #b8bfca;
  border-radius: 50%;
  font-size: 0.7rem;
}

.wizard-steps li.active {
  border-bottom-color: var(--coral);
  color: var(--primary);
}

.wizard-steps li.complete span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.wizard-body {
  overflow-y: auto;
  padding: 20px;
}

.wizard-step {
  animation: wizard-step-in 140ms ease-out;
}

@keyframes wizard-step-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 9px;
}

.toggle-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

.wizard-fieldset {
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px 14px;
}

.wizard-fieldset legend {
  color: var(--primary);
  font-weight: 800;
  padding: 0 6px;
}

.verification-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.verification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 11px;
}

.verification-state {
  min-width: 54px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.verification-item[data-ready="false"] .verification-state {
  color: #8a5700;
}

.verification-item strong,
.verification-item small {
  display: block;
}

.verification-item small {
  margin-top: 2px;
  color: var(--muted);
}

#location-wizard-message {
  margin: 0 20px 12px;
}

.wizard-footer {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #f8f9fb;
  padding: 12px 20px;
}

.wizard-footer span {
  margin-right: auto;
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 980px) {
  .readiness-strip,
  .workspace-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advanced-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-list article {
    grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1fr);
  }
}

@media (max-width: 760px) {
  .management-panel-header,
  .location-workspace-header {
    align-items: center;
  }

  .management-panel,
  .location-workspace {
    padding: 14px;
  }

  .advanced-grid,
  .wizard-grid,
  .verification-list,
  .review-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wizard-grid .wide-field {
    grid-column: auto;
  }

  .wizard-steps {
    padding: 0 10px;
  }

  .wizard-steps li {
    justify-content: center;
    padding-left: 2px;
    padding-right: 2px;
    font-size: 0;
  }

  .wizard-steps li span {
    font-size: 0.7rem;
  }

  .wizard-body,
  .wizard-header,
  .wizard-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  #location-wizard-message {
    margin-left: 14px;
    margin-right: 14px;
  }

  .wizard-footer {
    flex-wrap: wrap;
  }

  .wizard-footer span {
    width: 100%;
    order: -1;
  }

  .workspace-list article,
  .readiness-strip,
  .workspace-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  body {
    background: #fff;
  }

  .receipt-shell {
    width: 100%;
    margin: 0;
  }

  .receipt-card {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  #print-button {
    display: none;
  }
}

/* MariLink-aligned product theme */
html {
  scroll-behavior: smooth;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

body:not(.admin-page):not(.receipt-page) {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--surface);
}

::selection {
  background: var(--primary-2);
  color: #fff;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
}

.portal-header-brand,
.portal-trust {
  display: flex;
  align-items: center;
}

.portal-header-brand {
  min-width: 0;
  gap: 11px;
  color: var(--primary);
}

.portal-header-brand strong {
  overflow: hidden;
  font-size: 1.2rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-header-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--coral);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.portal-trust {
  gap: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.portal-secure-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.portal-secure-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

#portal-help-link {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

#portal-help-link:hover,
#portal-help-link:focus-visible {
  color: var(--coral-dark);
}

.shell {
  width: min(520px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  align-items: start;
  padding: 84px 0 56px;
}

.panel {
  margin-top: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.09);
  padding: 34px 34px 30px;
  backdrop-filter: none;
}

.portal-brand {
  margin-bottom: 22px;
}

.portal-mark {
  width: 92px;
  height: 92px;
  margin: -80px 0 18px;
  border: 1px solid var(--line);
  box-shadow:
    0 12px 26px rgba(17, 24, 39, 0.12),
    0 0 0 7px #fff;
}

.eyebrow,
.operator-login-brand .eyebrow,
.admin-title .eyebrow {
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 800;
}

.portal-brand h1,
body[data-flow-mode="buy"] .portal-brand h1 {
  color: var(--primary);
  font-size: 1.72rem;
  font-weight: 800;
  line-height: 1.12;
}

.brand-subline {
  max-width: 390px;
  margin: 9px auto 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.section-title {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 800;
}

.flow-steps li {
  color: #7b8495;
  font-weight: 700;
}

.flow-steps li.active,
.flow-steps li.complete {
  color: var(--primary);
}

.flow-steps li.active::after,
.flow-steps li.complete::after,
.flow-steps li.active span,
.flow-steps li.complete span {
  border-color: var(--coral);
  background: var(--coral);
}

.login-tabs {
  border-bottom-color: var(--line);
}

.login-tabs button {
  color: var(--muted);
  font-weight: 800;
}

.login-tabs button:hover,
.login-tabs button.active {
  border-bottom-color: var(--coral);
  background: #fff3f3;
  color: var(--primary);
}

.context-card,
.card-details,
.card-challenge,
.voucher {
  border-color: #d8dcf2;
  background: var(--primary-soft);
}

.order-summary {
  border-color: var(--line);
  border-left: 4px solid var(--coral);
  background: #f8f9fb;
  padding: 13px 14px;
}

.order-summary-total,
.price {
  color: var(--primary);
}

label,
.package-select-field span {
  color: #303846;
  font-weight: 700;
}

input,
select,
textarea {
  border-color: #cdd2da;
  background: #fff;
}

.shell input,
.shell select {
  min-height: 50px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--primary);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--primary);
  outline: 3px solid rgba(37, 44, 101, 0.16);
  outline-offset: 1px;
}

button {
  background: var(--primary);
  font-weight: 800;
}

button:hover {
  background: var(--primary-2);
}

#login-submit-button,
#pay-button,
.voucher > button {
  min-height: 52px;
  background: var(--primary);
  box-shadow: none;
}

#login-submit-button:hover,
#pay-button:hover,
.voucher > button:hover {
  background: var(--primary-2);
}

.secondary-action {
  min-height: 50px;
  border-color: var(--primary);
  color: var(--primary);
}

.secondary-action:hover,
.secondary-action:focus-visible {
  background: var(--primary-soft);
}

.consent-field input {
  accent-color: var(--primary);
}

.message[data-kind="success"] {
  border-color: #b9e3c8;
  background: var(--green-soft);
  color: #126236;
}

.receipt-page {
  background: var(--surface);
}

.receipt-card {
  border-color: var(--line);
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}

.receipt-toolbar h1,
.card-challenge h3,
.card-details legend {
  color: var(--primary);
}

.connect {
  background: var(--green);
  color: #fff;
}

.admin-page {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--surface);
}

.operator-login {
  background: var(--surface);
}

.operator-login-card {
  border: 1px solid var(--line);
  border-top: 4px solid var(--coral);
  box-shadow: 0 22px 60px rgba(17, 24, 39, 0.12);
}

.operator-login-brand h1 {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
}

.operator-login-card > p {
  color: var(--muted);
}

.admin-console {
  grid-template-columns: 252px minmax(0, 1fr);
}

.admin-sidebar {
  background: var(--primary);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.sidebar-brand {
  min-height: 80px;
  gap: 12px;
  background: var(--primary);
  padding: 14px 18px;
}

.sidebar-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  background: var(--coral);
  color: #fff;
}

.sidebar-brand-copy {
  min-width: 0;
  display: grid;
  line-height: 1.12;
}

.sidebar-brand-copy strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.sidebar-brand-copy small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 600;
}

.side-nav {
  gap: 2px;
  padding: 8px 10px 20px;
}

.side-item,
.side-group-toggle,
.side-subnav button {
  min-height: 42px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.88);
  padding: 0 12px;
}

.side-item:hover,
.side-group-toggle:hover,
.side-subnav button:hover {
  background: var(--primary-2);
  color: #fff;
}

.side-item.active,
.side-subnav button.active {
  background: var(--coral);
  color: #fff;
  box-shadow: none;
}

.side-icon {
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.9);
}

.side-subnav {
  padding: 3px 0 6px 34px;
}

.side-subnav button {
  min-height: 36px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  padding: 0 10px;
}

.admin-content {
  padding: 0 28px 38px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 9;
  min-height: 80px;
  align-items: center;
  margin: 0 -28px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 12px 28px;
}

.admin-title h1 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
}

.admin-title .eyebrow {
  margin-bottom: 2px;
}

.operator-profile {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px 7px 6px 12px;
}

.operator-profile span {
  color: var(--muted);
}

.operator-profile .secondary-button {
  min-width: 76px;
  white-space: nowrap;
}

.secondary-button,
.table-action.secondary,
.button-link.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
}

.secondary-button:hover,
.table-action.secondary:hover,
.button-link.secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.admin-page input,
.admin-page select {
  min-height: 42px;
  border-radius: 6px;
  padding: 0 13px;
}

.admin-page textarea,
.admin-page .code-output {
  border-radius: 6px;
}

.admin-form {
  gap: 14px;
}

.admin-section {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.admin-section h2,
.admin-section h3,
.section-intro h2,
.section-intro h3 {
  color: var(--primary);
  font-weight: 800;
}

.section-toolbar {
  min-height: 48px;
  margin-bottom: 14px;
  border-bottom-color: var(--line);
  padding: 0 2px 12px;
}

.admin-workspace,
.topology-band,
.analytics-panel,
.admin-split > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.admin-workspace {
  gap: 18px;
  padding: 18px;
}

.topology-workspace {
  gap: 16px;
}

.topology-band {
  gap: 16px;
  padding: 18px;
}

.topology-band:last-child {
  padding-bottom: 18px;
}

.control-tower {
  grid-template-columns: minmax(230px, 0.72fr) minmax(360px, 1.28fr);
  gap: 18px 24px;
  margin-bottom: 16px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  padding: 18px;
}

.control-tower .section-intro h2,
.control-tower .section-intro h3 {
  color: #fff;
  font-size: 1.08rem;
}

.control-tower .section-intro p {
  color: rgba(255, 255, 255, 0.7);
}

.global-search-form input {
  min-height: 46px;
  border-color: rgba(255, 255, 255, 0.16);
  background: #4b548c;
  color: #fff;
}

.global-search-form input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.global-search-form input:focus {
  border-color: #fff;
  outline-color: rgba(255, 255, 255, 0.24);
}

.global-search-form button {
  min-height: 46px;
  background: var(--coral);
}

.global-search-form button:hover {
  background: var(--coral-dark);
}

.search-results {
  overflow: hidden;
  border-color: var(--line);
  border-radius: 7px;
  background: #fff;
}

.summary-grid {
  gap: 14px;
}

.summary-card {
  min-height: 104px;
  border-color: var(--line);
  border-top: 3px solid var(--primary);
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.summary-card:nth-child(2) {
  border-top-color: var(--coral);
}

.summary-card:nth-child(3) {
  border-top-color: var(--green);
}

.summary-card:nth-child(4) {
  border-top-color: #f2b84b;
}

.summary-card span {
  color: var(--muted);
  font-weight: 700;
}

.summary-card strong {
  color: var(--ink);
  font-size: 1.85rem;
}

.admin-split > div,
.analytics-panel {
  padding: 16px;
}

.table-wrap {
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

table {
  color: #505a69;
}

th {
  color: var(--ink);
  background: #f8f9fb;
  font-weight: 700;
}

tbody tr:hover td {
  background: #f8f9fb;
}

.status-pill {
  border-color: #b9e3c8;
  border-radius: 999px;
  background: var(--green-soft);
  color: #126236;
}

.bar-item span,
.timeline-marker {
  background: var(--primary);
}

.timeline-marker {
  box-shadow: 0 0 0 1px var(--primary);
}

.table-action,
.button-link {
  background: var(--primary);
}

.table-action:hover,
.button-link:hover {
  background: var(--primary-2);
}

.timeline-dialog {
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.24);
}

.dialog-header h2 {
  color: var(--primary);
}

.icon-button {
  border-color: var(--line);
  background: #fff;
  color: var(--primary);
}

.icon-button:hover {
  background: var(--primary-soft);
}

@media (max-width: 760px) {
  .portal-header {
    min-height: 64px;
    padding: 0 16px;
  }

  .portal-header-brand strong {
    max-width: 180px;
    font-size: 1.05rem;
  }

  .portal-secure-status {
    font-size: 0.72rem;
  }

  .portal-secure-status i {
    width: 9px;
    height: 9px;
  }

  .portal-trust {
    gap: 12px;
  }

  .admin-console {
    grid-template-columns: minmax(0, 1fr);
  }

  .shell {
    width: min(100% - 24px, 520px);
    min-height: calc(100vh - 64px);
    padding: 76px 0 34px;
  }

  .panel {
    padding: 30px 20px 24px;
  }

  .portal-mark {
    width: 84px;
    height: 84px;
    margin-top: -72px;
  }

  .portal-brand h1,
  body[data-flow-mode="buy"] .portal-brand h1 {
    font-size: 1.5rem;
  }

  .admin-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .sidebar-brand {
    min-height: 64px;
    padding: 10px 14px;
  }

  .side-nav {
    padding-left: 8px;
    padding-right: 8px;
  }

  .admin-content {
    padding: 0 12px 28px;
  }

  .admin-topbar {
    position: static;
    min-height: 0;
    margin: 0 -12px 18px;
    padding: 16px 12px;
  }

  .admin-title h1 {
    font-size: 1.5rem;
  }

  .admin-workspace,
  .topology-band,
  .admin-split > div,
  .analytics-panel {
    padding: 14px;
  }

  .control-tower {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  .operator-profile {
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    padding: 8px 8px 8px 12px;
  }
}

@media (min-width: 761px) and (max-width: 1160px) {
  .admin-console {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .admin-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .admin-topbar {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }
}
