:root {
  color-scheme: dark;
  --bg: #091015;
  --panel: #121b22;
  --panel-2: #18262e;
  --text: #f4f8fb;
  --muted: #9fb2bf;
  --line: #2e404b;
  --accent: #23c483;
  --accent-ink: #06120d;
  --alert: #ff1f32;
  --warning: #ffc857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(35, 196, 131, 0.12), transparent 28%),
    linear-gradient(210deg, rgba(255, 200, 87, 0.12), transparent 22%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

.app {
  min-height: 100vh;
}

.setup {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(340px, 1fr);
  gap: 48px;
  align-items: center;
  min-height: 100vh;
  padding: 7vw;
}

.brand h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel {
  display: grid;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 27, 34, 0.88);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.panel h2,
.dashboardBar h2 {
  margin: 0;
  font-size: 28px;
}

.panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.actions,
.barActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.iconButton {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 18px;
  color: var(--text);
  background: var(--panel-2);
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: transparent;
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 800;
}

.button.secondary:hover,
.iconButton:hover {
  border-color: var(--accent);
}

.pickerHeader {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.sectionLabel {
  margin: 4px 0 -18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.inboxList {
  display: grid;
  gap: 10px;
  max-height: min(42vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.inboxOption {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f171d;
}

.inboxOption input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

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

.teammateControl select {
  min-width: 0;
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text);
  background: #0f171d;
  font: inherit;
}

.hint {
  min-height: 22px;
}

.dashboard {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  padding: 28px;
}

.dashboardBar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
}

.tileGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  grid-auto-rows: minmax(240px, 1fr);
  gap: 18px;
}

.tile {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  padding: 24px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #101820;
}

.tile.active {
  border-color: var(--alert);
  box-shadow: 0 0 0 4px rgba(255, 31, 50, 0.16);
}

.tileName {
  overflow: hidden;
  color: var(--muted);
  font-size: 20pt;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count {
  display: grid;
  place-items: center;
  min-width: 0;
  color: var(--text);
  font-size: clamp(96px, 16vw, 300px);
  font-weight: 950;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.tile.active .count {
  color: var(--alert);
  animation: flash 0.72s steps(2, jump-none) infinite;
}

.statusLine {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 36px;
  padding-top: 18px;
  color: var(--muted);
}

#errorLine {
  color: var(--warning);
}

.hidden {
  display: none;
}

@keyframes flash {
  0%,
  45% {
    opacity: 1;
    transform: scale(1);
  }

  46%,
  100% {
    opacity: 0.18;
    transform: scale(0.98);
  }
}

@media (max-width: 820px) {
  .setup {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px;
  }

  .dashboard {
    padding: 16px;
  }

  .dashboardBar,
  .statusLine {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .tileName {
    white-space: normal;
  }

}
