:root {
  color-scheme: light;
  --ink: #17262b;
  --muted: #5b615f;
  --paper: #f7f6f1;
  --panel: #ffffff;
  --line: #d9d3c7;
  --red: #c94b4b;
  --teal: #2e8b7b;
  --blue: #5a6f9b;
  --amber: #a66a2d;
  --green: #2f5d50;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

.shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.topbar {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  font-size: 19px;
  line-height: 1.18;
}

.status-pill {
  flex: 0 0 auto;
  max-width: 440px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  text-align: right;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(520px, 1.35fr) minmax(320px, 0.95fr);
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.queue-panel,
.metrics-panel,
.proof-panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.queue-panel,
.metrics-panel {
  padding: 20px;
}

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

.panel-heading.compact {
  margin-bottom: 14px;
}

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

.ticket {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.ticket i {
  width: 10px;
  min-height: 54px;
  border-radius: 5px;
  background: var(--teal);
}

.ticket strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.ticket p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.38;
}

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

.metric {
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  overflow: hidden;
}

.metric span,
.proof-strip span {
  display: block;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 20px;
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1;
}

.metric:nth-child(1) {
  border-top: 7px solid var(--red);
}

.metric:nth-child(2) {
  border-top: 7px solid var(--teal);
}

.metric:nth-child(3) {
  border-top: 7px solid var(--blue);
}

.metric:nth-child(4) {
  border-top: 7px solid var(--amber);
}

.metric:nth-child(5) {
  border-top: 7px solid var(--green);
}

.chart-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

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

.bar-row {
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr 64px;
  align-items: center;
  gap: 12px;
  min-height: 34px;
}

.bar-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.bar-track {
  height: 18px;
  background: #e9e3d7;
  border-radius: 8px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  min-width: 8px;
  border-radius: 8px;
}

.bar-value {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.proof-strip div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.proof-strip strong {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.25;
}

.proof-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.proof-panel img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.boundary {
  padding: 20px;
}

.boundary p:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.46;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 20px;
}

.chip {
  padding: 8px 10px;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

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

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 20px, 720px);
    padding-top: 10px;
  }

  .topbar,
  .workspace,
  .metric-grid,
  .proof-strip {
    grid-template-columns: 1fr;
  }

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

  .status-pill {
    text-align: left;
    max-width: none;
  }

  h1 {
    font-size: 28px;
  }

  .workspace {
    display: grid;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bar-value {
    text-align: left;
  }
}
