/* Axes blue — the gradient of the company logo (#0B568C → #1571AA → #1E8BC8). */
:root {
  --brand: #1571aa;
  --brand-dark: #0b568c;
  --brand-2: #1e8bc8;
  --brand-tint: #e6f4fe;
  --ink: #13202b;
  --muted: #5e6b78;
  --line: #dce6ef;
  --bg: #f3f6f9;
  --card: #ffffff;
  --free: #1e7b3c;
  --free-tint: #e3f3e8;
  --soon: #b45f06;
  --soon-tint: #fdf0dc;
  --busy: #c3272b;
  --busy-tint: #fce4e4;
  --off: #9aa5b1;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgba(16, 40, 64, .06), 0 4px 16px rgba(16, 40, 64, .06);
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }

/* ---- top bar ---- */
.top { display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 60px; color: #fff;
  background: linear-gradient(110deg, var(--brand-dark), var(--brand) 55%, var(--brand-2)); }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; letter-spacing: .2px; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.18); font-weight: 800; }
.top nav { display: flex; gap: 4px; flex: 1; }
.top nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 8px; opacity: .92; }
.top nav a:hover { background: rgba(255,255,255,.14); opacity: 1; }
.user { font-size: 13px; display: flex; gap: 8px; align-items: center; }
.user a { margin-left: 8px; }
.user a { color: #fff; opacity: .85; }
main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 56px; }

/* ---- icons (Bootstrap Icons font) ---- */
.bi { line-height: 1; vertical-align: -0.125em; }
.btn .bi, .top nav .bi, .user .bi { font-size: 1.05em; }
.logo .bi { font-size: 17px; vertical-align: 0; }
.tl-icon .bi { font-size: 14px; vertical-align: 0; }

/* ---- typography ---- */
h1 { margin: 0; font-size: 26px; letter-spacing: -.2px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 32px 0 12px; font-weight: 700; }
h3 { margin: 0; font-size: 17px; }
.lead { font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }

/* ---- buttons ---- */
.btn, button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; padding: 9px 16px;
  border: 0; border-radius: 9px; background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover, button:hover { background: var(--brand-dark); }
.btn.small, button.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--brand-tint); }
.btn.danger, button.danger { background: var(--danger); }

/* ---- generic cards / notices ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.notice { background: var(--brand-tint); border: 1px solid #9fd0ef; border-radius: 10px; padding: 10px 14px; margin-top: 16px; }
.notice.error { background: #fee2e2; border-color: #fca5a5; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 22px; }
.empty p { margin: 4px 0; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 4px 0; }
.code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: 1px; color: var(--brand); }
.code.big { font-size: 26px; letter-spacing: 3px; }

/* ---- pending pairing requests ---- */
.pending-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pending-card { display: grid; gap: 6px; padding: 16px 18px; border-radius: 14px; background: var(--card); text-decoration: none;
  color: var(--ink); border: 2px solid var(--brand-2); box-shadow: var(--shadow); }
.pending-card:hover { background: var(--brand-tint); }
.pending-card .btn { justify-self: start; }
.pending-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* ---- room cards ---- */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.room { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line);
  border-top: 6px solid var(--off); display: flex; flex-direction: column; }
.room.free { border-top-color: var(--free); }
.room.soon { border-top-color: var(--soon); }
.room.busy { border-top-color: var(--busy); }
.room header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 6px; }
.room-body { padding: 4px 18px 10px; flex: 1; }
.room-body p { margin: 6px 0; }
.room footer { border-top: 1px solid var(--line); padding: 10px 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 48px; }
.state { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: #eef1f4; color: var(--muted); }
.state.free { background: var(--free-tint); color: var(--free); }
.state.soon { background: var(--soon-tint); color: var(--soon); }
.state.busy { background: var(--busy-tint); color: var(--busy); }
.tablet-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--bg); border-radius: 999px; padding: 4px 12px; }

/* ---- status dot ---- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--off); flex: none; }
.dot.on { background: #22a559; box-shadow: 0 0 0 3px rgba(34,165,89,.18); }

/* ---- tablets ---- */
.tablets { display: grid; gap: 12px; }
.tablet { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 16px 18px; }
.tablet-head { display: flex; align-items: center; gap: 12px; }
.tablet-title { flex: 1; min-width: 0; }
.tablet-title .small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.active { background: var(--brand-tint); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 14px 0 0; padding: 12px 0 0 22px;
  border-top: 1px solid var(--line); }
.facts > div { min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facts dd.ok { color: #1a7f45; font-weight: 600; }
.facts dd.warn { color: var(--danger); font-weight: 600; }
.facts .who { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.facts .bi.low { color: var(--danger); }
.edit-panel { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 14px;
  padding: 14px 0 0 22px; border-top: 1px solid var(--line); }
.edit-panel[hidden] { display: none; }
form.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }

/* ---- app releases ---- */
.release-hero { display: flex; justify-content: space-between; gap: 24px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px 24px; }
.release-info { display: grid; gap: 8px; min-width: 0; }
.release-version { font-size: 34px; font-weight: 800; color: var(--brand-dark); letter-spacing: -.5px; }
.release-notes { margin: 0; white-space: pre-line; }
.release-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.release-qr { border-radius: 10px; border: 1px solid var(--line); flex: none; image-rendering: pixelated; }
form.upload { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
form.upload .grow { flex: 1; }
form.upload .full { flex-basis: 100%; }
textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); resize: vertical; }
input[type=file] { padding: 8px 9px; line-height: 1.4; }
.grow { flex: 1; min-width: 0; }
.facts a.update { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--soon); text-decoration: none; }

/* ---- timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.timeline li { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.tl-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex: none; line-height: 0; }
.tl-icon svg, .btn svg { display: block; }

/* ---- forms ---- */
form.stack { display: grid; gap: 12px; margin: 10px 0; max-width: 380px; }
form.inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, select { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; min-width: 200px; }
input:focus, select:focus { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.codeinput { font-family: ui-monospace, Consolas, monospace; font-size: 24px; letter-spacing: 3px; text-transform: uppercase; width: 200px; }
ol.steps li { margin-bottom: 10px; }

@media (max-width: 860px) {
  .release-hero { flex-direction: column; align-items: flex-start; }
  .top { gap: 12px; padding: 0 14px; height: auto; flex-wrap: wrap; padding-block: 10px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .edit-panel { padding-left: 0; }
}
