/* Inter, self-hosted (CSP blocks CDNs). Variable font: one file per subset covers 400-800. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* RixMind palette — matches the PMO portal (#0054FF primary) */
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #0054ff;
  --accent-dark: #0047d6;
  --accent-ghost: #e8f0ff;
  --bg: #f7f8fa;
  --card: #ffffff;
  --hover: #f3f5f8;
  /* Status colours come in two strengths, and mixing them up is the single
     most common contrast failure in status UI. --free is the FILL: use it for
     a dot, a border or an SVG stroke. --free-ink is the same hue darkened
     until it passes 4.5:1 as TEXT, including on --free-bg. Measured: the fill
     reaches only 3.30:1 on white and 2.95:1 on its own tint. */
  --free: #16a34a;
  --free-ink: #147038;
  --free-bg: #e7f6ec;
  --mine: #0054ff;
  --mine-ink: #0054ff;   /* 5.66:1 on white — the fill is already dark enough */
  --mine-bg: #e8f0ff;
  /* --occupied was #98a2b3: 2.58:1, under the 3:1 floor for a boundary or a
     state indicator (SC 1.4.11). Darkened to clear it. */
  --occupied: #737e91;
  --occupied-ink: #5a6270;
  --occupied-bg: #f2f4f7;
  --blocked: #d92d20;
  --blocked-ink: #c02717;
  --blocked-bg: #fdecea;
  /* Dividers vs. control boundaries are different jobs with different
     thresholds: a divider is decoration, a field border is the only thing
     telling you where the field is and needs 3:1. --line was doing both at
     1.24:1. */
  --line-strong: #878e9e;
  /* A "disabled / out of range" text colour that is still readable. --line was
     being used for this at 1.24:1, which is invisible. Measured 4.99:1 on
     card, 4.57:1 on --hover and 4.70:1 on --bg — it has to clear 4.5 on all
     three, because weekend cells sit on --hover and the strip nav on --bg. */
  --dim-ink: #68707e;
  --warn-ink: #7a5c00;
  --warn-bg: #fdf3d7;
  --warn-line: #e5c14c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  --sidebar-w: 236px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; margin: 0.4rem 0 1rem; }
h2 { font-weight: 600; letter-spacing: -0.01em; }

/* ---------- App shell ---------- */

.shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 1.25rem 0.85rem 1rem;
  z-index: 30;
}

.brand { display: inline-block; text-decoration: none; }
.brandlogo { height: 26px; width: auto; display: block; }
.applabel {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar .brand { padding: 0.25rem 0.55rem 1rem; }

.sidenav { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; overflow-y: auto; }
.navlink {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.navlink svg { width: 18px; height: 18px; flex: none; }
.navlink:hover { background: var(--hover); color: var(--ink); }
.navlink.active { background: var(--accent-ghost); color: var(--accent); font-weight: 600; }

.navsection {
  margin: 1.1rem 0 0.35rem;
  padding: 0.55rem 0.75rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidefoot { border-top: 1px solid var(--line); padding-top: 0.8rem; margin-top: 0.8rem; }
.userchip { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.35rem 0.6rem; min-width: 0; }
.avatar {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-ghost);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}
.username { font-weight: 600; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signoutform { margin: 0; }
.signout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.signout svg { width: 16px; height: 16px; }
.signout:hover { background: var(--hover); color: var(--ink); }

.content { margin-left: var(--sidebar-w); padding: 1.6rem 2rem 3rem; }
.content.solo { margin-left: 0; }
.page { max-width: 900px; margin: 0 auto; }

.mobilebar { display: none; }
.backdrop { display: none; }

/* ---------- Focus + skip link ---------- */

/* One rule, every control. This was missing entirely: three rules below did
   `outline: none` and substituted a box-shadow, and everything else fell back
   to the browser default. :focus-visible so a mouse click does not draw it.
   The 2px offset is load-bearing — a ring drawn ON a filled button reaches
   about 1.5:1 against that fill and is invisible; offset onto the surrounding
   surface it passes comfortably. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* A box-shadow ring is removed in Windows forced-colors mode, so the three
   fields that use one keep a real outline there as well. */
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight; }
}

/* WCAG 2.4.1 (level A). An admin meets eleven nav links before <main>, and
   landmarks do not help the person who needs this: sighted, keyboard-only,
   no assistive technology, nothing but Tab. */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.12s ease;
}
.skip-link:focus { top: 0.5rem; }

