:root {
  --bg: #081018;
  --bg-2: #0d1722;
  --panel: #101d2b;
  --panel-2: #152434;
  --panel-3: #1a2b3e;
  --line: rgba(155, 177, 198, 0.14);
  --text: #edf4fb;
  --muted: #99aec2;
  --accent: #38bdf8;
  --accent-2: #22c55e;
  --watch: #f59e0b;
  --bad: #fb7185;
  --neutral: #64748b;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.30);
}

* {
  box-sizing: border-box;
}

html {
  background: linear-gradient(180deg, #071018 0%, #0c1520 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.10), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.08), transparent 30rem),
    linear-gradient(180deg, #071018 0%, #0c1520 100%);
}

button,
input,
table,
a {
  font: inherit;
}

a {
  color: #bfe8ff;
  text-decoration: none;
}

.platform-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.25rem;
}

.dashboard-stack {
  display: grid;
  gap: 1rem;
}

.topbar,
.panel,
.summary-card,
.flash-banner,
.badge-card,
.figure-card {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(16, 29, 43, 0.96), rgba(11, 20, 31, 0.98));
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
}

.topbar h1,
.panel h2,
.panel h3,
.summary-card strong,
.process-card h3,
.figure-card h3 {
  margin: 0;
  font-weight: 600;
}

.topbar-copy,
.panel-head p,
.summary-card p,
.microcopy,
.notice-block p,
.metric-chip small,
.metric-row small,
.figure-card p {
  color: var(--muted);
  line-height: 1.55;
}

.topbar-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.badge-card {
  min-width: 170px;
  padding: 0.85rem 0.95rem;
}

.badge-card span,
.summary-card span,
.metric-chip span,
.metric-row span,
.field-card span,
.check-item span,
.panel-head .eyebrow,
.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge-card strong {
  display: block;
  margin-top: 0.25rem;
}

.flash-banner {
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
}

.flash-banner p {
  margin: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.8fr) minmax(280px, 0.8fr);
  gap: 1rem;
}

.panel {
  padding: 1.15rem;
}

.panel-head {
  margin-bottom: 0.9rem;
}

.panel-head.compact {
  margin-bottom: 0.7rem;
}

.panel-head h2,
.panel-head h3 {
  margin-bottom: 0.3rem;
}

.panel-head p {
  margin: 0;
}

.panel-intake,
.panel-feeling,
.panel-action {
  min-height: 100%;
}

.big-status {
  display: inline-flex;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
}

.tone-good {
  border-color: rgba(34, 197, 94, 0.24);
}

.tone-watch {
  border-color: rgba(245, 158, 11, 0.24);
}

.tone-bad {
  border-color: rgba(251, 113, 133, 0.24);
}

.tone-neutral {
  border-color: rgba(155, 177, 198, 0.16);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
}

.summary-card {
  padding: 0.95rem 1rem;
}

.summary-card strong {
  display: block;
  margin-top: 0.35rem;
  margin-bottom: 0.4rem;
  font-size: 1.02rem;
  line-height: 1.35;
}

.summary-card p,
.summary-card small {
  margin: 0;
  color: var(--muted);
}

.intake-form,
.form-grid,
.upload-grid,
.process-grid,
.chart-grid,
.tab-grid,
.metric-grid,
.bullet-list,
.checklist,
.tab-stack,
.figure-grid {
  display: grid;
  gap: 0.9rem;
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.field-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border-radius: 1rem;
  background: rgba(21, 36, 52, 0.92);
  border: 1px solid rgba(155, 177, 198, 0.12);
}

.field-card input {
  width: 100%;
  padding: 0.75rem 0.8rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(155, 177, 198, 0.14);
  background: rgba(7, 16, 24, 0.94);
  color: var(--text);
}

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

.details-drawer {
  border: 1px solid rgba(155, 177, 198, 0.14);
  border-radius: 1rem;
  background: rgba(12, 21, 33, 0.86);
}

.details-drawer summary {
  cursor: pointer;
  padding: 0.95rem 1rem;
  font-weight: 500;
}

.details-drawer > :not(summary) {
  padding: 0 1rem 1rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.primary-action,
.secondary-action,
.tab-switch {
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.primary-action,
.secondary-action {
  padding: 0.85rem 1.15rem;
  font-weight: 700;
  color: #071018;
}

.primary-action {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
}

.secondary-action {
  background: linear-gradient(135deg, #d7e3f0, #98aabf);
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.notice-block {
  margin-bottom: 0.9rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(155, 177, 198, 0.14);
  background: rgba(12, 21, 33, 0.88);
}

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

.process-card {
  padding: 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(155, 177, 198, 0.12);
  background: rgba(12, 21, 33, 0.88);
}

.process-card.compact {
  padding: 0.85rem;
}

.process-card-head {
  margin-bottom: 0.8rem;
}

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

.metric-chip,
.bullet-item,
.check-item,
.metric-row {
  padding: 0.75rem 0.8rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(155, 177, 198, 0.10);
  background: rgba(21, 36, 52, 0.90);
}

.metric-chip strong,
.metric-row strong {
  display: block;
  margin-top: 0.25rem;
  margin-bottom: 0.2rem;
}

.metric-chip.state-good,
.state-good {
  border-color: rgba(34, 197, 94, 0.28);
  color: #c9f8d8;
}

.metric-chip.state-watch,
.state-watch {
  border-color: rgba(245, 158, 11, 0.30);
  color: #ffe2a9;
}

.metric-chip.state-bad,
.state-bad {
  border-color: rgba(251, 113, 133, 0.30);
  color: #ffd0dc;
}

.metric-chip.state-neutral,
.state-neutral {
  color: var(--muted);
}

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

.bullet-item {
  color: var(--text);
}

.checklist {
  gap: 0.75rem;
}

.check-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.check-item input {
  margin-top: 0.15rem;
}

.tab-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.tab-switch {
  padding: 0.75rem 1rem;
  background: rgba(21, 36, 52, 0.94);
  color: var(--muted);
  border: 1px solid rgba(155, 177, 198, 0.12);
}

.tab-switch.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(34, 197, 94, 0.18));
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.26);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

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

.chart-grid.single {
  grid-template-columns: 1fr;
}

.chart-card,
.figure-card {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(155, 177, 198, 0.12);
  background: rgba(12, 21, 33, 0.90);
}

.chart-head {
  margin-bottom: 0.85rem;
}

.chart-head h3 {
  margin-bottom: 0.35rem;
}

.chart-head p {
  margin: 0;
  color: var(--muted);
}

.chart-card canvas {
  width: 100% !important;
  height: 310px !important;
}

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

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(155, 177, 198, 0.12);
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0 0.2rem 0.5rem;
}

.footer-row p {
  margin: 0;
  color: var(--muted);
}

.figure-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.figure-card img {
  width: 100%;
  margin-top: 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(155, 177, 198, 0.12);
  background: #fff;
}

.topbar-links {
  display: flex;
  align-items: center;
}

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

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

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

@media (max-width: 920px) {
  .platform-shell {
    padding: 1rem;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-badges {
    justify-content: flex-start;
  }

  .summary-grid,
  .split-grid,
  .process-grid,
  .tab-grid,
  .chart-grid,
  .biology-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

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