:root {
  --ink: #121826;
  --muted: #64748b;
  --line: #d8e2ee;
  --paper: #f4f7fb;
  --panel: #ffffff;
  --nav: #10212c;
  --accent: #0f766e;
  --accent-2: #be6b00;
  --danger: #b42318;
  --ok: #177245;
  --warn: #9a6700;
  --blue: #2563a8;
  --violet: #5b5bd6;
  --shadow: 0 18px 44px rgba(18, 24, 38, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 34rem),
    linear-gradient(135deg, #f8fbff, var(--paper));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.buyer-launch {
  min-height: 74vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
  padding: clamp(26px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(18, 24, 38, 0.96), rgba(17, 68, 70, 0.94)),
    linear-gradient(90deg, rgba(190, 107, 0, 0.24), transparent);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.buyer-launch::after {
  content: "";
  position: absolute;
  inset: auto -10% -28% 35%;
  height: 55%;
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.32), rgba(250, 204, 21, 0.22), rgba(99, 102, 241, 0.24));
  transform: skewY(-8deg);
  opacity: 0.78;
}

.buyer-launch > * {
  position: relative;
  z-index: 1;
}

.buyer-launch h1 {
  margin: 8px 0 12px;
  max-width: 860px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.96;
}

.buyer-launch p {
  max-width: 780px;
  color: #d7e6e8;
  line-height: 1.65;
  font-size: 18px;
}

.buyer-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 6px;
  padding: 0 15px;
  color: #fff;
  text-decoration: none;
  font-weight: 850;
}

.button-link.primary {
  background: #f7c948;
  border-color: #f7c948;
  color: #172033;
}

.buyer-launch-board {
  display: grid;
  gap: 12px;
}

.buyer-launch-board div {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
}

.buyer-launch-board span,
.buyer-launch-board strong {
  display: block;
}

.buyer-launch-board span {
  color: #a9d9d3;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.buyer-launch-board strong {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.25;
}

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

button,
.file-button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

button:hover,
.file-button:hover {
  filter: brightness(0.95);
}

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

.workspace-notice {
  border-bottom: 1px solid var(--line);
  background: #fff7ed;
  color: var(--ink);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.workspace-proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.workspace-proof-strip div {
  display: grid;
  gap: 4px;
  background: #fff;
  padding: 14px 16px;
}

.workspace-proof-strip strong {
  color: var(--accent);
  font-size: 13px;
}

.workspace-proof-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

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

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

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

.full {
  width: 100%;
}

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

.sidebar {
  background:
    linear-gradient(180deg, rgba(16, 33, 44, 0.98), rgba(13, 42, 52, 0.96)),
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.24), transparent 16rem);
  color: #f7fbfb;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d9f4ef, #c7d2fe);
  color: var(--nav);
  border-radius: 8px;
  font-weight: 800;
}

.brand span,
.eyebrow {
  display: block;
  color: #adc4c6;
  font-size: 12px;
  margin-top: 2px;
}

.role-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
}

.role-card label {
  display: block;
  font-size: 12px;
  color: #c8d8da;
  margin-bottom: 6px;
}

.role-card select {
  width: 100%;
}

.suite-links {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.suite-links a {
  color: #e7f8f5;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.suite-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

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

.nav-tab {
  background: transparent;
  color: #dceaea;
  justify-content: flex-start;
  border: 1px solid transparent;
}

.nav-tab.active {
  background: linear-gradient(135deg, #d9f4ef, #eef2ff);
  color: #10292c;
  box-shadow: 0 10px 26px rgba(20, 184, 166, 0.18);
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(216, 226, 238, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(18, 24, 38, 0.08);
  padding: 16px;
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 3px 0 0;
  font-size: clamp(28px, 3vw, 42px);
}

.workspace .eyebrow {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}

.top-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-button input {
  display: none;
}

.notice {
  border: 1px solid var(--line);
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  color: var(--muted);
}

.backend-status {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef8f5;
  color: #12594f;
  font-size: 0.92rem;
}

.backend-status[data-state="warn"] {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #8a3b0b;
}

.view {
  display: grid;
  gap: 18px;
}

.backend-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.backend-support[data-state="warn"] {
  border-left-color: var(--accent-2);
  background: #fffbeb;
}

.backend-support[data-state="ok"] {
  border-left-color: var(--ok);
}

.backend-support strong,
.backend-support span {
  display: block;
}

.backend-support span {
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

.command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(18, 24, 38, 0.96)),
    radial-gradient(circle at 80% 15%, rgba(199, 210, 254, 0.34), transparent 16rem);
  color: #fff;
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 60px rgba(18, 24, 38, 0.2);
}

.command-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  pointer-events: none;
}

.command-hero > * {
  position: relative;
  z-index: 1;
}

.command-hero h2 {
  margin: 6px 0 10px;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 0.98;
  max-width: 760px;
}

.command-hero p {
  margin: 0;
  max-width: 760px;
  color: #dceef0;
  font-size: 16px;
  line-height: 1.65;
}

.pulse-board {
  display: grid;
  gap: 10px;
  align-content: center;
}

.pulse-board span {
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 13px 14px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ghost.light {
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}

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

.metric,
.panel,
.item-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(18, 24, 38, 0.06);
}

.metric {
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--accent), var(--violet));
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 26px;
}

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

