:root {
  color-scheme: light;
  --ink: #18202f;
  --muted: #607086;
  --line: #d8dee8;
  --paper: #f8fafc;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --warn: #a45100;
}

* {
  box-sizing: border-box;
}

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

.app {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar,
.control-panel,
.metrics,
.stream {
  border: 1px solid var(--line);
  background: var(--panel);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 8px 8px 0 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 42px);
}

h2 {
  font-size: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.status {
  min-width: 190px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.status.ready {
  color: var(--accent-strong);
}

.status.mock {
  color: var(--warn);
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1fr) 110px minmax(160px, 0.8fr) 132px;
  gap: 14px;
  padding: 18px 24px;
  border-top: 0;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select,
input,
button {
  height: 44px;
  border-radius: 8px;
  font: inherit;
}

select,
input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

button {
  align-self: end;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

button.recording {
  background: #b42318;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 0;
}

.metrics div {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metrics strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.stream {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 470px;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.column:first-child {
  border-right: 1px solid var(--line);
}

.feed {
  height: 410px;
  overflow: auto;
  padding: 14px;
}

.item {
  margin-bottom: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.item .meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.item p {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .topbar,
  .control-panel,
  .stream,
  .metrics {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .metrics div,
  .column:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
