:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #eff1f7;
  background: #10131c;
  --panel: #191e2a;
  --surface: #121721;
  --line: #343c4d;
  --muted: #b7c0d0;
  --gold: #f3ca84;
  --ink: #171309;
  --danger: #ffc0ba;
  --link: #b9d1ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 87% 0, #272435 0%, transparent 36%), #10131c;
  line-height: 1.5;
}
.layout {
  width: min(1120px, calc(100% - 48px));
  min-height: 100dvh;
  margin-inline: auto;
  padding-bottom: 48px;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.site-header form { margin: 0; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-weight: 780;
  font-size: 1.1rem;
  text-decoration: none;
}
.brand strong {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 29px;
  border: 1px solid #735b41;
  border-radius: 7px;
  color: var(--gold);
  background: #302719;
  font-size: .84rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}
nav a {
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 650;
  font-size: .9rem;
  text-decoration: none;
}
nav a:hover { background: #242a39; color: #f5f6fa; }
nav a[aria-current="page"] { color: var(--gold); background: #2e281f; }

main { padding-top: 26px; }
h1 {
  margin: 0 0 8px;
  font-size: clamp(1.95rem, 5vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}
main > h1 { margin-bottom: 20px; }
h2 { margin: 0 0 16px; font-size: 1.14rem; line-height: 1.3; }
a { color: var(--link); }
p { margin: 0 0 14px; }
.muted, small { color: var(--muted); }
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-bottom: 22px;
}
.page-heading p { margin: 0; }
.test-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 9px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.panel {
  margin-bottom: 16px;
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.panel > :last-child { margin-bottom: 0; }
.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.control-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  margin: 0;
}
.control-card p { margin: 10px 0 18px; max-width: 46ch; }
.control-card form { margin-top: auto; }
.control-heading, .section-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
}
.section-heading { margin-bottom: 17px; }
.control-heading h2, .section-heading h2 { margin: 0; }
.status, .time-zone {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: .77rem;
  font-weight: 650;
}
.status-good { color: #a7ebc7; border-color: #3b6652; background: #1b3028; }
.status-warn { color: #f6d69d; border-color: #6a5336; background: #302719; }
.time-zone { color: var(--gold); }
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.metrics > div {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}
.metrics span { color: var(--muted); font-size: .86rem; }
.metrics strong {
  display: block;
  margin-top: 3px;
  font-size: 1.55rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.metrics strong span { font-weight: 500; }
.empty-state { color: var(--muted); }

.schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  align-items: end;
  gap: 14px;
}
label { display: grid; min-width: 0; gap: 6px; font-size: .9rem; }
input, button, select { font: inherit; }
input:not([type=checkbox]), select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: inherit;
  background: var(--surface);
}
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--gold);
  color: var(--ink);
  cursor: pointer;
  font-weight: 680;
  font-size: .91rem;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}
button:hover:not(:disabled), .button:hover { filter: brightness(1.13); }
button:disabled { background: var(--surface); color: #a1a7b6; border-color: var(--line); cursor: default; }
.quiet { background: #242c3b; border-color: #465165; color: #f0f3f9; }
.danger:not(:disabled) { color: var(--danger); }
:focus-visible { outline: 2px solid #9dc9ff; outline-offset: 3px; }

.settings-form > button { margin-top: 15px; }
summary { cursor: pointer; font-weight: 650; }
.build-picker > summary { list-style: none; }
.build-picker > summary::-webkit-details-marker { display: none; }
.build-picker > summary::after { margin-left: .55em; content: "▾"; }
.build-picker[open] > summary::after { content: "▴"; }
.period-export form { margin-top: 14px; }
.manual-code { margin-bottom: 14px; }
.manual-code form { margin-top: 14px; }
.manual-code p { margin: 12px 0 0; }
.notice {
  padding: 11px 15px;
  border: 1px solid #406a56;
  border-radius: 8px;
  background: #1b3028;
  color: #b8efd1;
}
.notice-error { background: #34212a; border-color: #684552; color: var(--danger); }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: .82rem; font-weight: 650; }
small { display: block; margin-top: 4px; }
.participant-id { font-size: .75rem; overflow-wrap: anywhere; }
.participant-note { color: var(--gold); font-size: .82rem; overflow-wrap: anywhere; }
.crash-frame { font-family: ui-monospace, monospace; font-size: .78rem; overflow-wrap: anywhere; }
.apk-versions { margin-top: 12px; }
.apk-version {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.apk-version + .apk-version { margin-top: 8px; }
.apk-version.is-selected { border-color: #406a56; background: #1b3028; }
.apk-state, .apk-choice { justify-self: start; }
.apk-version-info, .apk-file { overflow-wrap: anywhere; }
.apk-note { font-size: .85rem; overflow-wrap: anywhere; }
.apk-version-info > .apk-note, .apk-version code { margin-left: .45em; }
.apk-version code { color: var(--gold); }
@media (max-width: 540px) {
  .apk-version { grid-template-columns: minmax(0, 1fr); }
}
.cell-label { display: none; }
.participants-table td:last-child, .participants-table th:last-child { padding-right: 0; }
.actions { display: flex; align-items: end; flex-wrap: wrap; gap: 7px; }
article { padding: 12px 0; border-top: 1px solid var(--line); }
.login { max-width: 440px; margin: min(8vh, 60px) auto; }
.login h1 { margin: 0 0 20px; font-size: 1.6rem; }
.login button { width: 100%; margin-top: 15px; }
.error { color: var(--danger); }
.code { font: 700 clamp(1.1rem, 4vw, 2rem) ui-monospace, monospace; color: var(--gold); }

@media (max-width: 790px) {
  .participants-table, .participants-table tbody { display: block; }
  .participants-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .participants-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 12px;
    padding-block: 13px;
    border-top: 1px solid var(--line);
  }
  .participants-table td { min-width: 0; padding: 0; border: 0; }
  .participants-table td:first-child { font-weight: 630; overflow-wrap: anywhere; }
  .participants-table td:last-child { grid-column: 1 / -1; }
  .cell-label { display: block; color: var(--muted); font-size: .8rem; }
}

@media (max-width: 580px) {
  .layout { width: calc(100% - 28px); }
  .site-header { min-height: 62px; }
  nav a { padding-inline: 8px; font-size: .83rem; }
  main { padding-top: 20px; }
  .control-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .metrics { gap: 6px; }
  .metrics > div { padding: 9px 7px; }
  .metrics span { font-size: .75rem; }
  .metrics strong { font-size: 1.25rem; }
}
