/* dash.yourdashes.com — same palette as the admin site, so the two read as one
   product rather than two.

   The tokens are copied from admin/public/assets/admin.css deliberately, not
   approximated: two "nearly matching" dark blues look like a mistake, and the
   difference is invisible until the pages sit side by side.

   What does NOT come across is the density. Admin is a tool for scanning a
   fleet; this is where somebody reads their mother answering a question about
   her first job. Bigger type, more air, and the chrome stays out of the way. */

:root {
  --bg:      #0a1220;
  --panel:   #101c30;
  --panel-2: #16263f;
  --line:    #1e3552;
  --ink:     #dce9f7;
  --muted:   #7b96b8;
  --accent:  #37b6e9;
  --accent-d:#1f6fb2;
  --bad:     #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* 16px, not the admin's 14: this page is for reading prose, not scanning
     columns. */
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

main { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }

h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 4px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .07em;
     color: var(--muted); font-weight: 600; margin: 28px 0 10px; }
h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.01em; }

a { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ─── Header ─────────────────────────────────────────────────────────────── */

.top {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}
.brand { display: inline-block; line-height: 0; }
.brand img { height: 34px; width: auto; display: block; }

.top nav { margin-top: 12px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.top nav a:hover { color: var(--ink); }

/* Device ID, Wi-Fi, name, firmware, last used. */
.devinfo { display: flex; flex-wrap: wrap; gap: 18px; margin: 14px 0 0; }
.devinfo div { min-width: 110px; }
.devinfo dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
              color: var(--muted); }
.devinfo dd { margin: 3px 0 0; font-size: 14px; font-variant-numeric: tabular-nums; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */

/* No drop shadow and no heavy border. The old design used a 1.5px outline and a
   hard offset shadow, which reads as deliberate on paper and as clutter on a
   dark ground — depth here comes from the panel being lighter than the page. */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
}
.card.narrow { max-width: 400px; }
.card.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card.row input { flex: 1 1 200px; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */

label { display: block; margin: 12px 0; font-size: 13px; color: var(--muted); }
input {
  font: inherit; font-size: 15px; width: 100%; display: block; margin-top: 5px;
  padding: 10px 12px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
}
input:focus { outline: 2px solid var(--accent-d); outline-offset: -1px; }

button {
  font: inherit; font-size: 15px; cursor: pointer;
  background: var(--accent-d); color: #fff;
  border: 0; border-radius: 8px; padding: 10px 18px;
}
button:hover { background: var(--accent); }
button.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
button.danger:hover { background: var(--bad); color: var(--bg); }
button.link {
  background: none; border: 0; color: var(--accent); padding: 2px 5px;
  text-decoration: underline; font-size: 13px;
}
button.link:hover { background: none; color: var(--ink); }
.inline { display: inline; }

/* ─── Notices ────────────────────────────────────────────────────────────── */

.flash {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 12px 16px; margin: 0 0 16px;
}
.muted { color: var(--muted); font-size: 14px; }
.err { color: var(--bad); margin: 0 0 12px; font-size: 14px; }

.pill {
  font-size: 11px; border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 9px; margin-left: 6px; white-space: nowrap; color: var(--muted);
}
.pill.done { background: var(--accent-d); border-color: var(--accent-d); color: #fff; }

/* ─── Questions ──────────────────────────────────────────────────────────── */

.questions { padding-left: 0; list-style: none; margin: 0; }
.questions li {
  display: flex; gap: 12px; align-items: baseline;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.questions .num { width: 2.6em; text-align: right; color: var(--muted);
                  font-variant-numeric: tabular-nums; font-size: 13px; }
.questions .body { flex: 1; }
.questions .actions { white-space: nowrap; }
.hidden-q .body { opacity: .4; text-decoration: line-through; }

/* ─── Answers ────────────────────────────────────────────────────────────── */

.answer audio {
  width: 100%; margin: 10px 0; height: 36px;
  /* The stock player is near-white and glares against a dark page. */
  filter: invert(1) hue-rotate(180deg) brightness(1.1) saturate(.8);
}

/* The transcript is the reason this page exists, so it gets the most readable
   setting on it: full contrast, generous leading, and a rule down the left so
   it reads as speech rather than interface. */
.transcript {
  white-space: pre-wrap; margin: 10px 0 0;
  font-size: 16px; line-height: 1.7; color: var(--ink);
  border-left: 2px solid var(--accent-d); padding-left: 14px;
}

.kv { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0; }
.kv dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kv dd { margin: 3px 0 0; font-size: 14px; }

/* ─── Device activity log ────────────────────────────────────────────────── */

.log { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 4px; }
.log th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); font-weight: 600;
  padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line);
}
.log td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
/* An upstream error can be long; wrap it rather than widen the page. */
.log td:last-child { word-break: break-word; }
.log tr.bad td { color: var(--bad); }
.log tr.bad td:nth-child(3) { font-weight: 700; }

@media (max-width: 700px) {
  main { padding: 18px 14px 48px; }
  h1 { font-size: 24px; }
}
