@import url("https://fonts.googleapis.com/css2?family=Darker+Grotesque:wght@700;800;900&family=Poppins:wght@400;500;600;700;800;900&display=swap");

:root {
  --ink: #131313;
  --ink-soft: #262422;
  --muted: #616161;
  --muted-light: #ababab;
  --paper: #f7f8f9;
  --surface: #ffffff;
  --line: #d9d9d9;
  --line-strong: #d9d9d9;
  --green: #006e5b;
  --brand: var(--green);
  --green-dark: #005a4a;
  --mint: #e6f1ee;
  --platform-navy: #0f1b2c;
  --platform-rail-text: #a8b3c7;
  --blue: #1e6bb8;
  --blue-soft: rgba(30, 107, 184, 0.14);
  --amber: #e2a600;
  --amber-soft: rgba(226, 166, 0, 0.14);
  --red: #e20000;
  --red-soft: rgba(226, 0, 0, 0.12);
  --violet: #6955c7;
  --violet-soft: #eeeafe;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px 16px;
  background: var(--platform-navy);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 34px;
  min-width: 0;
}

.brand-on-light .brand-title {
  color: var(--ink);
}

.brand-on-light .brand-subtitle {
  color: var(--muted);
  display: block;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  text-transform: none;
}

.brand-mark {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 0;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  box-shadow: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-title {
  color: #fff;
  font-family: "Darker Grotesque", Poppins, sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 0.95;
}

.brand-subtitle {
  display: inline-grid;
  min-height: 20px;
  margin-top: 6px;
  padding: 4px 14px;
  place-items: center;
  border-radius: 10px;
  background: var(--amber);
  color: var(--platform-navy);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.nav {
  display: grid;
  flex: 1;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 12px;
}

.nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--platform-rail-text);
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}

.nav button.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 3px;
  height: 24px;
  border-radius: 2px;
  background: var(--amber);
}

.nav-symbol {
  width: 16px;
  color: inherit;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
}

.sidebar-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--platform-rail-text);
  font-size: 11px;
  line-height: 1.4;
}

