:root {
  --green: #1f7a3d;
  --green-dark: #155c2d;
  --bg: #f4f6f4;
  --card: #ffffff;
  --line: #dde3dd;
  --text: #1b2a1f;
  --muted: #5d6b60;
  /* design tokens */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 21, 15, 0.04), 0 1px 3px rgba(16, 21, 15, 0.07);
  --shadow: 0 4px 16px rgba(16, 21, 15, 0.07), 0 1px 3px rgba(16, 21, 15, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 21, 15, 0.14);
  --ring: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* visible keyboard-focus ring on all interactive controls */
:focus-visible { outline: none; box-shadow: var(--ring); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--green); box-shadow: var(--ring); }
/* form controls don't inherit the page font by default — make them match */
button, input, select, textarea { font-family: inherit; }
/* let the content area grow so the footer sits at the bottom on short pages */
main { flex: 1 0 auto; }
/* top app CTA banner (smart-app-banner style) — mobile only */
.appcta {
  background: var(--green);
  color: #fff;
  padding: 12px 16px;
  display: none; /* shown only on mobile (see media query) */
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.appcta-left { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.appcta-icon { width: 52px; height: 52px; border-radius: 12px; display: block; }
.appcta-name { display: flex; flex-direction: column; line-height: 1.15; gap: 2px; }
.appcta-name b { font-size: 14px; }
.appcta .stars { color: #ffd54a; font-size: 13px; letter-spacing: 1px; }
.rating-count { font-size: 11px; color: rgba(255, 255, 255, 0.85); }
.rating-line { display: flex; align-items: center; gap: 6px; line-height: 1.15; }
.rating-num { font-size: 11px; color: rgba(255, 255, 255, 0.85); }
.appcta-btn {
  margin-left: auto;
  flex: 0 0 auto;
  background: #fff;
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.appcta-btn:hover { background: rgba(255, 255, 255, 0.85); }

header {
  background: var(--card);
  color: var(--text);
  padding: 8px 24px;
  min-height: 80px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 10;
}
header h1 { margin: 0; font-size: 20px; }
.brand { display: flex; align-items: center; flex: 1 1 0; } /* equal side column → nav centers */
.brand img, .brand-fallback { cursor: pointer; } /* only the logo is the clickable home button */
.brand img { height: 58px; width: auto; display: block; border-radius: 10px; } /* white-bg logo as a badge on the green bar */
.brand-fallback { display: none; font-size: 20px; font-weight: 700; color: var(--text); }
/* nav tabs live in the header bar (centered) on desktop */
#tabs { flex: 0 0 auto; justify-content: center; position: relative; } /* anchors the sliding ink bar */
nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}
/* the active-tab underline is one element that slides between tabs (positioned by JS) */
.tab-ink {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--green);
  transition: left 0.25s ease, width 0.25s ease;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .tab-ink { transition: none; }
}
.tab {
  background: none;
  border: none;
  color: var(--muted);
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.tab:hover:not(.active) { color: var(--text); border-bottom-color: var(--line); }
.tab.active { color: var(--green); font-weight: 600; } /* underline comes from the sliding .tab-ink */
/* thin warning strip under the header: active monitors with no notification channel on */
.notif-warn { background: #b3261e; color: #fff; font-size: 12px; text-align: center; padding: 6px 14px; }
.notif-warn button { background: none; border: 0; padding: 0; margin-left: 4px; color: #fff; font-size: 12px; font-weight: 700; text-decoration: underline; cursor: pointer; }

.panel { display: none; padding: 24px; max-width: 1000px; margin: 0 auto; }
.panel.active { display: block; }
/* tab switches: a push transition — the outgoing panel is overlaid absolutely (so panel
   heights don't matter) and slides out one way while the incoming panel slides in from
   the other, both fading. */
main { position: relative; } /* anchors the outgoing overlay */
main.tab-anim { overflow: hidden; } /* clip while JS eases main's height between panels */
/* one easing curve for the slide + the height ease, so they move together */
@media (prefers-reduced-motion: no-preference) {
  .panel.slide-in-right { animation: panel-in-right 0.32s cubic-bezier(0.33, 1, 0.68, 1); }
  .panel.slide-in-left { animation: panel-in-left 0.32s cubic-bezier(0.33, 1, 0.68, 1); }
}
.panel.slide-out-left,
.panel.slide-out-right {
  display: block; /* stays visible through the animation even though it's no longer .active */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  margin: 0 auto; /* keep the max-width centering while absolute */
  pointer-events: none;
}
.panel.slide-out-left { animation: panel-out-left 0.32s cubic-bezier(0.33, 1, 0.68, 1) both; }
.panel.slide-out-right { animation: panel-out-right 0.32s cubic-bezier(0.33, 1, 0.68, 1) both; }
@keyframes panel-in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes panel-in-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes panel-out-left { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-28px); } }
@keyframes panel-out-right { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(28px); } }
.section-title { margin: 30px 0 10px; font-size: 16px; color: var(--green-dark); }
/* admin deployment status */
.deploy-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.deploy-status:empty { display: none; }
.deploy-badge { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 8px; border-radius: 20px; color: #fff; }
.deploy-ok { background: #16a34a; }
.deploy-warn { background: #f59e0b; animation: deploy-pulse 1.2s ease-in-out infinite; }
.deploy-err { background: #ef4444; }
.deploy-muted { background: #9ca3af; }
@keyframes deploy-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.deploy-ver b { color: var(--text); font-weight: 700; }
.deploy-msg { color: var(--text); }
.deploy-note { width: 100%; font-size: 11px; color: var(--muted); }
.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
/* minimal sort toggle next to Clear in the courses header */
.sort-links { display: inline-flex; gap: 8px; }
.sort-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}
.sort-link:hover { color: var(--text); }
.sort-link.active { color: var(--green); font-weight: 600; }
label, .field { display: block; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
label small, .field small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; margin-top: 4px; }
input, select {
  display: block;
  width: 100%;
  margin-top: 5px;
  min-height: 38px; /* keep number inputs / selects exactly the same height */
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#f-maxprice { min-height: 39px; }
select[multiple] { padding: 4px; }
/* generic clear (×) button on type-in fields — like the course search box. The wrapper
   is injected around the input; the × shows only when there's text. */
.clearable { position: relative; display: block; }
.clearable > input, .clearable > textarea { padding-right: 30px; }
.clearable > input[type="number"]::-webkit-inner-spin-button,
.clearable > input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.clearable > input[type="number"] { -moz-appearance: textfield; }
.clear-x {
  position: absolute;
  right: 6px;
  bottom: 9px; /* vertically centers on a ~38px field, independent of the input's top margin */
  width: 20px;
  height: 20px;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
/* show the × only when the field has text (placeholder no longer shown) — pure CSS, so a
   programmatic clear hides it too. makeInputsClearable gives placeholder-less inputs a
   blank placeholder so this tracks emptiness for them as well. */
.clearable > input:not(:placeholder-shown) ~ .clear-x,
.clearable > textarea:not(:placeholder-shown) ~ .clear-x { display: flex; }
.clear-x:hover { color: var(--text); }
.clearable.is-textarea > .clear-x { top: 9px; bottom: auto; } /* top-anchor on multi-line fields */
/* magnifier on the left of search fields (matches the course search box); an actual SVG
   element so it follows currentColor in light/dark without the background-shorthand fight */
.clearable.has-search-icn > input { padding-left: 32px; }
.search-icn { position: absolute; left: 10px; bottom: 11px; display: flex; color: var(--muted); pointer-events: none; }
.course-count {
  width: fit-content;
  margin: 2px auto 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
}
.course-count b { font-weight: 800; display: inline-block; text-align: center; font-variant-numeric: tabular-nums; }
.course-count .icn { color: var(--green); }
.course-count:empty { display: none; }
.row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
/* form input rows (From/To date, Earliest/Latest, Players/Max price) get an 8px gap between
   the pair, matching the 8px rhythm; the action-button row keeps its wider 16px gap */
.form .row:not(.actions) { gap: 8px; }
/* inside a row, spacing between (and below) fields comes from the row's gap/margin,
   so zero the labels' own margin to keep every gap equal even when fields wrap */
.row label { margin-bottom: 0; }
.weekday-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.weekday-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.weekday-row label input { display: none; } /* the whole pill toggles */
.weekday-row label:hover { border-color: var(--green); }
.weekday-row label:has(input:checked) { background: var(--green); border-color: var(--green); color: #fff; }
.day-abbr { display: none; } /* desktop shows full day names; mobile swaps to short */
.muted-note { color: var(--muted); }
/* collapsible "Advanced" form section (monitor label + repeat weekly) */
.advanced { margin: 2px 0 14px; }
.advanced > summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 8px 0; font-size: 13px; }
.advanced > label:first-of-type { margin-top: 8px; }
/* the Advanced weekly options are Premium-only — dim + disable them for non-premium users
   (the section still expands so they can see what Premium unlocks via the badge) */
body:not(.premium) .advanced .advanced-row { opacity: 0.5; pointer-events: none; }
/* gold "Premium" badge marking the Advanced section's weekly-recurring feature */
.premium-tag {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.2px;
  color: #8a6d1b;
  background: color-mix(in srgb, #e7c94c 22%, transparent);
  padding: 1px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: 1px;
}
body.dark .premium-tag { color: #e7c94c; background: color-mix(in srgb, #e7c94c 16%, transparent); }
/* Premium compare modal */
.premium-box {
  position: relative;
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px 24px;
  max-width: 460px;
  width: 92%;
}
.premium-head { text-align: center; margin-bottom: 14px; }
.premium-head .premium-tag { margin: 0; }
.premium-head h2 { margin: 10px 0 4px; font-size: 22px; }
.premium-head .muted-note { margin: 0; }
.premium-compare { display: grid; }
.pc-row {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.pc-row.pc-head { border-top: 0; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); }
.pc-row > span:nth-child(2), .pc-row > span:nth-child(3) { text-align: center; }
.pc-label { color: var(--muted); }
.pc-prem { color: #8a6d1b; font-weight: 700; }
body.dark .pc-prem { color: #e7c94c; }
.premium-upgrade { width: 100%; margin-top: 20px; }
/* confirm-monitor modal */
.mon-confirm-title { margin: 0 0 4px; font-size: 20px; }
.mon-summary {
  background: color-mix(in srgb, var(--green) 8%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 12px 0 14px;
  font-size: 13px;
  color: var(--text);
}
.mon-summary > div + div { margin-top: 4px; color: var(--muted); }
/* account-menu upgrade link */
.acct-upgrade { color: #8a6d1b; font-weight: 700; }
body.dark .acct-upgrade { color: #e7c94c; }
/* inline upgrade CTA shown on gated features (hidden for premium users) */
.premium-inline-cta {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: color-mix(in srgb, #e7c94c 16%, transparent);
  color: #8a6d1b;
  border: 1px solid color-mix(in srgb, #e7c94c 45%, transparent);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.premium-inline-cta:hover { background: color-mix(in srgb, #e7c94c 26%, transparent); }
body.dark .premium-inline-cta { color: #e7c94c; }
body.premium .premium-inline-cta { display: none; }
/* upgrade button inside a tier-limit toast */
.toast-upgrade { flex: 0 0 auto; align-self: center; background: #e7c94c; color: #3a2e08; border: 0; border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
.toast-upgrade:hover { background: #d4af37; }
/* courses header row: label left, Clear aligned right */
.courses-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.courses-lbl { font-size: 13px; color: var(--muted); }
.courses-count { color: var(--muted); }
.picker-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 14px;
}
.picker-foot .muted-note { font-size: 11px; margin: 0; }
/* request-a-course box */
#req-course-open { display: inline-block; margin: 8px 0 14px; }
#req-course-box small { display: block; font-size: 11px; margin-bottom: 6px; }
#req-course-box input { margin-bottom: 8px; }
#req-mode { margin-bottom: 12px; }
#req-course-box textarea {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--card); /* adapts to dark mode (the ID selector outranks body.dark textarea) */
  resize: vertical;
}
/* single-course selector (reuses the catalog list data, not the multi-select picker) */
/* fixed height + flex column so the box doesn't shift and the footer centers in the gap */
.req-course-list { height: 180px; overflow-y: auto; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; }
.req-course-list .req-co { flex: 0 0 auto; display: block; width: 100%; text-align: left; padding: 7px 10px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; color: var(--text); }
.req-course-list .req-co:last-child { border-bottom: 0; }
.req-course-list .req-co:hover { background: #f1f7f3; }
.req-course-list .req-co.sel { background: var(--green); color: #fff; }
.req-course-list .req-co-where { color: var(--muted); font-size: 11px; margin-left: 6px; }
.req-course-list .req-co.sel .req-co-where { color: #dff0e6; }
/* custom course picker (clickable region headings + checkbox courses) */
/* outer box holds the holes filter (fixed at top) + the scrolling list, so they look like one
   unit but the scrollbar only spans the list below the filter */
.course-pick-wrap {
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden; /* clip the list to the rounded corners */
}
/* course search: a standalone bordered input (gets the standard green border + focus ring,
   like the other search fields), with a holes-filter funnel + clear button on the right. */
.search-row { display: flex; gap: 8px; align-items: stretch; margin-top: 5px; }
.holes-pop-wrap { position: relative; flex: 1; min-width: 0; } /* anchors the holes popover (filter-wrap clips it) */
.filter-search-icn { flex: 0 0 auto; align-self: center; margin-left: 12px; color: var(--muted); }
.filter-wrap #f-course-filter { padding-left: 8px; }
.filter-clear { flex: 0 0 auto; align-self: stretch; padding: 0 10px; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.filter-clear:hover { color: var(--text); }
.filter-holes { flex: 0 0 auto; align-self: stretch; display: inline-flex; align-items: center; padding: 0 12px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; }
.filter-holes:hover { color: var(--text); }
.filter-holes.active { color: var(--green); }
.holes-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  right: 0;
  min-width: 130px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}
.holes-opt { display: block; width: 100%; text-align: left; padding: 7px 10px; margin: 0; border: 0; background: none; font-size: 13px; color: var(--text); cursor: pointer; border-radius: 6px; }
.holes-opt:hover { background: #f1f7f3; }
.holes-opt.active { background: var(--green); color: #fff; }
.course-picker {
  height: 300px; /* fixed, not max-height: the box stays put no matter how many rows match the search */
  overflow-y: auto;
  display: flex;
  flex-direction: column; /* so the footer can fill + center in the empty space below short lists */
  /* round the scroll element's own bottom corners so the scrollbar is clipped to the box's rounding */
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}
.cp-region {
  display: block;
  width: 100%;
  text-align: left;
  position: sticky;
  top: 0; /* sticks to the top of the scroll box (holes filter sits above it, outside the scroll) */
  z-index: 1;
  background: #eef3ee;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.cp-region:hover { background: #e1efe5; }
.cp-region-cnt { font-weight: 400; color: var(--muted); margin-left: 6px; }
.cp-note { padding: 10px 12px; font-size: 12px; color: var(--muted); }
.course-picker > .cp-list { flex: 0 0 auto; } /* list keeps its natural height; footer takes the rest */
.cp-foot { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; }
.cp-foot:empty { display: none; }
.cp-course .cp-name { flex: 0 1 auto; }
.cp-course .cp-where { font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.cp-course {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.cp-course:not(:has(input:checked)):hover { background: #f0f7f2; }
.cp-course:has(input:checked) { background: #e8f5ec; }
.cp-course input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background: var(--card);
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.cp-course input[type="checkbox"]:checked { background: var(--green); border-color: var(--green); }
.cp-course input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
/* notifications tab */
.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.notif-row:last-of-type { border-bottom: none; }
.panel-intro { margin: -4px 0 16px; font-size: 13px; }
.notif-label b { font-size: 15px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  transition: 0.2s;
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:disabled + .slider { opacity: 0.5; cursor: not-allowed; }
/* quiet hours: desktop = label left, then [time inputs] [toggle] on the right */
.quiet-row { flex-wrap: wrap; }
.quiet-row .notif-label { flex: 1 1 140px; min-width: 0; }
.quiet-row .quiet-inputs { display: flex; align-items: center; gap: 8px; order: 1; flex: 2 1 220px; }
.quiet-row .quiet-toggle { order: 2; }
.quiet-inputs input { flex: 1 1 0; min-width: 0; width: auto; margin: 0; }
.quiet-inputs input:disabled { opacity: 0.5; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.row label { flex: 1; min-width: 120px; }
button.primary {
  background: var(--green);
  color: #fff;
  border: 1px solid transparent; /* match .secondary's border so sizes are identical */
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
button.primary:hover { background: var(--green-dark); }
/* the modal's Cancel reads neutral so the tinted confirm button stays the focal point */
#confirm-cancel { color: var(--muted); border-color: var(--line); }
#confirm-cancel:hover { background: color-mix(in srgb, var(--muted) 12%, transparent); border-color: var(--muted); color: var(--text); }
/* confirm-modal OK button tinted to the action it confirms */
#confirm-ok.confirm-danger { background: #b3261e; }
#confirm-ok.confirm-danger:hover { background: #8c1d18; }
#confirm-ok.confirm-warn { background: #b88a00; }
#confirm-ok.confirm-warn:hover { background: #946f00; }
button.secondary {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
button.secondary:hover { background: #d4ecdd; border-color: var(--green-dark); color: var(--green-dark); }
button.primary:active, button.secondary:active { transform: translateY(1px); }
/* Advanced: Monitor label + Repeat weekly side by side on desktop; the flex-basis +
   wrap stacks them on narrow/mobile widths automatically */
.advanced-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.advanced-row > label, .advanced-row > .field { flex: 1 1 260px; min-width: 0; } /* 50/50 on desktop, stack when too narrow */
.row { align-items: flex-end; }
.row.align-top { align-items: flex-start; } /* fields whose hints would otherwise drop the sibling control */
/* segmented toggle (e.g. Holes: All / 9 / 18) */
.seg { display: flex; margin-top: 5px; min-height: 38px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg-btn {
  flex: 1 1 0;
  border: none;
  border-left: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  padding: 8px 4px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.seg-btn:first-child { border-left: none; }
.seg-btn:hover:not(.active) { background: #eef4ff; }
.seg-btn.active { background: var(--green); color: #fff; font-weight: 600; }
.seg-sm .seg-btn { padding: 8px 2px; font-size: 13px; }
.results { display: grid; gap: 12px; }
.tee .wx { font-size: 12px; color: var(--muted); margin-top: 3px; }
.share-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-bar .muted-note { font-size: 12px; word-break: break-all; }
.tee {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.tee:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tee .tee-info { flex: 1; min-width: 0; }
.tee .when-row { display: flex; align-items: center; gap: 10px; }
.tee .when { font-weight: 700; font-size: 16px; min-width: 64px; letter-spacing: -0.01em; white-space: nowrap; }
.tee .where { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tee .price {
  font-weight: 600;
  font-size: 13px;
  color: var(--green-dark);
  background: #eef4ff;
  border-radius: 20px;
  padding: 3px 10px;
  flex: 0 0 auto;
  min-width: 48px;
  text-align: center;
  white-space: nowrap;
}
.tee .price .cart { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.tee button.price-varies { border: 0; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 3px; line-height: 1; }
.tee .price-varies .icn { width: 12px; height: 12px; }
.rate-row { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-size: 13px; }
.rate-row .rate-price { font-weight: 600; white-space: nowrap; }
.rate-head { font-weight: 600; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 2px; }
.rate-note { color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; text-align: center; }
.rate-actions { display: flex; gap: 8px; margin-top: 10px; }
.rate-actions .rate-book, .rate-actions .rate-close {
  flex: 1 1 0;
  text-align: center;
  padding: 7px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.rate-actions .rate-book { background: var(--green); color: #fff; border: 0; }
.rate-actions .rate-book:hover { background: var(--green-dark); }
.rate-actions .rate-close { background: none; border: 1px solid var(--line); color: var(--muted); }
.rate-actions .rate-close:hover { border-color: var(--green); color: var(--green); }
.rate-na { color: var(--muted); font-weight: 400; font-size: 12px; }
.tee .spots {
  display: inline-block;
  background: #e8f5ec;
  color: var(--green-dark);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}
.tee a.book {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 6px 12px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.tee a.book:hover { background: var(--green-dark); border-color: var(--green-dark); }
.tee .tee-cta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
/* spacer above Book equal to the link below it, so Book stays vertically centered */
.tee .tee-cta::before { content: ""; height: 22px; }
.course-info-link {
  margin-top: 6px;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
}
.course-info-link:hover { color: var(--green); }
.empty { color: var(--muted); padding: 36px 30px; text-align: center; }
.empty svg { display: block; margin: 0 auto 10px; opacity: 0.4; }
/* loading skeleton (search results) */
.skeleton { display: grid; gap: 10px; }
.skel-row { height: 64px; border-radius: var(--radius); background: var(--line); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.9; } }
.day-head { font-weight: 700; margin: 22px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--green-dark); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-head .share-inline { text-transform: none; letter-spacing: normal; font-weight: 500; }
.day-head:first-child { margin-top: 4px; }
.monitor {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.monitor:hover { box-shadow: var(--shadow); }
.monitor.off { border-left-color: #eab308; } /* paused = yellow edge (no dimming) */
.monitor.just-created { box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 35%, transparent); }
.monitor .m-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.monitor .m-title { font-weight: 600; font-size: 15px; }
.monitor .m-meta { color: var(--muted); font-size: 13px; margin-top: 10px; }
/* visually separate the three sections: courses | when/players | last checked */
.monitor .m-meta > div + div {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.monitor .m-actions { display: flex; gap: 8px; }
/* the action buttons reuse the course-catalog green-outline button style (see .ac-toggle) */
/* extra-recipient manager on a monitor card */
.m-recips { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.recip-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.recip-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.recip-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--green-dark);
  border-radius: 20px;
  padding: 2px 4px 2px 10px;
  font-size: 12px;
}
.recip-chip .recip-x { background: none; border: 0; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 5px; border-radius: 50%; }
.recip-chip .recip-x:hover { color: #b3261e; background: none; }
.recip-none { font-size: 12px; color: var(--muted); font-style: italic; }
/* input + Add button as a single attached control */
.recip-add {
  display: flex;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  overflow: hidden;
}
.recip-add:focus-within { border-color: var(--green); box-shadow: var(--ring); }
.recip-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  padding: 6px 10px;
}
.recip-input:focus, .recip-input:focus-visible { outline: none; box-shadow: none; }
.recip-add > button { flex: 0 0 auto; border: 0; border-radius: 0; background: var(--green); color: #fff; padding: 6px 14px; }
.recip-add > button:hover { background: var(--green-dark); color: #fff; }
/* "Shared with me" section: monitors someone else added you to (read-only) */
.shared-head { margin: 22px 0 10px; font-size: 14px; color: var(--green-dark); font-weight: 700; }
.monitor.shared { border-left-color: #6366f1; } /* indigo edge distinguishes shared from owned */
.monitor.shared.off { border-left-color: #eab308; }
.shared-by { font-weight: 400; font-size: 12px; color: var(--muted); }
.monitor.admin-user { border-left: 1px solid var(--line); } /* user rows: no green status edge (that's a monitor signal) */
.admin-user > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; }
.admin-user > summary::-webkit-details-marker { display: none; }
.admin-user > summary .m-title { font-weight: 600; font-size: 15px; }
.admin-user > summary .m-caret { margin-left: auto; color: var(--muted); transition: transform 0.15s ease; }
.admin-user[open] > summary .m-caret { transform: rotate(180deg); }
.admin-mons { margin-top: 10px; }
.user-section { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.user-section > summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }
.user-activity .ua-body { margin-top: 6px; }
.admin-mon { padding: 12px 0; }
.admin-mon + .admin-mon { border-top: 1px dashed var(--line); }
.admin-mon .m-actions { flex-wrap: wrap; }
.admin-mon .adm-meta { color: var(--muted); font-size: 13px; margin-top: 8px; }
.admin-mon .adm-meta > div + div { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.admin-controls { display: flex; gap: 8px; margin: 8px 0; } /* same rhythm as activity-controls/course-add-row */
/* always side by side, splitting the row 50/50 (shrink instead of wrapping) */
.admin-controls label { flex: 1 1 0; min-width: 0; margin: 0; }
.spinner { color: var(--muted); padding: 20px; text-align: center; }

/* account (top-right of the green header) */
.account {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 0; /* equal side column (mirrors .brand) → nav centers */
  gap: 8px;
  font-size: 13px;
  margin-left: auto; /* pin to the right of the header bar */
}
.acct-email {
  color: var(--muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.acct-btn:hover { background: #e8f5ec; }
/* account dropdown menu */
.acct-menu { position: relative; }
.acct-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.15s ease;
}
.acct-trigger:hover { background: color-mix(in srgb, var(--text) 7%, var(--bg)); }
/* small header icon button (dark-mode toggle) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease;
}
.icon-btn:hover { background: color-mix(in srgb, var(--text) 7%, var(--bg)); }
/* paid members: metallic-gold avatar + gold name (light and dark mode) */
.acct-trigger.paid .acct-avatar {
  background: linear-gradient(135deg, #f6e27a, #d4af37 55%, #b8860b);
}
.acct-trigger.paid .acct-email, .gold-name { color: #e7c94c; font-weight: 700; } /* same gold in light + dark */
body.dark .acct-trigger.paid .acct-avatar { background: linear-gradient(135deg, #f6e27a, #d4af37 55%, #b8860b); color: #1b2a1f; }
.acct-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: 0 0 auto;
}
.acct-caret { font-size: 16px; color: var(--muted); }
.acct-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  padding: 6px;
  z-index: 50;
  text-align: left;
}
.acct-dropdown[hidden] { display: none; }
.acct-dd-head { font-size: 12px; color: var(--muted); padding: 8px 10px; word-break: break-all; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-dd-item { display: block; width: 100%; text-align: left; background: none; border: none; padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--text); }
.acct-dd-item:hover { background: #eef4ff; }
.acct-dd-sep { height: 1px; background: var(--line); margin: 4px 0; }
/* site footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 24px; color: var(--muted); }
.footer-inner { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.footer-logo { height: 44px; width: auto; align-self: center; } /* don't let the flex column stretch it */
/* inline icon used in place of the old ⛳ emoji */
.ico { height: 1.2em; width: auto; vertical-align: -0.25em; border-radius: 3px; margin-right: 6px; }
.footer-note { font-size: 11px; line-height: 1.5; }
/* get-the-app section above the footer */
.get-app {
  text-align: center;
  padding: 46px 24px;
  margin-top: 28px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
}
/* scroll-reveal (only applied when JS+IO attach the .reveal class, so it stays visible otherwise) */
.get-app.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.get-app.reveal.in { opacity: 1; transform: translateY(0); }
.get-app h3 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: 0.5px; color: #fff; }
.get-app-tag { margin: 8px 0 0; font-size: 18px; font-weight: 600; }
/* On desktop the section splits into a left pitch column and a right download card.
   Below the breakpoint it collapses to the original single, centered column. */
.get-app-grid { display: grid; gap: 28px; max-width: 980px; margin: 0 auto; align-items: center; }
.ga-cta { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.ga-cta .get-app-qr { margin-top: 0; } /* the grid gap handles spacing now */
.ga-cta .get-app-rating { margin: 0; } /* the grid gap handles spacing now */
@media (min-width: 760px) {
  .get-app-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  /* set off the download column as its own translucent card */
  .ga-cta {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    padding: 28px 26px;
  }
}
.get-app-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin: 20px 0 26px;
  font-size: 14px;
  font-weight: 500;
}
.ga-feat { display: inline-flex; align-items: center; gap: 7px; }
.ga-feat .icn { opacity: 0.95; }
.get-app-rating { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.get-app-rating .stars { color: #ffd54a; letter-spacing: 1px; }
.get-app-rating .rating-text { opacity: 0.95; }
.get-app-quote { display: grid; margin: 16px auto 0; max-width: 460px; }
.get-app-quote .quote-slide { grid-area: 1 / 1; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.get-app-quote .quote-slide.active { opacity: 1; pointer-events: auto; }
.get-app-quote blockquote { margin: 0; font-style: italic; font-size: 15px; }
.get-app-quote figcaption { margin-top: 4px; font-size: 13px; font-weight: 600; opacity: 0.85; }
@media (prefers-reduced-motion: reduce) { .get-app-quote .quote-slide { transition: none; } }
.quote-dots { display: flex; justify-content: center; gap: 8px; margin: 14px 0 24px; }
.quote-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.15s ease, transform 0.15s ease;
}
.quote-dot:hover { background: rgba(255, 255, 255, 0.7); }
.quote-dot.active { background: #fff; transform: scale(1.25); }
.get-app-qr { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.get-app-qr img { width: 132px; height: 132px; background: #fff; padding: 8px; border-radius: var(--radius-sm); }
.get-app-qr .qr-label { font-size: 12px; opacity: 0.9; }
.store-badges { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.store-badges a { display: inline-block; line-height: 0; transition: transform 0.15s ease; }
.store-badges a:hover { transform: translateY(-3px); }
.store-img { display: block; height: 48px; width: auto; }
@media (prefers-reduced-motion: reduce) {
  .get-app.reveal { opacity: 1; transform: none; transition: none; }
  .store-badges a:hover { transform: none; }
}

/* floating toast notification */
.banner {
  position: fixed;
  left: 50%;
  top: 88px; /* just below the ~80px header / nav bar */
  transform: translateX(-50%);
  z-index: 1000;
  width: min(92vw, 400px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 22px;
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  animation: toast-in 0.25s ease;
}
/* colored left accent bar (clipped to the card's rounded corners) */
.banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--toast-accent);
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.banner.hiding { animation: toast-out 0.25s ease forwards; }
@keyframes toast-out {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, -14px); }
}
.toast-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--toast-accent);
  color: #fff;
}
.toast-body { flex: 1 1 auto; min-width: 0; }
.toast-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.toast-msg { font-size: 13px; color: var(--muted); margin-top: 2px; }
.toast-close {
  flex: 0 0 auto;
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 2px;
  line-height: 0;
  cursor: pointer;
  color: var(--muted);
}
.toast-close:hover { color: var(--text); }
/* countdown bar that depletes over the auto-dismiss window */
.toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--toast-accent);
  transform-origin: left;
  animation: toast-progress linear forwards;
}
@keyframes toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
.banner.ok { --toast-accent: #16a34a; }
.banner.err { --toast-accent: #ef4444; }
.banner.warn { --toast-accent: #f59e0b; }
.banner.info { --toast-accent: #3b82f6; }

/* inline sign-in box */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
  animation: pop-in 0.12s ease;
}
.auth-box {
  position: relative;
  width: min(92vw, 380px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--card);
}
.auth-box #auth-prompt, .auth-box #req-prompt, .auth-box #addcourse-prompt, #confirm-msg { font-size: 14px; color: var(--text); padding-right: 6px; }
#confirm-msg { white-space: pre-wrap; overflow-wrap: anywhere; } /* show \n and wrap long URLs */
.confirm-actions { display: flex; gap: 8px; margin-top: 16px; }
.confirm-actions button { flex: 1 1 0; padding: 9px 12px; }
.auth-box .row { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 0; }
.auth-box #auth-send, .auth-box #req-send, .auth-box #course-lookup { width: 100%; }
.auth-box #req-send { margin-top: 4px; }

/* ---- admin: usage stats + activity feed ---- */
.admin-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; } /* 10px everywhere: matches the card gap + section gap */
.admin-stats .stat {
  flex: 1 1 110px;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px;
  text-align: center;
}
.admin-stats .stat b { display: block; font-size: 20px; color: var(--green); }
.admin-stats .stat span { font-size: 11px; color: var(--muted); }
.admin-activity {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  margin: 0 0 10px; /* equal 10px gap between sections (matches the stat-card gap) */
}
.admin-activity > summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--green-dark); padding: 2px 0; list-style: none; }
.admin-activity > summary::-webkit-details-marker { display: none; } /* drop the native triangle for a rotatable one */
/* custom caret: a masked chevron (inherits the heading color) that eases between ▸ and ▾ */
.admin-activity > summary::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: rotate(-90deg); /* points right when closed */
  transition: transform 0.2s ease;
}
.admin-activity.cs-open > summary::before { transform: rotate(0); } /* points down when open (JS-synced) */
/* the collapsible body is wrapped by JS so its height can be eased open/closed */
.details-body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .admin-activity > summary::before { transition: none; }
}
#admin-events { max-height: 320px; overflow-y: auto; margin-top: 8px; }
#admin-list { max-height: 460px; overflow-y: auto; gap: 8px; } /* 8px between user rows, matching this section's controls */
.event { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: none; }
.event .ev-icon { flex: 0 0 auto; color: var(--green); display: flex; align-items: center; }
/* inline SVG icons */
.icn { vertical-align: -3px; flex: 0 0 auto; }
.acct-dd-item .icn { margin-right: 8px; }
.event .ev-body { font-size: 13px; min-width: 0; overflow-wrap: anywhere; } /* let long URLs wrap instead of overflowing */
.event .ev-when { font-size: 11px; color: var(--muted); margin-top: 2px; }
/* report-type pill (Request vs Issue) in the admin Reports queue */
.req-tag { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 1px 6px; border-radius: 20px; margin-right: 6px; vertical-align: 1px; }
.req-tag-req { background: #e8f5ec; color: var(--green-dark); }
.req-tag-issue { background: #fdecea; color: #b3261e; }
.req-actions { margin-left: auto; display: flex; gap: 6px; flex: 0 0 auto; align-items: center; }
/* admin action buttons share the app's secondary-button look (green outline, green text)
   so the panel matches the booking UI instead of reading as washed-out gray */
.ac-toggle, .req-actions button, .admin-mon button, .monitor .m-actions button {
  background: none;
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--green);
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
/* same hover as the secondary buttons (Monitor/Reset) so the green-outline look is consistent */
.ac-toggle:hover, .req-actions button:hover, .admin-mon button:hover, .monitor .m-actions button:hover { background: #d4ecdd; border-color: var(--green-dark); color: var(--green-dark); }
/* destructive actions read red (hard remove + soft delete) */
.ac-delete, .req-actions [data-req-del], .req-actions [data-to="deleted"], .admin-mon [data-act="del"], .monitor .m-actions [data-act="del"], .monitor .m-actions [data-act="leave"] { border-color: #b3261e; color: #b3261e; }
.ac-delete:hover, .req-actions [data-req-del]:hover, .req-actions [data-to="deleted"]:hover, .admin-mon [data-act="del"]:hover, .monitor .m-actions [data-act="del"]:hover, .monitor .m-actions [data-act="leave"]:hover { background: color-mix(in srgb, #b3261e 12%, transparent); border-color: #8c1d18; color: #8c1d18; }
/* Pause reads yellow to match the paused-monitor edge (Resume stays green) */
.monitor .m-actions button.mon-pause { border-color: #b88a00; color: #b88a00; }
.monitor .m-actions button.mon-pause:hover { background: color-mix(in srgb, #eab308 14%, transparent); border-color: #946f00; color: #946f00; }
/* catalog: Disable reads yellow (Enable stays green) */
.ac-toggle[data-to="0"] { border-color: #b88a00; color: #b88a00; }
.ac-toggle[data-to="0"]:hover { background: color-mix(in srgb, #eab308 14%, transparent); border-color: #946f00; color: #946f00; }

/* the filter input + location button read as one search bar (wrapper holds the border) */
.filter-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  overflow: hidden; /* clip the green button to the bar's rounded corners */
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-wrap:focus-within { border-color: var(--green); box-shadow: var(--ring); }
.filter-wrap #f-course-filter {
  flex: 1;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.filter-wrap #f-course-filter:focus-visible { box-shadow: none; } /* the wrapper shows focus */
.filter-loc {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--green);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.filter-loc:hover { background: var(--green-dark); }
.filter-loc.active { background: var(--green-dark); }
/* location popover contents */
.loc-pop .loc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.loc-pop .loc-cur { font-size: 12px; color: var(--muted); margin: 6px 0; }
.loc-pop .loc-cur b { color: var(--text); }
.loc-pop .loc-use-row { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.loc-pop .loc-zip-row { display: flex; gap: 8px; align-items: center; }
.loc-zip {
  flex: 1 1 auto;
  width: 88px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.cp-course .cp-dist { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.cp-course .cp-dist ~ .cp-info { margin-left: 8px; } /* distance took the auto; info sits beside it */

/* course-info (i) button + popover */
.cp-info {
  background: none;
  border: 0;
  padding: 0 2px;
  cursor: pointer;
  color: var(--muted);
  line-height: 0;
  vertical-align: middle;
}
.cp-info:hover { color: var(--green); }
.cp-course .cp-info { margin-left: auto; } /* right-align in the picker rows */
.course-pop {
  position: fixed;
  z-index: 1100;
  width: min(86vw, 280px);
  padding: 12px 14px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: pop-in 0.12s ease;
}
.pop-close {
  position: absolute;
  top: -11px;
  right: -11px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #333;
  color: #fff;
  border: 2px solid var(--card); /* ring so it stands off the popover edge */
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.pop-close:hover { background: #000; }
/* keep top-row content clear of the corner close button */
.course-pop .cp-name, .loc-head { padding-right: 16px; }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.course-pop .cp-name { font-weight: 700; font-size: 14px; }
.course-pop .cp-stat { color: var(--muted); margin: 4px 0 8px; }
.course-pop .cp-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 4px 0;
  color: var(--text);
  text-decoration: none;
}
.course-pop a.cp-row:hover { color: var(--green); }
.course-pop .cp-row .icn { flex: 0 0 auto; margin-top: 1px; color: var(--muted); }

/* admin: course catalog management */
.course-add-row { display: flex; gap: 8px; margin: 8px 0; align-items: flex-end; }
.course-add-field { flex: 1; min-width: 0; margin: 0; } /* even halves; label name sits above */
/* unlabeled search inputs: drop the base 5px top-margin so the row gap is a clean 8px */
.course-add-field[aria-label] > input { margin-top: 0; }
.activity-controls { display: flex; gap: 8px; margin: 8px 0; align-items: flex-end; }
.activity-cat-field { margin: 0; flex: 0 0 auto; }
.activity-cat-field select { width: auto; } /* keep the standard 5px top gap */
/* reports: Type and Status split their row 50/50 */
#admin-requests-wrap .activity-cat-field { flex: 1 1 0; min-width: 0; }
#admin-requests-wrap .activity-cat-field select { width: 100%; }
/* catalog: Status and Missing info stretch to fill the row, Add course sits flush right */
#admin-courses-wrap .course-add-row .activity-cat-field { flex: 1 1 0; min-width: 0; }
#admin-courses-wrap .course-add-row .activity-cat-field select { width: 100%; }
/* recent activity (and the per-user activity sections): search and category split 50/50 */
#admin-activity .activity-controls .course-add-field,
#admin-activity .activity-controls .activity-cat-field,
.user-activity .activity-controls .course-add-field,
.user-activity .activity-controls .activity-cat-field { flex: 1 1 0; min-width: 0; }
.course-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
.cf-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cf-ids { color: var(--muted); font-size: 12px; }
.cf-dup { color: #b3261e; font-size: 12px; font-weight: 600; }
.cf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; margin-bottom: 10px; }
.cf-field { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 12px; color: var(--muted); }
.cf-field input { margin: 0; }
.cf-actions { display: flex; gap: 8px; }
.ac-item { border-top: 1px solid var(--line); }
.ac-item.off { opacity: 0.55; }
.ac-summary { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 0; background: none; border: 0; text-align: left; color: var(--text); cursor: pointer; }
.ac-summary .ac-name { font-weight: 600; font-size: 14px; flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ac-summary .ac-sub { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; flex: 1; min-width: 0; }
.ac-pills { flex: 0 0 auto; }
.ac-missing, .ac-off-tag { background: #b3261e; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.ac-caret { color: var(--muted); display: inline-flex; flex: 0 0 auto; transition: transform 0.15s ease; }
.ac-item.expanded .ac-caret { transform: rotate(180deg); }
/* Collapsed by default; the open/close height is eased in JS (smoothCourseToggle), which
   measures the content so it can't clip a row the way the grid-rows trick did. */
.ac-details { overflow: hidden; height: 0; }
.ac-item.expanded .ac-details { height: auto; }
.ac-details-inner { padding-bottom: 10px; }
.ac-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 16px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.ac-fields span { min-width: 0; overflow-wrap: anywhere; }
.ac-fields b { color: var(--text); font-weight: 600; margin-right: 4px; }
/* links in the detail grid (Website, foreUP) share one style — and :visited matches, so a
   clicked link doesn't turn purple and read as a different style */
.ac-fields a, .ac-fields a:visited { color: var(--green); font-weight: 600; text-decoration: none; }
.ac-fields a:hover { text-decoration: underline; }
.ac-actions { display: flex; gap: 8px; align-items: center; }
/* collapsible state -> county grouping */
.cat-state { margin-top: 6px; }
.cat-state > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--green); padding: 6px 0; }
.cat-county { margin: 2px 0 2px 14px; }
.cat-county > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--green); padding: 5px 0; }
.cat-county .ac-item { margin-left: 14px; } /* step courses in from the county, as county is from state */
.cat-count { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 6px; }
/* animated carets on the nested trees (catalog state/county + per-user sub-sections) and the
   form's Advanced section, matching the admin-section caret: a masked chevron that eases ▸↔▾ */
.cat-state > summary, .cat-county > summary, .user-section > summary, .advanced > summary { list-style: none; }
.cat-state > summary::-webkit-details-marker,
.cat-county > summary::-webkit-details-marker,
.user-section > summary::-webkit-details-marker,
.advanced > summary::-webkit-details-marker { display: none; }
.cat-state > summary::before,
.cat-county > summary::before,
.user-section > summary::before,
.advanced > summary::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 6px;
  vertical-align: -2px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}
.cat-state[open] > summary::before,
.cat-county[open] > summary::before,
.user-section[open] > summary::before,
.advanced[open] > summary::before { transform: rotate(0); }
@media (prefers-reduced-motion: reduce) {
  .cat-state > summary::before, .cat-county > summary::before, .user-section > summary::before, .advanced > summary::before { transition: none; }
}
/* red ! badge next to a missing field value in the expanded catalog row */
.miss-flag { display: inline-flex; vertical-align: -2px; margin-left: 4px; color: #b3261e; }
body.dark .miss-flag { color: #e8857d; }

/* multiselect dropdown (catalog "Missing info" filter) */
.multi { position: relative; margin-top: 5px; }
.multi-btn {
  position: relative;
  display: block;
  width: 100%;
  min-width: 140px;
  min-height: 38px;
  padding: 8px 26px 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* "2 selected" etc. truncates instead of spilling out */
}
.multi-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
}
.multi-menu label { display: flex; align-items: center; gap: 8px; padding: 5px 8px; margin: 0; font-size: 13px; cursor: pointer; white-space: nowrap; border-radius: 6px; }
.multi-menu label:hover { background: #f1f7f3; }
.multi-menu input { width: auto; min-height: 0; margin: 0; }

/* catalog "Add course" button (opens the foreUP lookup modal) */
.course-add-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.course-add-btn:hover { background: var(--green-dark); }
/* same card as the sign-in modal. The RESULTS list scrolls (not the card itself —
   overflow on the card would clip the corner × badge and add a horizontal scrollbar). */
.add-course-box #course-found { max-height: 55vh; overflow-y: auto; }
.add-course-box .course-card { margin-top: 10px; }

/* admin Plan Limits editor: label | Free | Premium */
.tier-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; gap: 8px 12px; align-items: center; margin: 10px 0; max-width: 480px; font-size: 13px; color: var(--muted); }
.tier-grid .tier-col { color: var(--green-dark); font-size: 13px; }
.tier-grid input[type="number"] { margin: 0; min-height: 34px; padding: 6px 8px; }
.tier-grid .tier-check { margin: 0; }
.tier-grid .tier-check input { width: 18px; height: 18px; min-height: 0; margin: 0; }
.tier-actions { margin-top: 10px; }
/* per-user tier select in the admin Users list */
.tier-select { display: inline-block; width: auto; min-height: 0; padding: 3px 6px; font-size: 12px; margin: 0 0 0 8px; }
/* plan badge in the account menu — green pill for Free, gold pill for Premium */
.acct-plan {
  display: inline-block;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 9px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green-dark);
}
.acct-plan.premium { background: color-mix(in srgb, #e7c94c 22%, transparent); color: #8a6d1b; }
body.dark .acct-plan { color: #cfe7d6; }
body.dark .acct-plan.premium { color: #e7c94c; background: color-mix(in srgb, #e7c94c 16%, transparent); }

/* one chevron for every dropdown: native selects drop their browser arrow and share the
   app's chevron SVG with the custom multiselect button, so all carets match. Kept late in
   the cascade — component rules above use the `background` shorthand, which would wipe
   the image if this came earlier. */
select:not([multiple]),
.multi-btn {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d6b60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 30px;
}

/* ---- mobile overrides (kept LAST so they win the cascade) ---- */
@media (max-width: 560px) {
  .cf-grid { grid-template-columns: 1fr; }
  /* foreUP look-up button shows the icon only on phones to save room */
  /* Add-course button collapses to a plus icon on phones; the Missing-info button
     may shrink below its desktop min-width instead of covering the + */
  .add-course-text { display: none; }
  .course-add-btn { padding: 8px 11px; }
  .multi-btn { min-width: 0; }
  /* course catalog: hide region from the summary and stack the detail fields */
  .ac-region { display: none; }
  .ac-fields { grid-template-columns: 1fr; }
  .appcta { display: flex; padding: 8px 12px; gap: 10px; } /* show the app bar on mobile */
  /* the sticky app bar overlaps the top of the results — park scrolled content below it */
  #f-results { scroll-margin-top: 76px; }
  /* drop the toast below the app bar, and narrow it so it isn't so wide on phones */
  .banner { top: 84px; width: min(86vw, 360px); }
  /* location button shows the pin icon only (no text) on phones */
  .filter-loc .loc-btn-text { display: none; }
  .filter-loc { padding: 9px 11px; }
  /* sign-in box: email on its own row, then Send + Cancel share the next row */
  #auth-box .row label { flex: 1 1 100%; }
  #auth-box #auth-send { flex: 1 1 100%; }
  /* keep store badges side by side on mobile: share the row and scale to fit */
  .get-app { padding: 34px 16px; }
  .get-app-qr { display: none; } /* QR is for desktop; on mobile just tap the badge */
  .store-badges { flex-wrap: nowrap; gap: 10px; }
  .store-badges a { flex: 1 1 0; min-width: 0; max-width: 150px; }
  .get-app .store-img { width: 100%; height: auto; }
  header { padding: 10px 16px; position: relative; }
  /* logo centered on the top row; account pinned top-right; tabs on their own row below */
  header h1 { font-size: 18px; order: 1; flex: 1 1 100%; justify-content: center; }
  .brand img { height: 40px; }
  .account { position: absolute; top: 12px; right: 16px; margin: 0; }
  /* logged out: vertically center the Sign in with the logo (it sat a bit high at top:12) */
  header.logged-out .account { top: 50%; transform: translateY(-50%); }
  /* tabs on their own row: one no-wrap line of equal-width, shrink-to-fit tabs */
  #tabs { order: 2; flex-basis: 100%; flex-wrap: nowrap; gap: 2px; }
  #tabs .tab { flex: 1 1 0; min-width: 0; padding: 12px 4px; font-size: 13px; white-space: nowrap; }
  .acct-email { display: none; } /* save header space on mobile; show just the avatar */
  /* stack monitor cards: label on top, action buttons below in ONE no-wrap row of
     equal-width shrink-to-fit buttons (so Delete can't drop to its own line) */
  .monitor .m-top { flex-direction: column; align-items: flex-start; }
  .monitor .m-actions, .admin-mon .m-actions { flex-wrap: nowrap; width: 100%; gap: 6px; }
  .monitor .m-actions button, .admin-mon .m-actions button { flex: 1 1 0; min-width: 0; padding: 5px 2px; font-size: 11px; text-align: center; }
  /* keep buttons sharing one row; let longer labels (Save changes / Cancel edit) wrap inside */
  .form .actions { flex-wrap: nowrap; gap: 8px; }
  .form .actions button { flex: 1 1 0; min-width: 0; padding: 9px 4px; font-size: 13px; white-space: normal; line-height: 1.2; }
  .lbl-extra { display: none; } /* shorten Save Changes -> Save, Cancel Edit -> Cancel on mobile */
  /* quiet hours on mobile: label + toggle stay on top, time inputs drop below */
  .quiet-row .quiet-toggle { order: 1; }
  .quiet-row .quiet-inputs { order: 2; flex-basis: 100%; margin-top: 10px; }
  /* nearest list: hide the county/state tag so the row isn't too long on mobile */
  .cp-course .cp-where { display: none; }
  /* course requests: a long URL needs the full width, so drop the buttons to a line below */
  .event { flex-wrap: wrap; }
  .event .ev-body { flex: 1 1 0; } /* keep the body beside the icon (basis 0 → never wraps below it) */
  .req-actions { flex-basis: 100%; margin-left: 26px; justify-content: flex-start; }
}

/* ---- dark mode ---- */
body.dark {
  --bg: #10150f;
  --card: #1a211b;
  --line: #2c352d;
  --text: #e7ede8;
  --muted: #9aa89e;
  color-scheme: dark; /* dark native controls: date/time pickers, selects, scrollbars */
}
/* surfaces that hardcode white -> use the dark card */
body.dark input,
body.dark select,
body.dark textarea,
body.dark .course-picker,
body.dark .seg-btn,
body.dark button.secondary,
body.dark .acct-btn,
body.dark .multi-btn,
body.dark .multi-menu,
body.dark .acct-dropdown { background: var(--card); color: var(--text); }
/* the background shorthand above wipes the shared chevron — re-attach it in a lighter tone */
body.dark select:not([multiple]),
body.dark .multi-btn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa89e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
body.dark .acct-dropdown { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
body.dark .req-course-list .req-co:hover,
body.dark .multi-menu label:hover,
body.dark .holes-opt:hover { background: #222b24; }
/* admin buttons: dark green text is unreadable on a dark card — use light text (like .secondary)
   with a green border, and a soft green hover-tint instead of the light #e8f5ec fill */
body.dark .ac-toggle,
body.dark .req-actions button,
body.dark .admin-mon button,
body.dark .monitor .m-actions button { color: var(--text); }
body.dark .ac-toggle:hover,
body.dark .req-actions button:hover,
body.dark .admin-mon button:hover,
body.dark .monitor .m-actions button:hover,
body.dark button.secondary:hover { background: color-mix(in srgb, var(--green) 22%, transparent); }
body.dark .ac-delete,
body.dark .req-actions [data-req-del],
body.dark .req-actions [data-to="deleted"],
body.dark .admin-mon [data-act="del"],
body.dark .monitor .m-actions [data-act="del"],
body.dark .monitor .m-actions [data-act="leave"] { color: #e8857d; border-color: #e8857d; }
body.dark .ac-delete:hover,
body.dark .req-actions [data-req-del]:hover,
body.dark .req-actions [data-to="deleted"]:hover,
body.dark .admin-mon [data-act="del"]:hover,
body.dark .monitor .m-actions [data-act="del"]:hover,
body.dark .monitor .m-actions [data-act="leave"]:hover { background: color-mix(in srgb, #e8857d 20%, transparent); }
body.dark .monitor .m-actions button.mon-pause,
body.dark .ac-toggle[data-to="0"] { color: #f5cd4a; border-color: #f5cd4a; }
body.dark .monitor .m-actions button.mon-pause:hover,
body.dark .ac-toggle[data-to="0"]:hover { background: color-mix(in srgb, #eab308 22%, transparent); }
body.dark .req-tag-req { background: #1e3a28; color: #cfe7d6; }
body.dark .req-tag-issue { background: #3a201e; color: #e8857d; }
/* accent headings: green-dark is too dark on a dark bg — use the brighter accent */
body.dark .section-title,
body.dark .tier-grid .tier-col,
body.dark .day-head,
body.dark .admin-activity > summary,
/* light tints -> dark equivalents */
body.dark .course-count { color: #cfe7d6; }
body.dark .recip-chip { color: #cfe7d6; } /* light green like the course-count pill, readable on dark */
body.dark .cp-region { background: #222b24; color: #cfe7d6; }
body.dark .cp-region:hover { background: #2a352c; }
body.dark .cp-course:not(:has(input:checked)):hover { background: #232c25; }
body.dark .cp-course:has(input:checked) { background: #21362a; }
body.dark .seg-btn:hover:not(.active) { background: #232c25; }
body.dark .seg-btn.active { background-color: var(--green); color: #fff; }
body.dark .acct-dd-item:hover { background: #232c25; }
body.dark .acct-btn:hover { background: #232c25; }
body.dark .tee .price { background: #233042; color: #cfe0ff; }
body.dark .tee .spots { background: #21362a; color: #cfe7d6; }
/* In dark mode the muted off/on greens read too similarly — use a neutral off track and a
   brighter on green, with a faint inset edge so the pill stays visible against the card. */
body.dark .switch .slider { background: #404a43; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
body.dark .switch input:checked + .slider { background: #2ea24e; box-shadow: inset 0 0 0 1px rgba(46, 162, 78, 0.55); }
body.dark .acct-avatar { background: var(--text); color: #10150f; }
