* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #14161a; color: #e6e8eb;
  padding: 24px; max-width: 1060px; margin: 0 auto;
}
h1 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.sub { color: #8a919c; font-size: 13px; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }
.panel {
  background: #1c1f26; border: 1px solid #2a2e37; border-radius: 10px;
  padding: 16px;
}
.panel h2 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: #8a919c; margin-bottom: 12px;
}
video { width: 100%; border-radius: 6px; background: #000; aspect-ratio: 4/3; }

/* FaceTime-style call stage: remote large, self PiP */
.stage { position: relative; border-radius: 6px; overflow: hidden; background: #000; aspect-ratio: 4/3; }
.stage video { width: 100%; height: 100%; object-fit: cover; border-radius: 0; aspect-ratio: auto; }
.tile-remote { position: absolute; inset: 0; }
.tile-self {
  position: absolute; right: 10px; bottom: 10px; width: 28%; aspect-ratio: 4/3;
  border-radius: 8px; overflow: hidden; border: 1px solid #2a2e37;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55); background: #0a0b0d; z-index: 2;
}
.novideo {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #5b6470; font-size: 13px; letter-spacing: 0.05em; background: #0a0b0d;
}
.tile-self .novideo { font-size: 11px; }
.tag {
  position: absolute; left: 8px; bottom: 8px; z-index: 3;
  font-size: 11px; font-weight: 600; color: #e6e8eb;
  background: rgba(0, 0, 0, 0.55); border-radius: 5px; padding: 2px 8px;
}
button {
  font: inherit; font-weight: 600; color: #fff; border: none; border-radius: 8px;
  padding: 10px 18px; cursor: pointer; background: #3b4351;
}
button:hover:not(:disabled) { filter: brightness(1.15); }
button:disabled { opacity: 0.4; cursor: default; }
button.primary { background: #2f6feb; }
button.mark { background: #b3261e; font-size: 18px; padding: 14px 28px; }
button.small { padding: 4px 10px; font-size: 12px; font-weight: 500; }
button.muted { background: #b3261e; }
input[type="text"], input[type="password"], input[type="datetime-local"],
input[type="number"], select {
  font: inherit; font-size: 13px; color: #e6e8eb;
  background: #14161a; border: 1px solid #2a2e37; border-radius: 6px;
  padding: 8px 10px; flex: 1; min-width: 160px;
}
input:focus, select:focus { outline: none; border-color: #2f6feb; }
input[type="datetime-local"] { color-scheme: dark; }
td input[type="text"] { width: 100%; padding: 4px 8px; font-size: 12px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.clock { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; }
.rec-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #555; vertical-align: baseline; margin-right: 6px;
}
.rec-dot.live { background: #ff3b30; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.status { font-size: 13px; color: #aab1bb; line-height: 1.7; margin-top: 8px; }
.status b { color: #e6e8eb; font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 4px 8px; border-bottom: 1px solid #262a32; }
th { color: #8a919c; font-weight: 500; }
.chunk-active { color: #f5b942; }
.chunk-playing { color: #4cc38a; }
.scroll { max-height: 180px; overflow-y: auto; }
.banner {
  font-size: 13px; padding: 8px 12px; border-radius: 6px; margin-top: 10px;
  background: #1b2b1f; color: #4cc38a; display: none;
}
.banner.show { display: block; }

/* Interactive timeline */
#timeline {
  position: relative; height: 38px; margin-top: 4px;
  background: #14161a; border: 1px solid #2a2e37; border-radius: 6px;
  cursor: crosshair; overflow: hidden; user-select: none; touch-action: none;
}
.tl-chunk { position: absolute; top: 0; height: 100%; background: #24344f; border-right: 1px solid #1c1f26; }
.tl-live {
  position: absolute; top: 0; height: 100%;
  background: repeating-linear-gradient(45deg, #3a2f18, #3a2f18 6px, #2c2513 6px, #2c2513 12px);
}
.tl-sel {
  position: absolute; top: 0; height: 100%; pointer-events: none;
  background: rgba(47, 111, 235, 0.45); outline: 1px solid #2f6feb;
}
.tl-mark { position: absolute; top: 0; width: 2px; height: 100%; background: #ff3b30; pointer-events: none; }
.tl-mark.sys { background: #8a919c; }
.tl-playing {
  position: absolute; top: 0; height: 100%; pointer-events: none;
  background: rgba(76, 195, 138, 0.35); outline: 1px solid #4cc38a;
}
/* Client view hides everything that belongs only on the coach's screen.
   (For the client LOGIN those elements are not rendered at all; this class
   only powers the coach's preview toggle.) */
body.client-view .coach-only { display: none !important; }
.meter {
  flex: 1; height: 6px; min-width: 120px; border-radius: 3px; overflow: hidden;
  background: #14161a; border: 1px solid #2a2e37;
}
#meterFill { height: 100%; width: 0%; background: #4cc38a; transition: width 60ms linear; }
.tl-labels { display: flex; justify-content: space-between; font-size: 11px; color: #8a919c; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Consent overlay */
.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); z-index: 10;
  display: none; align-items: center; justify-content: center;
}
.overlay.show { display: flex; }
.modal {
  background: #1c1f26; border: 1px solid #2a2e37; border-radius: 12px;
  padding: 24px; max-width: 440px; margin: 16px;
}
.modal h3 { font-size: 15px; margin-bottom: 8px; }
.modal p { font-size: 13px; color: #aab1bb; line-height: 1.6; margin-bottom: 16px; }

footer {
  margin-top: 28px; padding: 14px 16px;
  border-top: 1px solid #2a2e37;
  font-size: 12px; color: #8a919c; line-height: 1.7;
}
footer b { color: #aab1bb; }

/* Explainer notes */
.notes details { border-bottom: 1px solid #262a32; }
.notes details:last-child { border-bottom: none; }
.notes summary {
  cursor: pointer; padding: 10px 4px; font-size: 13px; font-weight: 600; color: #c3c9d1;
  list-style: none;
}
.notes summary::before { content: "\25B8\00A0"; color: #8a919c; }
.notes details[open] summary::before { content: "\25BE\00A0"; }
.notes .body { padding: 0 4px 14px 18px; font-size: 13px; color: #aab1bb; line-height: 1.7; }
.notes .body b { color: #e6e8eb; }
.notes ul { margin: 4px 0 4px 18px; }
.notes li { margin-bottom: 4px; }

/* App chrome (login + dashboards) */
nav {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  font-size: 13px; color: #8a919c;
}
nav .who { font-weight: 600; color: #c3c9d1; }
nav a { color: #6ea2ff; text-decoration: none; }
nav a:hover { text-decoration: underline; }
nav .spacer { flex: 1; }
.login-card { max-width: 360px; margin: 10vh auto 0; }
.login-card .panel { padding: 24px; }
.login-card label { display: block; font-size: 12px; color: #8a919c; margin: 12px 0 4px; }
.login-card input { width: 100%; }
.login-card button { width: 100%; margin-top: 18px; }
.error {
  background: #2b1b1b; color: #ff8a80; font-size: 13px;
  border-radius: 6px; padding: 8px 12px; margin-top: 12px;
}
.hint { font-size: 12px; color: #5b6470; line-height: 1.7; margin-top: 16px; }
.hint code { color: #8a919c; }
.stack { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.mt { margin-top: 20px; }
.empty { font-size: 13px; color: #5b6470; padding: 6px 0; }
a.btnlink {
  display: inline-block; font-size: 12px; font-weight: 600; color: #fff;
  background: #2f6feb; border-radius: 8px; padding: 6px 14px; text-decoration: none;
}
a.btnlink.gray { background: #3b4351; }
a.plain { color: #6ea2ff; text-decoration: none; }
a.plain:hover { text-decoration: underline; }
form.inline { display: inline; }
button.linkish {
  background: none; border: none; color: #ff8a80; font-size: 12px;
  font-weight: 500; padding: 2px 4px; cursor: pointer;
}