.main {
  min-width: 0;
  padding: 24px 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-family: "Darker Grotesque", Poppins, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

h3 {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

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

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.status-pill.warning,
.badge.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-pill.danger,
.badge.danger {
  background: var(--red-soft);
  color: var(--red);
}

.status-pill.blue,
.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.violet,
.badge.violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.button,
.ghost-button,
.danger-button {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.button:hover {
  background: var(--green-dark);
}

.link-as-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.ghost-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.danger-button {
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.two-col {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.full-span {
  grid-column: 1 / -1;
}

.panel,
.metric,
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  padding: 16px;
}

.metric-value {
  color: var(--ink);
  font-family: "Darker Grotesque", Poppins, sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}

.metric-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #fff;
}

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

th {
  color: var(--muted-light);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

.link-button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 0;
  font-weight: 800;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 110, 91, 0.14);
}

.stack {
  display: grid;
  gap: 12px;
}

.panel-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.badge-row,
.detail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.detail-row {
  justify-content: space-between;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.list-row strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.link-button.danger-link,
.ghost-button.danger-link {
  color: var(--red);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
}

.timeline-title {
  font-weight: 800;
}

.timeline-meta {
  color: var(--muted);
  font-size: 12px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
}

.login-story {
  padding: 58px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(0, 110, 91, 0.12), transparent 42%),
    var(--paper);
}

.login-card {
  align-self: center;
  margin: 40px;
  padding: 24px;
}

.login-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.login-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.proof-box {
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.proof-box strong {
  display: block;
  margin-bottom: 4px;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.notice.warning {
  border-color: rgba(226, 166, 0, 0.34);
  background: var(--amber-soft);
  color: var(--ink);
}

.training-summary,
.training-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.training-module-grid {
  display: grid;
  gap: 14px;
}

.training-module-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.training-module-card h3,
.training-module-card p {
  margin: 0;
}

.training-module-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 0;
}

.training-module-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.training-module-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.training-module-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.training-module-form textarea {
  min-height: 68px;
  resize: vertical;
  overflow-wrap: anywhere;
}

.training-module-form .full {
  grid-column: 1 / -1;
}

.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  min-height: 56px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.check-row span {
  min-width: 0;
}

.check-row strong,
.check-row small {
  display: block;
  overflow-wrap: anywhere;
}

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

.billing-card,
.billing-result {
  display: grid;
  gap: 12px;
}

.billing-card-actions,
.billing-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.billing-actions-row {
  margin-top: 14px;
}

.billing-meta {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.agency-detail-grid,
.profile-grid {
  display: grid;
  gap: 12px;
}

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

.subpanel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.panel-header.compact {
  margin-bottom: 12px;
}

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

.profile-tile {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.profile-tile span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-tile strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  line-height: 1.25;
}

.lifecycle-list {
  gap: 8px;
}

.create-agency-layout .panel {
  align-self: start;
}

.create-section {
  display: grid;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.create-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.create-section h3 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.platform-ops-grid {
  margin-top: 16px;
}

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

.role-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.role-card strong,
.role-card span {
  display: block;
}

.role-card strong {
  color: var(--ink);
  font-size: 14px;
}

.role-card span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.support-ticket-list {
  display: grid;
  gap: 12px;
}

.support-ticket-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.support-ticket-card.escalated {
  border-color: rgba(226, 0, 0, 0.28);
  background: var(--red-soft);
}

.support-ticket-main,
.support-ticket-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.support-ticket-main div {
  min-width: 0;
  flex: 1;
}

.support-ticket-main strong,
.support-ticket-main small {
  display: block;
  overflow-wrap: anywhere;
}

.support-ticket-main small {
  margin-top: 3px;
  color: var(--muted);
}

.support-ticket-actions {
  align-items: center;
}

.readiness-grid,
.integration-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

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

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

.readiness-card,
.integration-card,
.pipeline-step {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.readiness-card {
  display: grid;
  gap: 8px;
}

.readiness-card > div,
.integration-card-top,
.pipeline-step {
  display: flex;
  gap: 10px;
}

.readiness-card > div,
.integration-card-top {
  align-items: flex-start;
  justify-content: space-between;
}

.readiness-card strong,
.readiness-card small,
.integration-card strong,
.integration-card small,
.integration-card p,
.pipeline-step strong,
.pipeline-step small {
  display: block;
  overflow-wrap: anywhere;
}

.readiness-card small,
.integration-card small,
.integration-card p,
.pipeline-step small {
  color: var(--muted);
  line-height: 1.4;
}

.pipeline-list {
  display: grid;
  gap: 10px;
}

.pipeline-step {
  align-items: flex-start;
}

.pipeline-step > span {
  min-width: 52px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--ink);
  text-align: center;
  font-size: 10px;
  font-weight: 900;
}

.pipeline-step.complete > span {
  background: var(--mint);
  color: var(--green);
}

.mini-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.mini-check-list span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.mini-check-list span.ready {
  background: var(--mint);
  color: var(--green);
}

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

.billing-console-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 480px);
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
  border-color: rgba(0, 110, 91, 0.24);
}

.billing-console-hero h2 {
  margin-top: 6px;
  color: var(--ink);
  font-family: "Darker Grotesque", Poppins, sans-serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.billing-hero-metrics,
.billing-agency-summary,
.billing-reference-grid {
  display: grid;
  gap: 12px;
}

.billing-hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-agency-summary,
.billing-reference-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-agency-summary div,
.billing-reference-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.billing-agency-summary span,
.billing-reference-grid span,
.billing-plan-card span,
.billing-plan-card small {
  display: block;
}

.billing-agency-summary strong,
.billing-reference-grid strong,
.billing-plan-card strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  line-height: 1.25;
}

.billing-flow {
  display: grid;
  gap: 10px;
}

.billing-flow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.billing-flow-step > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.billing-flow-step.complete > span {
  background: var(--green);
  color: #fff;
}

.billing-flow-step strong,
.billing-flow-step small {
  display: block;
  overflow-wrap: anywhere;
}

.billing-flow-step small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.billing-submit-note {
  margin-top: 14px;
}

.billing-plan-list {
  display: grid;
  gap: 10px;
}

.billing-plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.billing-plan-card.active {
  border-color: rgba(0, 110, 91, 0.4);
  background: var(--mint);
}

.billing-plan-card small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.35;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: 420px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--platform-navy);
  color: #fff;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.nav-badge {
  margin-left: auto;
  min-width: 34px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

.sidebar-profile {
  position: static;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 16px;
  padding: 12px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.avatar-sm,
.top-avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.avatar-sm {
  width: 40px;
  height: 40px;
}

.platform-avatar {
  background: rgba(226, 166, 0, 0.25);
  color: #8a6b00;
}

.sidebar-profile strong {
  color: #fff;
}

.sidebar-profile small,
.profile-more {
  color: var(--platform-rail-text);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  background: var(--paper);
  color: var(--muted-light);
  font-size: 12px;
}

.top-avatar {
  width: 40px;
  height: 40px;
  background: var(--paper);
}

.prod-pill {
  border: 0;
  background: rgba(0, 110, 91, 0.12);
  color: var(--green);
}

.platform-login {
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}

.platform-brand-panel {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 56px 48px;
  background: var(--platform-navy);
  color: #fff;
}

.platform-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.platform-orb-top {
  top: -80px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: rgba(226, 166, 0, 0.08);
}

.platform-orb-bottom {
  left: -100px;
  bottom: -100px;
  width: 500px;
  height: 500px;
  background: rgba(0, 110, 91, 0.16);
}

.platform-login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-logo-box {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
}

.tg-logo-symbol {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.brand-mark .tg-logo-symbol {
  width: 21px;
  height: 21px;
}

.platform-logo-box .tg-logo-symbol {
  width: 26px;
  height: 26px;
}

.platform-login-brand strong {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.platform-login-brand small {
  display: inline-grid;
  min-width: 76px;
  min-height: 22px;
  margin-top: 2px;
  place-items: center;
  border-radius: 11px;
  background: var(--amber);
  color: var(--platform-navy);
  font-size: 10px;
  font-weight: 900;
}

.platform-story-copy {
  position: relative;
  z-index: 1;
  max-width: 624px;
  margin-top: 150px;
}

.platform-story-copy h1 {
  margin: 0;
  color: #fff;
  font-family: "Darker Grotesque", Poppins, sans-serif;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.2;
}

.platform-story-copy p {
  max-width: 560px;
  margin: 76px 0 0;
  color: var(--platform-rail-text);
  font-size: 15px;
  line-height: 1.6;
}

.platform-proof {
  position: relative;
  z-index: 1;
  margin-top: 80px;
}

.platform-proof .proof-box {
  min-height: 80px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.platform-proof .proof-box strong {
  color: var(--amber);
  font-family: "Darker Grotesque", Poppins, sans-serif;
  font-size: 26px;
}

.platform-proof .proof-box span {
  color: var(--platform-rail-text);
  font-size: 11px;
}

.restricted-note {
  position: absolute;
  left: 48px;
  bottom: 52px;
  color: #7a8aa5;
  font-size: 11px;
}

.platform-form-panel {
  min-height: 100vh;
  background: #fff;
}

.platform-login-form-wrap {
  width: 480px;
  margin: 220px 0 0 120px;
}

.form-heading h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.form-heading p {
  margin: 0 0 28px;
  color: var(--muted);
}

.platform-login-form-wrap input {
  height: 60px;
  border-radius: 12px;
}

.two-factor-note {
  margin: 4px 0 16px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.platform-login-form-wrap .button {
  width: 100%;
  height: 56px;
  border-color: var(--platform-navy);
  border-radius: 28px;
  background: var(--platform-navy);
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  margin: 32px 0 28px;
  color: var(--muted-light);
  font-size: 11px;
}

.login-divider span {
  height: 1px;
  background: var(--line);
}

.login-divider em {
  font-style: normal;
}

.okta-button {
  width: 100%;
  justify-content: center;
  height: 56px;
  border-radius: 28px;
}

.platform-demo-note,
.corporate-note {
  margin-top: 16px;
  text-align: center;
}

.corporate-note {
  margin-top: 28px;
  font-size: 12px;
}

.figma-metric {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.metric-trend {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.metric-trend.warn {
  color: var(--amber);
}

.platform-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.panel-title-row h2,
.top-agencies-panel h2,
.platform-activity-panel h2 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.platform-mrr-panel,
.top-agencies-panel {
  height: 320px;
}

.line-chart {
  width: 100%;
  height: 250px;
}

.line-chart text {
  fill: var(--muted-light);
  font-family: Poppins, sans-serif;
  font-size: 10px;
}

.rank-list {
  display: grid;
  margin-top: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  min-height: 48px;
  gap: 8px;
}

.rank-row > span {
  color: var(--muted-light);
  font-weight: 800;
}

.rank-row strong,
.rank-row small {
  display: block;
}

.rank-row strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.rank-row small {
  color: var(--muted);
  font-size: 11px;
}

.platform-activity-panel {
  grid-column: 1 / -1;
  min-height: 288px;
}

.activity-list {
  display: grid;
  margin-top: 14px;
}

.activity-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: start;
  gap: 8px;
  min-height: 44px;
}

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

.activity-item strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.activity-item small,
.activity-item em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.activity-item em {
  color: var(--muted-light);
}

.platform-extra-grid {
  margin-top: 24px;
}

@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .login-screen,
  .platform-overview-grid {
    grid-template-columns: 1fr;
  }

  .platform-brand-panel,
  .platform-form-panel {
    min-height: auto;
  }

  .platform-story-copy {
    margin-top: 80px;
  }

  .platform-login-form-wrap {
    width: min(480px, calc(100% - 40px));
    margin: 56px auto;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }

  .sidebar-footer,
  .sidebar-profile {
    position: static;
    margin-top: 18px;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }

  .billing-console-hero,
  .billing-hero-metrics,
  .billing-agency-summary,
  .billing-reference-grid,
  .agency-detail-grid,
  .profile-grid,
  .role-grid,
  .readiness-grid,
  .integration-grid,
  .role-grid.compact {
    grid-template-columns: 1fr;
  }

  .two-col,
  .metrics,
  .three-col {
    grid-template-columns: 1fr;
  }

  .training-module-form,
  .training-module-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-card {
    margin: 20px;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 16px;
  }

  .topbar,
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .platform-story-copy h1 {
    font-size: 36px;
  }

  .platform-story-copy p {
    margin-top: 32px;
  }

  .login-proof {
    grid-template-columns: 1fr;
  }

  .top-search {
    width: min(280px, 100%);
  }

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

  .training-module-form,
  .training-module-card dl {
    grid-template-columns: 1fr;
  }

  .nav {
    grid-template-columns: 1fr 1fr;
  }

  h1 {
    font-size: 24px;
  }
}

/* ============================================================
   Figma parity — shared components (added for design alignment)
   ============================================================ */

.topbar-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.back-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-top: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.back-btn:hover {
  background: var(--paper);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.icon-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  line-height: 1;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Filter toolbar */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-search {
  flex: 1 1 240px;
  min-width: 180px;
}

.filter-select {
  width: auto;
  min-width: 128px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
}

.filterbar .button,
.filterbar .ghost-button {
  margin-left: auto;
}

/* Avatar monogram */
.mono {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mono.sm { width: 30px; height: 30px; font-size: 11px; }
.mono.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 16px; }
.mono.c2 { background: var(--blue-soft); color: var(--blue); }
.mono.c3 { background: var(--violet-soft); color: var(--violet); }
.mono.c4 { background: var(--amber-soft); color: #8a6b00; }

.id-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.id-cell strong { display: block; color: var(--ink); }
.id-cell small { display: block; color: var(--muted); }

/* Health pill */
.hpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.hpill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.hpill.watch { background: var(--amber-soft); color: var(--amber); }
.hpill.new { background: var(--blue-soft); color: var(--blue); }
.hpill.critical { background: var(--red-soft); color: var(--red); }

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.tab.active { color: var(--ink); }

.tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}

.tab .count { margin-left: 6px; color: var(--muted-light); font-weight: 700; }

/* Pill sub-nav */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subnav button {
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.subnav button.active {
  border-color: var(--green);
  background: var(--mint);
  color: var(--green);
}

/* KPI / stat card */
.kpi {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.kpi .k { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi .v {
  color: var(--ink);
  font-family: "Darker Grotesque", Poppins, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
}
.kpi .s { color: var(--muted); font-size: 11px; }
.kpi .s.good { color: var(--green); font-weight: 700; }
.kpi .s.warn { color: var(--amber); font-weight: 700; }
.kpi .s.bad { color: var(--red); font-weight: 700; }

/* Progress bar */
.usage-row { display: grid; gap: 6px; margin-bottom: 14px; }
.usage-row .top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.usage-row .top b { font-weight: 800; color: var(--ink); }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.bar.warn > i { background: var(--amber); }
.bar.bad > i { background: var(--red); }

/* Toggle switch (visual) */
.switch {
  flex: 0 0 auto;
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--line);
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s ease;
}
.switch.on { background: var(--green); }
.switch.on::after { left: 20px; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.toggle-row > div { flex: 1; min-width: 0; }
.toggle-row strong { display: block; color: var(--ink); }
.toggle-row small { display: block; color: var(--muted); }
.toggle-row .price { color: var(--ink); font-weight: 800; white-space: nowrap; }

/* Service status grid */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.svc {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.svc .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.svc strong { color: var(--ink); font-size: 13px; }
.svc small { color: var(--muted); font-size: 11px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.dot.warn { background: var(--amber); }
.dot.bad { background: var(--red); }

/* Detail page header */
.detail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.detail-head .head-main { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.detail-head h2 { font-size: 20px; color: var(--ink); }
.detail-head .head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

/* Wizard stepper */
.wizard {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.wstep {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.wstep > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}
.wstep.active { background: var(--mint); color: var(--green); }
.wstep.active > span,
.wstep.done > span { background: var(--green); color: #fff; }

/* Status row list */
.statusrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.statusrow .sr-main { min-width: 0; }
.statusrow .sr-main strong { display: block; color: var(--ink); }
.statusrow .sr-main small { display: block; color: var(--muted); }
.statusrow .sr-side { display: flex; align-items: center; gap: 10px; text-align: right; }
.statusrow .sr-meta { color: var(--muted-light); font-size: 11px; }

/* Event log */
.evrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.evrow code { font-size: 12px; color: var(--ink); }
.evrow .res { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }

/* Banners */
.banner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.banner .b-main { flex: 1; min-width: 0; }
.banner .b-main strong { display: block; font-size: 18px; color: var(--ink); }
.banner .b-main span { color: var(--muted); }
.banner.good { border-color: rgba(0, 110, 91, 0.3); background: var(--mint); }
.banner.good .b-main strong { color: var(--green-dark); }
.banner.warn { border-color: rgba(226, 166, 0, 0.34); background: var(--amber-soft); }
.banner.bad { border-color: rgba(226, 0, 0, 0.28); background: var(--red-soft); }
.banner.bad .b-main strong { color: var(--red); }

/* Section separator for preserved operations content */
.ops-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 4px;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ops-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.total-row td {
  border-top: 2px solid var(--line-strong);
  font-weight: 800;
  color: var(--ink);
}

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

@media (max-width: 1050px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .svc-grid { grid-template-columns: 1fr; }
  .filterbar .button,
  .filterbar .ghost-button { margin-left: 0; }
}

/* Pill checkboxes + product pills */
.check-pill-row,
.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.check-pill input { width: 16px; height: 16px; }

.switch-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.switch-pill.on {
  border-color: var(--green);
  background: var(--mint);
  color: var(--green);
}

/* Quote / total summary line */
.quote-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--mint);
  color: var(--green-dark);
  font-weight: 800;
}

.quote-line span { font-size: 13px; }
.quote-line strong {
  font-family: "Darker Grotesque", Poppins, sans-serif;
  font-size: 24px;
}

/* Plan compare cards */
.plan-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.plan-compare .plan-card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.plan-compare .plan-card.current {
  border-color: var(--green);
  background: var(--mint);
}

.plan-compare .plan-card .price {
  font-family: "Darker Grotesque", Poppins, sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
}

.plan-compare .plan-card small { color: var(--muted); line-height: 1.4; }

@media (max-width: 1050px) {
  .plan-compare { grid-template-columns: 1fr; }
}
