:root {
  --bg: #f6f2e8;
  --panel: #ffffff;
  --panel-soft: #f7f1e4;
  --ink: #0f1e34;
  --muted: #6b778c;
  --line: #ded8ca;
  --nav: #0f1e34;
  --nav-soft: #1b2d45;
  --accent: #d4a444;
  --green: #52657a;
  --blue: #6b778c;
  --amber: #d4a444;
  --red: #b93d4a;
  --violet: #8a93a3;
  --shadow: 0 1px 2px rgba(19, 37, 31, 0.06);
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, Aptos, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(212, 164, 68, 0.10), transparent 340px),
    var(--bg);
  color: var(--ink);
}


.accent-navy {
  --accent: #d4a444;
  --panel-soft: #f7f1e4;
}

.accent-blue {
  --accent: #6b778c;
  --panel-soft: #eef4ff;
}

.accent-green {
  --accent: #52657a;
  --panel-soft: #ecf8ee;
}

.accent-violet {
  --accent: #8a93a3;
  --panel-soft: #f2effb;
}

.accent-amber {
  --accent: #b8842d;
  --panel-soft: #fff3dd;
}

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

button {
  border: 0;
}

.boot-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px;
}

.boot-mark,
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: #fbf0d8;
  color: var(--accent);
  font-weight: 800;
}

.boot-screen h1,
.boot-screen p {
  margin: 0;
}

.boot-screen p {
  color: var(--muted);
  margin-top: 4px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(460px, 100%);
  display: grid;
  gap: 18px;
}

.login-brand {
  color: var(--ink);
}

.login-form {
  display: grid;
  gap: 12px;
}

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

.sidebar {
  background: var(--nav);
  color: #eff8f5;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  background: #fbf0d8;
  color: var(--accent);
  flex: 0 0 auto;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #b9cac3;
  font-size: 0.82rem;
  margin-top: 2px;
}

.tenant-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--nav-soft);
}

.tenant-card .label {
  color: #b9cac3;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tenant-card .value {
  font-weight: 700;
  margin-top: 4px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #dbe9e4;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-button.active {
  background: rgba(212, 164, 68, 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.sidebar-footer-meta {
  color: #b9cac3;
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 0 2px;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 68px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 247, 0.86);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-left {
  min-width: 0;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
}

.page-title {
  margin: 2px 0 0;
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  line-height: 1.1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.select,
.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  min-height: 38px;
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

.select.compact {
  width: auto;
  min-width: 168px;
}

.role-pill,
.mode-pill,
.chip,
.tag,
.metric-change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.role-pill {
  background: #e8efff;
  color: #264f9a;
}

.mode-pill {
  border: 1px solid var(--line);
  background: #fff;
}

.mode-pill.normal {
  color: var(--green);
}

.mode-pill.degraded {
  color: var(--amber);
}

.mode-pill.lockdown,
.mode-pill.emergency {
  color: var(--red);
}

.content {
  padding: 20px 24px 40px;
  display: grid;
  gap: 20px;
}

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

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 1rem;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

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

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

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  min-width: 0;
  transition: box-shadow 160ms ease;
}

.density-comfortable .card,
.density-comfortable .item {
  padding: 18px;
}

.density-comfortable .content {
  gap: 24px;
}

.card.no-shadow {
  box-shadow: none;
}

.metric-card {
  display: grid;
  gap: 7px;
  border-top: 3px solid var(--accent);
}

.metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  font-weight: 850;
  line-height: 1;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-change.good {
  background: #e4f5e9;
  color: var(--green);
}

.metric-change.warn {
  background: #fff0d9;
  color: var(--amber);
}

.metric-change.bad {
  background: #ffe7ea;
  color: var(--red);
}

.toolbar,
.form-row,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-row > * {
  flex: 1 1 160px;
}

.toolbar {
  justify-content: space-between;
}

.segmented {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  gap: 3px;
  min-height: 40px;
}

.segmented.full {
  width: 100%;
}

.segmented.full .segment {
  flex: 1;
}

.segment {
  min-height: 32px;
  border-radius: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.segment.active {
  background: var(--ink);
  color: #fff;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.btn:hover:not(:disabled) {
  opacity: 0.86;
}

.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
}

.btn.danger {
  background: var(--red);
}

.btn.warn {
  background: var(--amber);
}

.btn.success {
  background: var(--green);
}

.btn:disabled,
.segment:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

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

.item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.item.compact-item {
  gap: 6px;
  padding: 10px;
}

.workflow-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.item-head,
.item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.item-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.item-subtitle,
.muted {
  color: var(--muted);
}

.item-subtitle {
  font-size: 0.86rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted);
}

.status-dot.good {
  background: var(--green);
}

.status-dot.warn {
  background: var(--amber);
}

.status-dot.bad {
  background: var(--red);
}

.status-dot.info {
  background: var(--blue);
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.chip.good,
.tag.sev4,
.tag.active,
.tag.resolved,
.tag.completed,
.tag.verified {
  background: #e4f5e9;
  color: var(--green);
  border-color: #bee1c9;
}

.chip.warn,
.tag.sev2,
.tag.grace,
.tag.open,
.tag.running,
.tag.degraded,
.tag.past_due {
  background: #fff0d9;
  color: var(--amber);
  border-color: #f2d19a;
}

.chip.bad,
.tag.sev1,
.tag.revoked,
.tag.urgent,
.tag.critical,
.tag.lockdown,
.tag.emergency,
.tag.failed {
  background: #ffe7ea;
  color: var(--red);
  border-color: #f2b8c0;
}

.chip.info,
.tag.sev3,
.tag.trial,
.tag.beta,
.tag.planned,
.tag.in_progress {
  background: #e8efff;
  color: var(--blue);
  border-color: #c9d8fb;
}

.tag {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

.matrix-table {
  min-width: 1060px;
}

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

th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f9fbfa;
}

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

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.risk-bar {
  height: 8px;
  border-radius: 999px;
  background: #edf2ef;
  overflow: hidden;
}

.risk-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.risk-fill.warn {
  background: var(--amber);
}

.risk-fill.bad {
  background: var(--red);
}

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

.timeline-entry {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
}

.timeline-entry::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--accent);
}