.panel {
  padding: 16px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.94);
}

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

.panel-header h2,
.modal h2 {
  margin: 0;
  font-size: 18px;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.ceo-panel {
  border-color: rgba(190, 107, 0, 0.34);
}

.command-checklist {
  display: grid;
  gap: 10px;
}

.command-checklist > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.role-workflow ol {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 9px;
}

.role-workflow li {
  line-height: 1.45;
  font-weight: 750;
}

.adoption-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.adoption-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  padding: 12px;
}

.adoption-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.adoption-card strong {
  display: block;
  line-height: 1.35;
}

.adoption-card.wide {
  grid-column: span 2;
}

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

.readiness-list > div {
  display: grid;
  grid-template-columns: auto minmax(180px, 0.45fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.readiness-list small {
  color: var(--muted);
}

.vertical-fit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.vertical-fit-grid article {
  border-top: 3px solid var(--accent);
  background: #f8fbfc;
  padding: 12px;
}

.vertical-fit-grid strong,
.vertical-fit-grid span,
.vertical-fit-grid small {
  display: block;
}

.vertical-fit-grid span {
  margin-top: 6px;
  color: var(--ink);
  line-height: 1.45;
}

.vertical-fit-grid small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.status,
.role-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.status.ok {
  background: #e5f6ed;
  color: var(--ok);
}

.status.warn {
  background: #fff4d6;
  color: var(--warn);
}

.status.bad {
  background: #fde8e5;
  color: var(--danger);
}

.status.info {
  background: #e7f0fb;
  color: var(--blue);
}

.status.low {
  background: #e7f0fb;
  color: var(--blue);
}

.role-pill {
  background: #eef3f7;
  color: var(--muted);
}

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

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

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

label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

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

textarea {
  min-height: 86px;
  resize: vertical;
}

.help-text {
  color: var(--muted);
  line-height: 1.4;
}

.brief-output {
  margin: 0;
  min-height: 168px;
  white-space: pre-wrap;
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  line-height: 1.5;
  overflow: auto;
}

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

.item-card {
  padding: 12px;
}

.item-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.item-title strong {
  display: block;
}

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

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.audit-feed {
  max-height: 540px;
  overflow: auto;
}

.audit-row {
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 12px;
  margin: 0 0 10px 4px;
}

.audit-row strong {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  background: #eef3f7;
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  max-width: 360px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    max-height: 38vh;
    overflow: auto;
    padding: 14px 16px;
    gap: 10px;
  }

  .nav-tabs {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }

  .nav-tab {
    flex: 0 0 auto;
    min-width: 132px;
    justify-content: center;
  }

  .brand span {
    display: none;
  }

  .role-card {
    padding: 8px;
  }

  .command-hero,
  .buyer-launch,
  .metrics-grid,
  .two-col,
  .three-col,
  .adoption-grid,
  .vertical-fit-grid {
    grid-template-columns: 1fr;
  }

  .buyer-launch {
    min-height: auto;
  }

  .adoption-card.wide {
    grid-column: auto;
  }

  .readiness-list > div {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .backend-support {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .workspace,
  .sidebar {
    padding: 16px;
  }

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

  .nav-tabs {
    display: flex;
  }

  .top-actions,
  .actions {
    width: 100%;
  }

  .top-actions > *,
  .actions > * {
    flex: 1 1 100%;
  }
}

@media (max-width: 760px) {
  .workspace-proof-strip {
    grid-template-columns: 1fr;
  }
}