/* The target takes tabindex="-1" so focus actually moves there; suppress the
   ring on the region itself, which is not an interactive control. */
#main-content:focus { outline: none; }

/* Visually hidden, still in the accessibility tree. clip-path rather than
   display:none, which would remove it from the tree as well — the point is
   that a screen reader announces the column. */
.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
}
.card.center { text-align: center; max-width: 420px; margin: 14vh auto 0; padding: 2.2rem 1.6rem; }
.card h2 { margin-top: 0; font-size: 1rem; }
.muted { color: var(--muted); }
.loginlogo { height: 32px; width: auto; margin-bottom: 0.9rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-small { padding: 0.35rem 0.85rem; min-height: 36px; font-size: 0.85rem; }

/* ---------- Flash + labels ---------- */

.flash { padding: 0.7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 0.8rem; font-weight: 500; }
.flash-ok { background: var(--free-bg); border: 1px solid var(--free); }
.flash-error { background: var(--blocked-bg); border: 1px solid var(--blocked); }
.flash-warn, .flash-message { background: var(--warn-bg); border: 1px solid var(--warn-line); }

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-ghost);
  color: var(--accent);
}
.tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--occupied-bg);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }

/* ---------- Day strip ---------- */

.strip { display: flex; gap: 0.45rem; align-items: stretch; margin-bottom: 1.2rem; }
.strip .datehead { flex: 1; text-align: center; margin: 0; align-self: center; }
.stripnav {
  display: flex; align-items: center; padding: 0 0.7rem;
  color: var(--accent); text-decoration: none; font-size: 1.25rem;
  border-radius: var(--radius-sm);
}
.stripnav:hover { background: var(--accent-ghost); }
.stripnav.dim { color: var(--dim-ink); }
.stripnav.dim:hover { background: none; }
.daycell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.55rem 0.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}
.daycell:hover { border-color: var(--accent); }
.daycell.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ghost); }
.daycell.sel .dow, .daycell.sel .dom { color: var(--accent); }
.daycell.dim { opacity: 0.45; box-shadow: none; }
.daycell.dim:hover { border-color: var(--line); }
.daycell .dow { font-size: 0.72rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.daycell .dom { font-weight: 700; font-size: 1.1rem; }
.freecount { font-size: 0.72rem; font-weight: 600; color: var(--free-ink); }
.freecount.fc-plenty { color: var(--free-ink); }
.freecount.fc-low { color: #a8380b; }
.freecount.fc-scarce { color: var(--blocked-ink); }
.holiday { font-size: 0.72rem; color: var(--warn-ink); }

.pips { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 0.15rem; }
.pip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--occupied-bg); color: var(--occupied-ink);
  border: 1px solid var(--line);
  font-size: 0.58rem; font-weight: 700; line-height: 1;
}
.pip-mine { background: var(--mine-bg); color: var(--mine-ink); border-color: var(--mine); }
.pip-more { background: transparent; border-style: dashed; }

.datehead { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; margin: 0.6rem 0; }

/* ---------- Floor plan ---------- */

.planhead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.planhead .datehead { margin: 0.6rem 0; }
.floorpick { margin: 0; }
.floorselect {
  padding: 0.5rem 0.7rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.9rem; font-weight: 500; color: var(--ink);
  background: var(--card); cursor: pointer; min-width: 10rem;
}
.floorselect:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ghost); }

.mapwrap {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 1rem; overflow: hidden;
}
.maptools {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap;
  padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--line);
}
.legend { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.lg { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-left: 0.55rem; }
.lg:first-child { margin-left: 0; }
.lg-free { background: var(--free); }
.lg-mine { background: var(--mine); }
.lg-occupied { background: var(--occupied); }
.lg-blocked { background: var(--blocked); }

.zoomctl { display: flex; align-items: center; gap: 0.3rem; }
.zoombtn {
  width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--ink); font-size: 1.05rem; line-height: 1; cursor: pointer;
}
.zoombtn:hover { border-color: var(--accent); color: var(--accent); }
.zoomval { min-width: 3rem; text-align: center; font-size: 0.82rem; font-weight: 600; color: var(--muted); }