.timeline-entry.warn::before {
  background: var(--amber);
}

.timeline-entry.bad::before {
  background: var(--red);
}

.timeline-entry strong {
  display: block;
}

.timeline-entry span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 2px;
}

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

.service-node {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  min-height: 112px;
}

.service-node strong {
  display: block;
}

.service-node span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 6px;
  line-height: 1.4;
}

.kpi-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kpi-strip .chip {
  min-height: 32px;
}

.empty {
  padding: 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
}

#toast-region {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}

.toast {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.toast strong {
  display: block;
  font-size: 0.88rem;
}

.toast span {
  display: block;
  opacity: 0.82;
  margin-top: 2px;
  font-size: 0.82rem;
}

.toast.good {
  background: #226c3c;
}

.toast.warn {
  background: #9a5d12;
}

.toast.bad {
  background: #963340;
}

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

/* Nav icons and badges */
.nav-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  opacity: 0.75;
}

.nav-button.active .nav-icon,
.nav-button:hover .nav-icon {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  min-width: 20px;
  text-align: center;
  line-height: 18px;
}

/* Sidebar user node */
.user-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex: 0 0 auto;
  letter-spacing: 0.04em;
}

.user-node-info strong {
  display: block;
  font-size: 0.85rem;
  color: #eff8f5;
  font-weight: 700;
}

.user-node-info span {
  display: block;
  font-size: 0.75rem;
  color: #b9cac3;
  margin-top: 2px;
  text-transform: capitalize;
}

/* Focus rings */
.input:focus,
.select:focus,
.textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ── Home dashboard ─────────────────────────────────────── */

.home-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.home-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--ink);
}

.home-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.home-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-card-wide {
  grid-column: 1 / -1;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

.home-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 6px;
  border-radius: calc(var(--radius) - 2px);
  transition: background 120ms ease;
}

.home-list-row:hover {
  background: var(--panel-soft);
}

.home-list-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.home-list-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-list-name.mono {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: 0.8rem;
}

.home-list-sub {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.home-list-time {
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.empty-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 8px 0;
}

.empty-inline .nav-icon {
  width: 16px;
  height: 16px;
  opacity: 0.5;
  flex-shrink: 0;
}

/* Revenue history */
.revenue-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spark-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 52px;
}

.spark-bar {
  flex: 1;
  background: var(--accent);
  opacity: 0.6;
  border-radius: 2px 2px 0 0;
  min-width: 8px;
  transition: opacity 120ms ease;
}

.spark-bar:hover {
  opacity: 1;
}

.revenue-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.revenue-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 6px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.85rem;
}

.revenue-row:hover {
  background: var(--panel-soft);
}

.revenue-period {
  font-weight: 500;
}

