:root {
  --navy: #0f3470;
  --blue: #1765a7;
  --teal: #00a7c8;
  --gold: #f4c84d;
  --ink: #101b2c;
  --muted: #5d6c7d;
  --line: #dbe7ee;
  --soft: #f5f8fb;
  --white: #ffffff;
  --good: #1f7a4d;
  --warn: #9a6a12;
  --shadow: 0 24px 70px rgba(15, 52, 112, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--soft);
}

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

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 78px;
  padding: 12px clamp(16px, 4vw, 38px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand img {
  width: 148px;
}

.app-header p,
.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  line-height: 1.05;
}

h3 {
  color: var(--ink);
}

.ghost-button,
.nav-item,
form button {
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 42px;
  font-weight: 850;
  background: var(--white);
}

.ghost-button {
  padding: 0 16px;
  color: var(--navy);
}

.app-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 78px);
}

.sidebar {
  position: sticky;
  top: 78px;
  align-self: start;
  display: grid;
  gap: 8px;
  height: calc(100vh - 78px);
  padding: 22px;
  border-right: 1px solid var(--line);
  background: var(--white);
}

.nav-item {
  width: 100%;
  padding: 0 14px;
  color: var(--muted);
  text-align: left;
}

.nav-item.active {
  color: var(--white);
  border-color: var(--navy);
  background: var(--navy);
}

.workspace {
  min-width: 0;
  padding: clamp(22px, 4vw, 42px);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 24px;
}

.view-heading,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 850;
  background: rgba(244, 200, 77, 0.24);
}

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

.metric,
.panel,
.platform-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 128px;
  padding: 22px;
}

.metric span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 18px;
  color: var(--navy);
  font-size: 2rem;
}

.two-column,
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.74fr);
  gap: 18px;
}

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

.wide-panel {
  grid-column: 1 / -1;
}

.panel {
  padding: 24px;
}

.timeline-list,
.approval-list,
.review-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-list li,
.approval-card,
.review-card,
.summary-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdff;
}

.timeline-list time {
  display: block;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.timeline-list p,
.review-card p,
.approval-card p,
.summary-row p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.inline-form,
.operation-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

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

.wide {
  grid-column: span 3;
}

label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cad9e4;
  border-radius: 7px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfdff;
}

textarea {
  resize: vertical;
}

form button {
  padding: 0 18px;
  color: var(--white);
  border-color: var(--navy);
  background: var(--navy);
}

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

.platform-card {
  min-height: 180px;
  padding: 22px;
}

.platform-card span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.platform-card strong {
  display: block;
  margin: 10px 0;
  color: var(--navy);
  font-size: 1.2rem;
}

.platform-card p {
  color: var(--muted);
  line-height: 1.55;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

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

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

th {
  color: var(--navy);
  font-size: 0.82rem;
  text-transform: uppercase;
}

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

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.row-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 850;
  background: var(--white);
}

.row-actions button[data-status="approved"] {
  color: var(--good);
}

.row-actions button[data-status="needs-edit"] {
  color: var(--warn);
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

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

  .sidebar {
    position: static;
    display: flex;
    height: auto;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-item {
    min-width: max-content;
  }

  .metric-grid,
  .card-grid,
  .two-column,
  .report-grid,
  .inline-form,
  .operation-form {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .brand img {
    width: 126px;
  }

  .workspace {
    padding: 18px;
  }

  .view-heading,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .card-grid,
  .two-column,
  .report-grid,
  .inline-form,
  .operation-form {
    grid-template-columns: 1fr;
  }

  .wide,
  .wide-panel {
    grid-column: auto;
  }
}