.mapviewport {
  position: relative;
  height: min(62vh, 560px);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  background:
    linear-gradient(var(--hover) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--hover) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
}
.mapviewport.grabbing { cursor: grabbing; }
.plan { display: block; width: 100%; height: 100%; }
.plan a { text-decoration: none; cursor: pointer; }
.mapempty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  margin: 0; color: var(--muted); font-size: 0.95rem;
}

.floorbg { fill: var(--card); stroke: var(--line); stroke-width: 2; }

.pod { fill: var(--card); stroke: var(--line); stroke-width: 2; }
.desk-free .pod { stroke: var(--free); }
.desk-mine .pod { fill: var(--mine-bg); stroke: var(--mine); }
.desk-occupied .pod { fill: var(--occupied-bg); stroke: var(--occupied); }
.desk-blocked .pod { fill: var(--blocked-bg); stroke: var(--blocked); }
.plan a:hover .pod { stroke: var(--accent); stroke-width: 2.5; }

.desk-locked .pod { stroke-dasharray: 5 4; }
.ind-locked { fill: var(--occupied-bg); stroke: var(--occupied); }
.lockicon { fill: none; stroke: var(--occupied); stroke-width: 2; stroke-linejoin: round; }

.ind { stroke-width: 2; }
.ind-free { fill: var(--free-bg); stroke: var(--free); }
.ind-mine { fill: var(--mine); stroke: none; }
.ind-occupied { fill: var(--occupied); stroke: none; }
.ind-blocked { fill: var(--blocked-bg); stroke: var(--blocked); }
.dot-free { fill: var(--free); }
.xmark { stroke: var(--blocked); stroke-width: 3; stroke-linecap: round; }
.avatxt { fill: #fff; font-weight: 700; font-size: 15px; }

.deskname { font-weight: 700; font-size: 16px; fill: var(--ink); }
.desklabel { font-size: 13px; fill: var(--muted); }
.teamflagbox { fill: var(--accent-ghost); stroke: var(--accent); stroke-width: 1.2; }
.teamflagtext {
  fill: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  dominant-baseline: central;
  text-transform: uppercase;
}

/* Floor shapes: walls / doors / windows */
.wall { stroke: #334155; stroke-width: 9; stroke-linecap: round; }
.window { stroke: #93c5fd; stroke-width: 8; }
.window-inner { stroke: #ffffff; stroke-width: 2.5; }
.door-leaf { stroke: #64748b; stroke-width: 4; stroke-linecap: round; }
.door-arc { fill: none; stroke: #94a3b8; stroke-width: 2; stroke-dasharray: 5 5; }

/* Floor-plan editor */
.editactions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.toolpalette { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.toolbtn {
  padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink); font: inherit; font-size: 0.85rem; cursor: pointer;
}
.toolbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.toolbtn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.toolbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.toolsep { width: 1px; height: 1.4rem; background: var(--line); margin: 0 0.3rem; }

.mapviewport.editor { cursor: default; }
.desk-edit { cursor: grab; }
.desk-edit .pod { fill: var(--card); stroke: var(--line); stroke-width: 2; }
.desk-edit:hover .pod { stroke: var(--accent); }
.desk-edit.selected .pod { stroke: var(--accent); stroke-width: 3; }
.desk-edit.dragging { cursor: grabbing; }
.desk-edit.dragging .pod { stroke: var(--accent); stroke-width: 2.5; filter: drop-shadow(0 2px 6px rgba(16,24,40,0.18)); }

.mapviewport.editor.drawing, .mapviewport.editor.drawing .desk-edit { cursor: crosshair; }
.shape-grab { stroke: transparent; stroke-width: 18; stroke-linecap: round; }
.shape-hit { cursor: pointer; }
.shape-hit.selected .wall,
.shape-hit.selected .window,
.shape-hit.selected .door-leaf,
.shape-hit.selected .door-arc { stroke: var(--accent); }
.preview { opacity: 0.6; }

/* ---------- Tables ---------- */

.list {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius-sm);
}
.list td { padding: 0.6rem 0.65rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list th {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.list tbody tr:last-child td { border-bottom: none; }
.list tr:hover td { background: var(--hover); }
.deskcell { font-weight: 700; width: 3.5rem; }
.actions { text-align: right; width: 1%; white-space: nowrap; }
.actions form { display: inline; }

table.list { border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.card .list { border: none; box-shadow: none; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.4rem; }
.dot-free { background: var(--free); }
.dot-mine { background: var(--mine); }
.dot-occupied { background: var(--occupied); }
.dot-blocked { background: var(--blocked); }

/* ---------- Booking form ---------- */

.calgrid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.4rem;
  margin: 1rem 0 1.2rem;
}
.cal-head {
  text-align: center; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted); padding: 0.2rem 0;
}
.cal-head.we { color: var(--dim-ink); }
.cal-cell {
  position: relative; min-height: 3.2rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem; background: var(--card); font-size: 0.85rem;
}
.cal-num { font-weight: 700; font-size: 1rem; line-height: 1; }
.cal-mon { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.cal-note { font-size: 0.66rem; color: var(--muted); line-height: 1.15; }
.cal-cell.bookable { cursor: pointer; padding-left: 1.9rem; }
.cal-cell.bookable:hover { border-color: var(--accent); }
.cal-cell.bookable input {
  position: absolute; top: 0.5rem; left: 0.5rem;
  width: 1.05rem; height: 1.05rem; accent-color: var(--accent); margin: 0;
}
.cal-cell.bookable:has(input:checked) {
  border-color: var(--accent); background: var(--accent-ghost);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.cal-cell.weekend { background: var(--hover); color: var(--dim-ink); }
.cal-cell.weekend .cal-num { color: var(--dim-ink); }
.cal-cell.out { background: transparent; border-style: dashed; opacity: 0.5; }
.cal-cell.unavail { background: var(--hover); color: var(--muted); }
.cal-cell.unavail .cal-num { color: var(--muted); }
.calactions { display: flex; gap: 0.6rem; }

@media (max-width: 640px) {
  .calgrid { gap: 0.25rem; }
  .cal-cell { min-height: 2.6rem; padding: 0.3rem; font-size: 0.75rem; }
  .cal-cell.bookable { padding-left: 0.3rem; }
  .cal-cell.bookable input { position: static; margin-bottom: 0.1rem; }
  .cal-num { font-size: 0.85rem; }
}

.away ul { margin: 0; padding-left: 1.2rem; }
.away li { padding: 0.15rem 0; }

/* ---------- Admin forms ---------- */

.deskform, .resform { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: end; }
.deskform label, .resform label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.deskform input, .deskform select, .resform input, .resform select {
  padding: 0.5rem 0.6rem; border: 1px solid var(--line-strong); border-radius: 8px;
  font-family: inherit; font-size: 0.92rem; color: var(--ink); background: var(--card);
}
.deskform input:focus, .deskform select:focus, .resform input:focus, .resform select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ghost);
}
.deskform input[type=number] { width: 5rem; }
.teamform { display: flex; gap: 0.4rem; align-items: center; }
.teamform select {
  padding: 0.35rem 0.5rem; border: 1px solid var(--line-strong); border-radius: 8px;
  font-family: inherit; font-size: 0.85rem; color: var(--ink); background: var(--card);
}
.jsonbox {
  width: 100%; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem; padding: 0.6rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); color: var(--ink); background: var(--card); resize: vertical;
}
.jsonbox:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ghost); }
.resform p { display: flex; flex-wrap: wrap; gap: 0.7rem; width: 100%; margin: 0.3rem 0; }
input[type=checkbox] { accent-color: var(--accent); }
.daypick-label { font-size: 0.82rem; font-weight: 500; color: var(--muted); align-self: center; }
.daypick { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.daypick label {
  flex-direction: row; align-items: center; gap: 0.3rem;
  font-size: 0.85rem; color: var(--ink); cursor: pointer;
}

/* ---------- Mobile ---------- */

@media (max-width: 840px) {
  .mobilebar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    padding: 0 0.8rem;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    z-index: 20;
  }
  .mobilebar .brandlogo { height: 22px; }
  .navbtn {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--ink);
    cursor: pointer;
  }
  .navbtn svg { width: 22px; height: 22px; }
  .navbtn:hover { background: var(--hover); }

  .sidebar { transform: translateX(-100%); transition: transform 0.18s ease; box-shadow: none; }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 8px 30px rgba(16, 24, 40, 0.18); }
  body.nav-open .backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(17, 24, 39, 0.35);
    z-index: 25;
    cursor: pointer;
  }

  .content { margin-left: 0; padding: calc(56px + 1rem) 1rem 3rem; }
  .content.solo { padding-top: 1rem; }
  .card { padding: 1rem 1.1rem; }
}