.revenue-val {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

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

@media (max-width: 1180px) {
  .grid.metrics,
  .grid.four,
  .diagram {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    gap: 12px;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-button {
    flex: 0 0 156px;
  }

  .sidebar-footer,
  .tenant-card {
    display: none;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .content {
    padding: 16px;
  }

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

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

  .home-card-wide {
    grid-column: 1;
  }
}

@media (max-width: 560px) {
  .login-shell {
    padding: 12px;
    place-items: start stretch;
  }

  .login-panel {
    width: 100%;
  }

  .brand,
  .topbar-actions,
  .toolbar,
  .form-row {
    min-width: 0;
  }

  .nav-button {
    flex-basis: 142px;
    min-height: 44px;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segment {
    flex: 1 0 auto;
  }

  .select.compact,
  .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .item-head,
  .item-meta,
  .toolbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #toast-region {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}


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

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

.ops-mini-stat span,
.ops-mini-stat small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.ops-mini-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 1.05rem;
  color: var(--ink);
}

.ops-mini-stat.good {
  border-color: #bee1c9;
  background: #f4fbf6;
}

.ops-mini-stat.warn {
  border-color: #f2d19a;
  background: #fff8eb;
}

.ops-mini-stat.bad {
  border-color: #f2b8c0;
  background: #fff2f4;
}

.crm-save-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdfa;
  padding: 12px;
}

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

@media (max-width: 560px) {
  .ops-mini-grid {
    grid-template-columns: 1fr;
  }
}

.recovery-warning,
.mfa-setup-panel,
.recovery-codes-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 12px;
  background: #fffdfa;
}

.recovery-warning.good {
  border-color: #bee1c9;
  background: #f4fbf6;
}

.recovery-warning.warn {
  border-color: #f2d19a;
  background: #fff8eb;
}

.mfa-setup-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.mfa-qr {
  width: 160px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 8px;
}

.copy-box {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.copy-box code,
.recovery-code-grid code {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f3ea;
  padding: 8px;
  overflow-wrap: anywhere;
  color: var(--ink);
}

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

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .mfa-setup-panel,
  .recovery-code-grid {
    grid-template-columns: 1fr;
  }
}


.launch-hero-panel {
  border-left: 4px solid var(--accent);
}

.launch-code {
  position: relative;
  display: grid;
  gap: 8px;
}

.launch-code pre {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f1e34;
  color: #f7f1e4;
  padding: 14px;
  overflow-x: auto;
  white-space: pre;
}

.launch-code code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

.launch-checklist {
  display: grid;
  gap: 8px;
}

.launch-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  color: var(--ink);
}

.launch-check input {
  margin-top: 3px;
  width: auto;
}

.launch-automation-panel {
  border: 1px solid rgba(102, 112, 255, 0.22);
  background: linear-gradient(135deg, rgba(102, 112, 255, 0.12), rgba(255,255,255,0.88));
}
.section-head.compact {
  margin-top: 18px;
  margin-bottom: 10px;
}


/* HQ final UI/UX cleanup */
.nav-group-label {
  margin: 16px 8px 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-group-label:first-child { margin-top: 6px; }
.nav-list { gap: 2px; }
.topbar {
  align-items: flex-start;
}
/* topbar subtitle removed — no dev hints in production UI */
.content > .grid:first-child,
.content > .card:first-child,
.content > section:first-child {
  scroll-margin-top: 24px;
}

/* 9.0 HQ UI/UX refinement */
.operator-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.operator-strip article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow);
}
.operator-strip span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.operator-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  line-height: 1.25;
}
.nav-group-label {
  padding-left: 10px;
  color: rgba(239, 248, 245, .62);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.nav-button .nav-badge {
  margin-left: auto;
}
@media (max-width: 1100px) {
  .operator-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .operator-strip { grid-template-columns: 1fr; }
}

/* ── Marketing & broadcast status tags ───────────────────── */
.tag.sent,
.tag.published,
.tag.approved,
.tag.consent_given {
  background: #e4f5e9;
  color: var(--green);
  border-color: #bee1c9;
}

.tag.draft,
.tag.pending_consent,
.tag.pending,
.tag.paused {
  background: #f4f6f9;
  color: var(--muted);
  border-color: var(--line);
}

.tag.planned,
.tag.in_review,
.tag.idea {
  background: #e8efff;
  color: var(--blue);
  border-color: #c9d8fb;
}

.tag.cancelled,
.tag.withdrawn,
.tag.archived,
.tag.ended,
.tag.revoked,
.tag.expired {
  background: #ffe7ea;
  color: var(--red);
  border-color: #f2b8c0;
}

/* ── Visual design refinements ───────────────────────────── */

/* Metric cards — slightly bolder top border */
.metric-card {
  border-top-width: 3px;
}

/* Card hover lift */
.card:not(.no-shadow):hover {
  box-shadow: 0 4px 12px rgba(15, 30, 52, 0.09);
}

/* Operator strip — make it more subtle */
.operator-strip {
  background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.3));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 4px;
  display: flex;
  gap: 0;
  margin: 0 0 18px;
}

.operator-strip article {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.operator-strip article:last-child {
  border-right: none;
}

/* Better topbar */
.topbar {
  background: rgba(253, 251, 246, 0.9);
  border-bottom-color: var(--line);
}

/* Page title size */
.page-title {
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
}

/* Better btn.small */
.btn.small {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 0.82rem;
}

/* Sidebar nav width */
.app-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}

/* Section head h2 a bit bolder */
.section-head h2 {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Empty state centering */
.empty {
  text-align: center;
  padding: 24px 20px;
}

/* Item hover */
.item:hover {
  border-color: #c8d2d8;
  box-shadow: 0 2px 8px rgba(15,30,52,0.06);
}
