/* SEIRC organiser admin: denser than the public site. Tokens from tokens.css; inside .admin the type scale steps
   down one notch (12/13/14/16/20) but inputs stay 16px and every control keeps a 44px target below 900px. */
.admin { --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --gap: var(--s3); font-size: var(--fs-md); padding-bottom: var(--s6); }
.admin h2, .admin h3 { margin: 0; }
.admin input { font-size: var(--fs-input); }

/* admin tab bar: one size on every admin page. Phone: a full-width 3-up control, sticky under the topbar, with the
   "…" menu in the same row. Desktop: a compact pill row that scrolls with the page. */
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin: 0 calc(-1 * var(--gutter)) var(--s3); padding: var(--s2) var(--gutter); position: sticky; top: var(--topbar); z-index: 19; background: var(--bg); }
.admin-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; flex: 1; gap: 2px; background: #fff; padding: var(--s1); border-radius: var(--r-pill); box-shadow: var(--shadow); margin: 0; }
.admin-tabs a { display: flex; align-items: center; justify-content: center; min-height: var(--tap); text-decoration: none; font-weight: 600; font-size: var(--fs-ctl); color: var(--muted); padding: 0 var(--s4); border-radius: var(--r-pill); border: 0; background: none; }
.admin-tabs a:hover { color: var(--ink); }
.admin-tabs a.active { background: var(--blue); color: #fff; }
@media (min-width: 900px) {
  .admin-more summary { width: 36px; height: 36px; }
  .admin-menu a, .admin-menu button { min-height: 36px; }
  .admin-bar { position: static; margin: var(--s4) 0 var(--s3); padding: 0; background: none; }
  .admin-tabs { display: inline-flex; flex: none; }
  .admin-tabs a { min-height: 30px; }
}
.admin-more { position: relative; }
.admin-more summary { list-style: none; cursor: pointer; width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: var(--shadow); color: var(--muted); font-weight: 800; letter-spacing: 1px; }
.admin-more summary::-webkit-details-marker { display: none; }
.admin-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(27,36,64,.16); padding: var(--s1); min-width: 190px; }
.admin-menu a, .admin-menu button { display: flex; align-items: center; min-height: var(--tap); width: 100%; text-align: left; padding: 0 var(--s3); border-radius: 8px; border: 0; background: none; font: 500 var(--fs-md) Inter, sans-serif; color: var(--ink); text-decoration: none; cursor: pointer; }
.admin-menu a:hover, .admin-menu button:hover { background: var(--bg); }
.admin-menu .danger { color: var(--err); }

/* KPIs */
.kpis { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); margin-bottom: var(--gap); }
.kpi { padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: 2px; min-width: 0; border-top: 1px solid var(--line); }
.kpi:nth-child(-n+2) { border-top: 0; }
.kpi:nth-child(even) { border-left: 1px solid var(--line); }
.kpi:last-child { grid-column: 1 / -1; border-left: 0; }
@media (min-width: 900px) {
  .kpis { grid-template-columns: repeat(5, 1fr); }
  .kpi, .kpi:last-child { grid-column: auto; border-top: 0; border-left: 1px solid var(--line); }
  .kpi:first-child { border-left: 0; }
}
.kpi-label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.kpi-value { font-size: var(--fs-xl); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-value.muted { color: var(--muted); font-weight: 700; }
.kpi.strong .kpi-value { color: var(--blue); }

/* layout */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.dash-map { min-width: 0; }
.dash-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
@media (min-width: 1200px) {
  /* Desktop: map and side column are the same height and both stick under the topbar, so a long queue scrolls
     inside its own panel instead of leaving empty space beside the map. --map-h mirrors the map's svg height. */
  .admin { --map-h: max(420px, min(640px, calc(100vh - 210px))); }
  .dash { grid-template-columns: minmax(0, 1fr) 360px; }
  .dash-map, .dash-side { position: sticky; top: calc(var(--topbar) + var(--s3)); }
  .dash-side { max-height: var(--map-h); }
  .aq-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .aq-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -8px; padding: 0 var(--s2); }
}
.panel { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow); padding: var(--s3) var(--s4); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.panel-head h2 { font-size: var(--fs-lg); font-weight: 800; }
.panel-note { font-size: var(--fs-sm); color: var(--muted); }
.empty { color: var(--muted); margin: var(--s1) 0 0; font-size: var(--fs-md); }
.dash-skeleton { display: grid; grid-template-columns: 1fr; grid-template-rows: 64px 560px; gap: var(--gap); }
@media (min-width: 1200px) { .dash-skeleton { grid-template-columns: 1fr 360px; } }
.dash-skeleton i { background: linear-gradient(90deg, #fff 0%, #EEF2F8 50%, #fff 100%); background-size: 200% 100%; border-radius: var(--r); animation: skel 1.2s linear infinite; }
.dash-skeleton i:first-child { grid-column: 1 / -1; }
@keyframes skel { to { background-position: -200% 0; } }

/* venue balance */
.vb + .vb { margin-top: var(--s3); }
.vb-top { display: flex; align-items: baseline; gap: var(--s2); }
.vb-name { font-weight: 800; font-size: var(--fs-md); }
.vb.ox .vb-name { color: var(--blue); } .vb.ld .vb-name { color: var(--purple); }
.vb-ergs { font-size: var(--fs-xs); color: var(--muted); }
.vb-figure { margin-left: auto; font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.vb-figure b { color: var(--ink); font-size: var(--fs-lg); }
.vb-bar { position: relative; display: flex; height: 10px; background: var(--bg); border-radius: 99px; margin: var(--s1) 0 var(--s1); overflow: visible; }
.vb-bar i { display: block; height: 100%; }
.vb-bar i.conf { border-radius: 99px 0 0 99px; }
.vb.ox .conf { background: var(--blue); } .vb.ld .conf { background: var(--purple); }
.vb.ox .sugg { background: repeating-linear-gradient(135deg, #9DB3E6 0 4px, #C7D4F1 4px 8px); }
.vb.ld .sugg { background: repeating-linear-gradient(135deg, #B9A2D8 0 4px, #DCD0EC 4px 8px); }
.vb-bar .target { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); }
.vb-foot { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); }
.vb-foot .ok { color: var(--ok); font-weight: 600; } .vb-foot .off { color: var(--warn); font-weight: 600; }

/* allocation queue */
.aq-group + .aq-group { margin-top: var(--s3); }
.aq-head { display: flex; align-items: center; gap: var(--s2); padding: var(--s1) 0; border-bottom: 1px solid var(--line); }
.aq-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.aq-title { font-weight: 700; font-size: var(--fs-md); }
.aq-group.ox .aq-title { color: var(--blue); } .aq-group.ld .aq-title { color: var(--purple); }
.aq-meta { font-size: var(--fs-xs); color: var(--muted); margin-right: auto; font-variant-numeric: tabular-nums; }
.aq-chev { width: 8px; height: 8px; margin: 0 var(--s1); border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.aq-group.open .aq-chev { transform: rotate(45deg); }
.aq-group:not(.open) .aq-list { display: none; }
@media (max-width: 899px) {
  /* phone header: title over its count, chevron on the right, Accept beside it */
  .aq-toggle { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s2); padding: var(--s1) 0; }
  .aq-title, .aq-meta { grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
  .aq-chev { grid-column: 2; grid-row: 1 / span 2; }
}
.aq-list { list-style: none; margin: 0; padding: 0; }
.aq-row { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s1); min-height: 60px; border-bottom: 1px solid #F0F2F7; border-radius: 8px; }
.aq-row.sel { background: var(--pale); }
.aq-club { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.aq-club .nm { display: block; font-weight: 600; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aq-club .sub { display: block; font-size: var(--fs-xs); color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; flex: none; }
.seg button { border: 0; background: #fff; font: 700 var(--fs-ctl) Inter, sans-serif; min-width: var(--tap); min-height: var(--tap); padding: 0 var(--s2); cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.ox:hover, .seg button.ox.sugg { color: var(--blue); background: #EEF2FC; }
.seg button.ld:hover, .seg button.ld.sugg { color: var(--purple); background: #F3EEF9; }
.btn.xs { min-height: var(--tap); padding: 0 var(--s4); font-size: var(--fs-sm); border-radius: var(--r-pill); }
@media (min-width: 900px) {
  /* dense desktop: 36px controls are allowed; the groups never collapse */
  .btn.xs { min-height: 30px; padding: 0 var(--s3); font-size: var(--fs-xs); }
  .seg button { min-width: 36px; min-height: 32px; font-size: var(--fs-xs); }
  .aq-row { min-height: 0; padding: var(--s1) var(--s1); }
  .aq-toggle { min-height: 32px; cursor: default; }
  .aq-chev { display: none; }
  .aq-group:not(.open) .aq-list { display: block; }
}
.btn.ox { background: var(--blue); } .btn.ld { background: var(--purple); }
.btn.ghosty { background: #fff; border: 1.5px solid var(--line); }
.btn.ox.ghosty { color: var(--blue); } .btn.ld.ghosty { color: var(--purple); }

/* map */
.emap { position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); background: radial-gradient(120% 90% at 70% 40%, #F7F9FE 0%, #E7EDF8 100%); }
.emap > svg { display: block; width: 100%; height: min(640px, calc(100vh - 210px)); min-height: 420px; --z: .3; user-select: none; -webkit-user-select: none; }
.emap-regions { opacity: 0; animation: emap-in .6s ease forwards; }
.emap-regions path { stroke: #fff; stroke-width: calc(var(--z) * 1px); stroke-linejoin: round; }
.emap-regions path.off { fill: #DCE3EF; }
.emap-regions path.on { fill: #fff; stroke: #CBD7EE; stroke-width: calc(var(--z) * 1.2px); }

.emap-routes path { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: opacity .3s, stroke-width .3s; }
.emap-routes .route { stroke-width: calc(var(--z) * 1.8px); stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: emap-draw var(--t) cubic-bezier(.45,.05,.25,1) var(--d) forwards; }
.emap-routes .route.confirmed { opacity: .5; }
.emap-routes .route.suggested { opacity: .18; stroke-width: calc(var(--z) * 1.4px); }
.emap-routes .ox { stroke: var(--blue); } .emap-routes .ld { stroke: var(--purple); }
.emap-routes .flow { stroke-width: calc(var(--z) * 2.4px); stroke-dasharray: .035 .965; stroke-dashoffset: 1.035; opacity: 0; animation: emap-flow var(--t) linear var(--d) infinite; }
.emap.has-sel .route:not(.sel), .emap.has-sel .flow:not(.sel) { opacity: .05; }
.emap.has-sel .club:not(.sel), .emap.has-sel .cluster { opacity: .3 !important; }
.emap-routes .route.sel { opacity: 1; stroke-width: calc(var(--z) * 3px); }

.emap-clubs .club { cursor: pointer; opacity: 0; transform-box: fill-box; transform-origin: center; animation: emap-pop .4s cubic-bezier(.3,1.5,.5,1) var(--d) forwards; transition: opacity .25s; }
.emap-clubs .club.clustered { visibility: hidden; }
.emap-clubs .club circle { r: calc(var(--z) * var(--r) * 1px); stroke: #fff; stroke-width: calc(var(--z) * 1.5px); transition: r .15s; }
.emap-clubs .club.ox circle { fill: var(--blue); } .emap-clubs .club.ld circle { fill: var(--purple); } .emap-clubs .club.none circle { fill: #9AA3B8; }
.emap-clubs .club.soft.ox circle { fill: #8AA5E2; } .emap-clubs .club.soft.ld circle { fill: #AE93CF; }
.emap-clubs .club:hover circle { r: calc(var(--z) * (var(--r) + 2) * 1px); }
.emap-clubs .club.sel circle { stroke: var(--cyan); stroke-width: calc(var(--z) * 3px); r: calc(var(--z) * (var(--r) + 3) * 1px); }
.emap-clusters .cluster { cursor: pointer; animation: emap-in .3s ease both; }
.emap-clusters .cluster circle { r: calc(var(--z) * var(--r) * 1px); stroke: #fff; stroke-width: calc(var(--z) * 2px); filter: drop-shadow(0 1px 2px rgba(27,36,64,.25)); transition: r .15s; }
.emap-clusters .cluster:hover circle { r: calc(var(--z) * (var(--r) + 2) * 1px); }
.emap-clusters .cluster.ox circle { fill: var(--blue); } .emap-clusters .cluster.ld circle { fill: var(--purple); }
.emap-clusters .cluster.none circle { fill: #8E97AD; } .emap-clusters .cluster.mix circle { fill: #343A6B; }
.emap-clusters .cluster text { fill: #fff; font: 800 calc(var(--z) * 10px) Inter, Arial, sans-serif; pointer-events: none; }

/* venues: a pin on the exact spot, a leader, and a shadowed badge, all in screen px */
.emap-venues { pointer-events: none; }
.emap-venues .venue { transform: translate(var(--x), var(--y)) scale(var(--z)); }
.emap-venues .venue > * { animation: emap-in .5s ease .3s both; }
.emap-venues .spot { fill: #fff; stroke-width: 2.5; filter: drop-shadow(0 1px 3px rgba(27,36,64,.35)); }
.emap-venues .core { stroke: none; }
.emap-venues .leader { stroke-width: 1.5; stroke-dasharray: 2 2; }
.emap-venues .badge rect { fill: #fff; stroke-width: 1.5; filter: drop-shadow(0 2px 5px rgba(27,36,64,.22)); }
.emap-venues .badge text { font: 800 11px Inter, Arial, sans-serif; letter-spacing: .12em; }
.emap-venues .ring { fill: none; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: emap-ring 3s ease-out 1.2s infinite !important; opacity: 0; }
.emap-venues .ox .spot, .emap-venues .ox .leader, .emap-venues .ox .badge rect, .emap-venues .ox .ring { stroke: var(--blue); }
.emap-venues .ld .spot, .emap-venues .ld .leader, .emap-venues .ld .badge rect, .emap-venues .ld .ring { stroke: var(--purple); }
.emap-venues .ox .core, .emap-venues .ox .badge text { fill: var(--blue); }
.emap-venues .ld .core, .emap-venues .ld .badge text { fill: var(--purple); }

/* filters */
.emap.hide-ox .club.ox, .emap.hide-ox .emap-routes .ox, .emap.hide-ox .venue.ox,
.emap.hide-ld .club.ld, .emap.hide-ld .emap-routes .ld, .emap.hide-ld .venue.ld,
.emap.hide-none .club.none { display: none; }
.emap-filters { position: absolute; left: 12px; bottom: 12px; display: flex; gap: var(--s1); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: var(--s1); height: 30px; padding: 0 var(--s2); border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(6px); font: 600 var(--fs-sm, 13px) Inter, sans-serif; color: var(--muted); cursor: pointer; transition: all .15s; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; opacity: .3; }
.chip .count { font-size: 11px; font-weight: 700; color: var(--muted); }
.chip.on { color: var(--ink); box-shadow: 0 1px 3px rgba(27,36,64,.12); }
.chip.on .dot { opacity: 1; }
.dot.ox { background: var(--blue); } .dot.ld { background: var(--purple); } .dot.none { background: #9AA3B8; }

/* search + selected club, docked top-left */
.emap-panel { position: absolute; left: 12px; top: 12px; width: min(360px, calc(100% - 24px)); background: #fff; border-radius: 14px; box-shadow: 0 6px 24px rgba(27,36,64,.14); overflow: hidden; }
.emap-search { position: relative; }
.emap-search > svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.emap-search input { border: 0; border-radius: 0; min-height: var(--tap); padding: 10px 48px 10px 38px; font-size: var(--fs-input); box-shadow: none; }
.emap-search input:focus { box-shadow: none; }
.emap-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg); color: var(--muted); font-size: 16px; cursor: pointer; }
.emap-clear:hover { background: var(--pale); color: var(--blue); }
.emap-results { border-top: 1px solid var(--line); padding: var(--s1); }
.emap-results button { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: var(--tap); border: 0; background: none; padding: var(--s2) var(--s2); border-radius: 8px; font: inherit; font-size: var(--fs-md, 14px); text-align: left; cursor: pointer; }
.emap-results button:hover, .emap-results button.on { background: var(--pale); }
.emap-results .nm { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emap-results small { color: var(--muted); font-size: 12px; }
.emap-results .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.emap-selected { border-top: 1px solid var(--line); animation: emap-in .2s ease both; }

.sel-club { padding: var(--s3) var(--s3) var(--s3); }
.sel-club header { display: flex; gap: var(--s2); align-items: center; }
.sel-blade { width: 52px; flex: none; }
.sel-id { min-width: 0; }
.sel-id h3 { font-size: var(--fs-lg, 16px); font-weight: 800; line-height: 1.2; }
.sel-id p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.sel-addr { margin: var(--s2) 0 0; font-size: 12px; color: var(--muted); }
.sel-drive { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); margin: var(--s2) 0; }
.sel-drive > div { background: var(--bg); border-radius: 8px; padding: var(--s1) var(--s2); border: 1.5px solid transparent; }
.sel-drive dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sel-drive dd { margin: 0; font-size: var(--fs-lg, 16px); font-weight: 800; font-variant-numeric: tabular-nums; }
.sel-drive .ox.cur { border-color: #A9BDEB; background: #F1F5FD; } .sel-drive .ld.cur { border-color: #CDBBE4; background: #F6F2FB; }
.sel-drive .ox.cur dt { color: var(--blue); } .sel-drive .ld.cur dt { color: var(--purple); }
.sel-club footer { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.sel-q { font-size: 12px; font-weight: 600; color: var(--muted); }
.sel-club footer .linkbtn:last-child { margin-left: auto; }

.emap-tip { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 12px)); background: #fff; border-radius: 10px; padding: var(--s2) var(--s3); box-shadow: 0 8px 24px rgba(27,36,64,.18); min-width: 160px; max-width: 240px; pointer-events: none; font-size: 12px; line-height: 1.4; }
.emap-tip.below { transform: translate(-50%, 12px); }
.emap-tip img { width: 56px; display: block; margin-bottom: var(--s1); }
.emap-tip b { display: block; font-size: 13px; } .emap-tip span { display: block; color: var(--muted); }
.emap-tip em { display: block; margin-top: var(--s1); font-style: normal; font-weight: 600; color: var(--blue); }

/* toast */
.toast { position: fixed; left: 24px; bottom: 24px; z-index: 50; display: flex; align-items: center; gap: var(--s4); background: #1B2440; color: #fff; padding: var(--s3) var(--s4); border-radius: 10px; box-shadow: 0 10px 30px rgba(27,36,64,.3); font-size: var(--fs-md); animation: toast-in .25s cubic-bezier(.2,.8,.2,1); max-width: calc(100vw - 32px); }
.toast button { border: 0; background: none; color: #8FB0FF; font: 700 var(--fs-md) Inter, sans-serif; text-transform: uppercase; letter-spacing: .06em; cursor: pointer; }
@keyframes toast-in { from { transform: translateY(16px); opacity: 0; } }

@keyframes emap-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes emap-draw { to { stroke-dashoffset: 0; } }
@keyframes emap-flow { 0% { stroke-dashoffset: 1.035; opacity: 0; } 8% { opacity: .8; } 85% { opacity: .8; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes emap-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes emap-ring { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
@media (prefers-reduced-motion: reduce) {
  .emap *, .emap-regions { animation: none !important; } .emap-routes .route { stroke-dashoffset: 0; } .emap .flow, .emap .ring { display: none; }
  .emap-clubs .club, .emap-regions { opacity: 1; }
}

@media (max-width: 599px) {
  /* Phone map: search (and the selected club under it) is a normal block above the map, the map keeps 4:3, and
     the venue filters sit below it, so nothing covers the map or its labels. */
  .emap { display: flex; flex-direction: column; overflow: visible; background: none; box-shadow: none; border-radius: 0; gap: var(--s2); }
  .emap-panel { order: -1; position: static; width: auto; border-radius: var(--r-ctl); box-shadow: var(--shadow); }
  .emap > svg { height: auto; min-height: 0; aspect-ratio: 4 / 3; border-radius: var(--r-card); box-shadow: var(--shadow); background: radial-gradient(120% 90% at 70% 40%, #F7F9FE 0%, #E7EDF8 100%); }
  .emap-filters { position: static; order: 1; }
  .emap-filters .chip { height: 36px; padding: 0 var(--s3); background: #fff; }
  .toast { left: 16px; right: 16px; bottom: 16px; justify-content: space-between; }
  .toast button { min-height: var(--tap); }
}

/* ---- entries list: grid table on desktop, cards on phone; one row per club, expands to its rowers ---- */
.el-toolbar { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin-bottom: var(--s2); }
.el-search { position: relative; flex: 1 1 280px; }
.el-search > svg, .ml-search > svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.el-search input, .ml-search input { min-height: var(--tap); padding: 8px 12px 8px 36px; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; font-size: var(--fs-md); box-shadow: var(--shadow); }
.segctl { display: inline-flex; background: #fff; border-radius: var(--r-pill); padding: var(--s1); box-shadow: var(--shadow); }
.segctl button { border: 0; background: none; font: 600 var(--fs-ctl) Inter, sans-serif; color: var(--muted); padding: 0 var(--s3); border-radius: var(--r-pill); cursor: pointer; min-height: var(--tap); white-space: nowrap; }
.segctl button.on { background: var(--ink); color: #fff; }
.el-summary { display: flex; gap: var(--s4); align-items: baseline; flex-wrap: wrap; padding: var(--s2) var(--s1) var(--s2); font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.el-summary b { color: var(--ink); font-size: var(--fs-md); }
.el-summary .strong b { color: var(--blue); }
.el-export { margin-left: auto; }

.el { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.el-head, .el-main { display: grid; grid-template-columns: 18px minmax(220px, 2fr) minmax(150px, 1.3fr) minmax(150px, 1.5fr) 150px 88px 70px 88px 92px; gap: var(--s3); align-items: center; }
.el-head { padding: var(--s2) var(--s4); background: #FAFBFD; border-bottom: 1px solid var(--line); }
.el-head > * { font: 700 11px Inter, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; background: none; border: 0; padding: 0; }
.el-head button { cursor: pointer; } .el-head button:hover { color: var(--ink); }
.el-head .sorted { color: var(--blue); } .el-head .sorted::after { content: " ↓"; }
.el-head .num, .el-main .num { text-align: right; justify-self: end; }
.el-row { border-bottom: 1px solid #EEF1F6; }
.el-row:last-child { border-bottom: 0; }
.el-row.open { background: #FBFCFF; }
.el-main { width: 100%; padding: var(--s2) var(--s4); border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.el-main:hover { background: #F7F9FD; }
.el-main small { display: block; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-main > span { min-width: 0; }
.c-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; justify-self: center; }
.el-row.open .c-chev { transform: rotate(45deg); }
.c-club { display: flex; align-items: center; gap: var(--s2); }
.c-club img, .c-club .noblade { width: 40px; height: 14px; object-fit: contain; flex: none; }
.c-club .noblade { background: var(--bg); border-radius: 3px; }
.c-club b { display: block; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-club > span { min-width: 0; }
.c-coach > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-rowers b { font-size: var(--fs-md); }
.c-paid b { font-variant-numeric: tabular-nums; }
.el-main .num { font-variant-numeric: tabular-nums; }
.warn { color: var(--warn); }
.el-empty { padding: var(--s5); text-align: center; color: var(--muted); }
.dash-skeleton.list { grid-template-columns: 1fr; grid-template-rows: 44px 480px; }

.ed { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 16px; padding: 4px 16px 16px 46px; }
.ed-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s2); align-content: start; }
.ed-ev { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: var(--s2) var(--s2); }
.ed-ev-head { display: flex; justify-content: space-between; font-size: var(--fs-sm); }
.ed-ev-head span { font-weight: 700; color: var(--blue); }
.ed-ev-races { font-size: 11px; color: var(--muted); margin-bottom: var(--s1); }
.ed-ev ul { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); line-height: 1.55; }
.ed-facts { margin: 0; display: grid; gap: var(--s2); font-size: var(--fs-sm); }
.ed-facts > div { display: grid; grid-template-columns: 70px 1fr; gap: var(--s2); }
.ed-facts dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: 2px; }
.ed-facts dd { margin: 0; }
.ed-actions { display: flex; gap: var(--s1); flex-wrap: wrap; margin-top: var(--s3); }
.btn.xs.ghosty { color: var(--blue); }

@media (max-width: 1199px) {
  .el-head, .el-main { grid-template-columns: 18px minmax(200px, 2fr) minmax(150px, 1.5fr) 140px 88px 88px; }
  .el-head > :nth-child(3), .el-main .c-coach, .el-head > :nth-child(7), .el-main .c-fee, .el-head > :nth-child(9), .el-main .c-date { display: none; }
}
@media (max-width: 899px) {
  .el-toolbar .segctl { flex: 1 1 auto; justify-content: space-between; } .segctl button { flex: 1; padding: var(--s1) var(--s2); }
  .el-summary { gap: var(--s2); } .el-export { margin-left: 0; }
  .el { background: none; box-shadow: none; overflow: visible; }
  .el-head { display: none; }
  .el-row { background: #fff; border-radius: 12px; box-shadow: var(--shadow); border: 0; margin-bottom: var(--s2); overflow: hidden; }
  .el-main { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "club club" "venue paid" "rowers rowers"; row-gap: var(--s1); padding: var(--s3) var(--s3); }
  .c-club b { white-space: normal; line-height: 1.25; }
  .c-venue { justify-self: start; }
  .el-main .c-chev, .el-main .c-coach, .el-main .c-fee, .el-main .c-net, .el-main .c-date { display: none; }
  .c-club { grid-area: club; } .c-venue { grid-area: venue; } .c-rowers { grid-area: rowers; } .c-paid { grid-area: paid; }
  .c-rowers { display: flex; gap: var(--s1); align-items: baseline; min-width: 0; } .c-rowers small { display: inline; }
  .c-paid b { font-size: var(--fs-lg); }
  .ed { grid-template-columns: 1fr; padding: 0 var(--s3) var(--s3); }
  .ed-events { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) { .ed-events { grid-template-columns: 1fr; } }

/* ---- mail record ---- */
.seg-a { text-decoration: none; font: 600 var(--fs-ctl) Inter, sans-serif; color: var(--muted); padding: 0 var(--s3); border-radius: var(--r-pill); min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; }
@media (min-width: 900px) {
  /* one segmented size on desktop: 30px segments in a 3px track = 36px, same as the admin tabs */
  .el-search input, .ml-search input { min-height: 36px; }
  .segctl button, .segctl .seg-a { min-height: 30px; }
}
.seg-a.on { background: var(--ink); color: #fff; }
.notice.slim { padding: var(--s2) var(--s3); font-size: var(--fs-sm); margin-bottom: var(--s2); }
.ml { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ml-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 110px minmax(120px, 220px) 96px; gap: var(--s3); align-items: center; padding: var(--s2) var(--s4); border-bottom: 1px solid #EEF1F6; }
.ml-row:last-child { border-bottom: 0; }
.ml-row:hover { background: #F7F9FD; }
.ml-dir { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ml-row.in .ml-dir { background: var(--pale); color: var(--blue); }
.ml-row.out .ml-dir { background: var(--ok-bg); color: var(--ok); }
.ml-row.failed .ml-dir { background: var(--warn-bg); color: var(--warn); }
.ml-subject { text-decoration: none; color: inherit; min-width: 0; }
.ml-subject b { display: block; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-subject small { display: block; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-row.failed .ml-subject small { color: var(--warn); }
.ml-entry .pill { font-size: 11px; padding: 2px var(--s2); text-decoration: none; }
.ml-files { display: flex; gap: var(--s2); min-width: 0; font-size: var(--fs-xs); }
.ml-files a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; color: var(--ink); }
.ml-files a.muted { color: var(--muted); }
.ml-files a:hover, .ml-subject:hover b { text-decoration: underline; text-underline-offset: 2px; }
.ml-date { text-align: right; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
@media (max-width: 899px) {
  .ml { background: none; box-shadow: none; }
  .ml-row { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "dir subject date" ". entry files"; row-gap: var(--s1); background: #fff; border-radius: 12px; box-shadow: var(--shadow); border: 0; margin-bottom: var(--s2); padding: var(--s2) var(--s3); }
  .ml-dir { grid-area: dir; } .ml-subject { grid-area: subject; } .ml-date { grid-area: date; } .ml-entry { grid-area: entry; } .ml-files { grid-area: files; justify-content: flex-end; }
  .ml-subject b { white-space: normal; }
}

/* ===== map v3: venue strip on top, stage below; task panel beside it ===== */
.emap { display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: var(--r-card, 14px); box-shadow: var(--shadow); gap: 0; }
.emap-stage { position: relative; background: radial-gradient(120% 90% at 70% 40%, #F7F9FE 0%, #E7EDF8 100%); }
.emap-stage > svg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; max-height: calc(100vh - 300px); min-height: 340px; user-select: none; -webkit-user-select: none; }

.vstrip { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.vtile { display: flex; flex-direction: column; gap: var(--s1); text-align: left; border: 0; background: #fff; padding: var(--s3) var(--s4); font: inherit; color: var(--ink); cursor: pointer; position: relative; transition: background .2s, opacity .2s; }
.vtile + .vtile { border-left: 1px solid var(--line); }
.vtile:hover { background: #FAFBFE; }
.vtile::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; transition: background .2s; }
.vtile.ox.on::after { background: var(--blue); } .vtile.ld.on::after { background: var(--purple); }
.vtile.dim { opacity: .45; }
.vtile-row { display: flex; align-items: center; gap: var(--s2); }
.vtile-pin { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px currentColor; }
.vtile.ox { color: var(--blue); } .vtile.ld { color: var(--purple); }
.vtile.ox .vtile-pin { background: var(--blue); } .vtile.ld .vtile-pin { background: var(--purple); }
.vtile-id { min-width: 0; }
.vtile-id b { display: block; font-size: var(--fs-lg, 16px); font-weight: 800; letter-spacing: .01em; }
.vtile-id small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtile-fig { margin-left: auto; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vtile-fig b { font-size: 22px; font-weight: 800; display: inline-block; animation: tick .5s cubic-bezier(.3,1.6,.5,1); }
.vtile-fig small { font-size: 13px; color: var(--muted); margin-left: var(--s1); }
.vtile-bar { position: relative; display: flex; height: 8px; background: var(--bg); border-radius: 99px; overflow: visible; }
.vtile-bar i { display: block; height: 100%; transition: width .6s cubic-bezier(.3,.8,.3,1); }
.vtile-bar .conf { border-radius: 99px 0 0 99px; }
.vtile.ox .conf { background: var(--blue); } .vtile.ld .conf { background: var(--purple); }
.vtile.ox .sugg { background: repeating-linear-gradient(135deg, #9DB3E6 0 4px, #C7D4F1 4px 8px); }
.vtile.ld .sugg { background: repeating-linear-gradient(135deg, #B9A2D8 0 4px, #DCD0EC 4px 8px); }
.vtile-bar .target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); transition: left .6s; }
.vtile-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.vtile-foot b { color: var(--ink); display: inline-block; animation: tick .5s cubic-bezier(.3,1.6,.5,1); }
.vtile-foot .ok { color: var(--ok); font-weight: 600; } .vtile-foot .off { color: var(--warn); font-weight: 600; }
@keyframes tick { from { transform: translateY(-6px) scale(1.25); color: var(--cyan); } }

/* venue focus: chosen venue's routes and clubs stay, the other fades back */
.emap.focus-ox .emap-routes .ld, .emap.focus-ox .club.ld, .emap.focus-ox .venue.ld,
.emap.focus-ld .emap-routes .ox, .emap.focus-ld .club.ox, .emap.focus-ld .venue.ox { opacity: .08 !important; transition: opacity .3s; }
.emap.focus-ox .emap-routes .route.ox, .emap.focus-ld .emap-routes .route.ld { opacity: .8; }

/* placement burst: re-created on every placement at that venue */
.emap-venues .burst { fill: none; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: burst 1.1s cubic-bezier(.2,.7,.3,1) both; opacity: 0; }
.emap-venues .ox .burst { stroke: var(--blue); } .emap-venues .ld .burst { stroke: var(--purple); }
@keyframes burst { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(4); } }

/* layout: map a little smaller, task panel opens up on the right */
@media (min-width: 1200px) {
  .dash { grid-template-columns: minmax(0, 1.45fr) minmax(380px, 1fr) !important; }
  .dash-map { position: sticky; top: 72px; }
}
.tasks { background: #fff; border-radius: var(--r-card, 14px); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; }
@media (min-width: 1200px) { .tasks { position: sticky; top: 72px; max-height: calc(100vh - 88px); } }
.tasks-tabs { display: flex; gap: 2px; padding: var(--s1); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tasks-tabs button { flex: 1; border: 0; background: none; font: 600 var(--fs-sm, 13px) Inter, sans-serif; color: var(--muted); padding: var(--s2) var(--s2); border-radius: 9px; cursor: pointer; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); }
.tasks-tabs button:hover { background: var(--bg); }
.tasks-tabs button.on { background: var(--ink); color: #fff; }
.tasks-tabs button.ox.on { background: var(--blue); } .tasks-tabs button.ld.on { background: var(--purple); }
.tcount { font-size: 11px; font-weight: 800; background: rgba(27,36,64,.08); border-radius: 99px; padding: 1px var(--s2); }
.tasks-tabs button.on .tcount { background: rgba(255,255,255,.22); }
.tasks-body { padding: var(--s2) var(--s4) var(--s4); overflow-y: auto; min-height: 0; }
.tasks-head, .pl-sum { font-size: var(--fs-sm, 13px); color: var(--muted); padding: var(--s1) 0 var(--s2); }
.tasks-head b, .pl-sum b { color: var(--ink); }
.aq .aq-body { max-height: none !important; overflow: visible !important; }
.rl-amt { font-weight: 700; font-variant-numeric: tabular-nums; font-size: var(--fs-sm, 13px); }

/* showcase (public home): illustration only */
.emap.showcase { box-shadow: 0 20px 50px rgba(8,30,90,.35); }
.emap.showcase .emap-stage > svg { pointer-events: none; max-height: none; min-height: 0; aspect-ratio: 16 / 11; }
.emap.showcase .vtile { cursor: default; padding: var(--s2) var(--s3); flex-direction: row; align-items: center; gap: var(--s2); }
.emap.showcase .vtile:hover { background: #fff; }
.emap-overlay { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: center; pointer-events: none; }

@media (max-width: 899px) {
  .emap-stage { display: flex; flex-direction: column; }
  .emap-stage .emap-panel { order: -1; position: static; width: auto; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); }
  .emap-stage > svg { aspect-ratio: 4 / 3; max-height: none; min-height: 0; }
  .vtile { padding: var(--s2) var(--s3); } .vtile-id small { display: none; } .vtile-fig b { font-size: 18px; }
  .vtile-foot span:first-child { display: none; }
}

/* ===== v4: venue ledgers, landmarks, bottom sheet, inbox panel ===== */
.dash-line { display: flex; gap: var(--s4); align-items: baseline; flex-wrap: wrap; padding: 2px var(--s1) var(--s2); font-size: var(--fs-sm, 13px); color: var(--muted); font-variant-numeric: tabular-nums; }
.dash-line b { color: var(--ink); font-size: var(--fs-md, 14px); }
.dash-line .close { margin-left: auto; font-weight: 600; color: var(--blue); background: var(--pale); padding: var(--s1) var(--s2); border-radius: 999px; }
.dash-line a.dash-money { color: inherit; text-decoration: none; } .dash-line a.dash-money:hover b { text-decoration: underline; text-underline-offset: 2px; }
.dash-line a.dash-money.overdue, .dash-line a.dash-money.overdue b { color: var(--err); }

/* venue ledger tiles: venue colour owns the tile */
.vtile { padding: 0; gap: 0; overflow: hidden; }
.vtile-head { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); color: #fff; }
.vtile.ox .vtile-head { background: linear-gradient(100deg, #1247BC, #2C62D4); }
.vtile.ld .vtile-head { background: linear-gradient(100deg, #6B3FA0, #8657BE); }
.vtile-head .vtile-pin { background: #fff !important; box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.vtile-head .vtile-id b { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; }
.vtile-head .vtile-id small { color: rgba(255,255,255,.8); }
.vtile-head .vtile-fig { color: #fff; } .vtile-head .vtile-fig small { color: rgba(255,255,255,.75); }
.vtile-body { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2) var(--s3) var(--s3); }
.vtile.ox .vtile-body { background: #F3F6FD; } .vtile.ld .vtile-body { background: #F7F3FC; }
.vtile-money { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: var(--s2); padding-top: var(--s2); border-top: 1px dashed rgba(27,36,64,.12); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ink); }
.vtile-money small { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.vtile-money .net b { font-size: 18px; font-weight: 800; display: inline-block; animation: tick .5s cubic-bezier(.3,1.6,.5,1); }
.vtile.ox .vtile-money .net b { color: var(--blue); } .vtile.ld .vtile-money .net b { color: var(--purple); }
.vtile-money .sugg-money { color: var(--muted); }
.vtile::after { height: 0; }
.vtile.on { box-shadow: inset 0 0 0 2px currentColor; }
.vtile.dim { opacity: .5; }
.emap.showcase .vtile { padding: 0; }
.emap.showcase .vtile .vtile-id b { color: inherit; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; }
/* the public map names the venue in full: the place wraps instead of cropping, on the phone too */
.emap.showcase .vtile .vtile-id small { display: block; white-space: normal; overflow: visible; line-height: 1.35; }
.emap.showcase .vtile.ox { background: #F3F6FD; } .emap.showcase .vtile.ld { background: #F7F3FC; }
.emap.showcase .vtile { padding: var(--s2) var(--s3); }

/* landmark labels: just above each pin, never clipped */
.emap-venues .landmark { font: 800 10.5px Inter, Arial, sans-serif; letter-spacing: .14em; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(27,36,64,.25)); }
.emap-venues .ox .landmark { fill: var(--blue); } .emap-venues .ld .landmark { fill: var(--purple); }

/* hover linking from the panel */
.emap-clubs .club.hov circle { stroke: var(--cyan); stroke-width: calc(var(--z) * 3px); r: calc(var(--z) * (var(--r) + 3) * 1px); }
.emap-clubs .club.hov.clustered { visibility: visible; }
.emap-routes .route.hov { opacity: 1 !important; stroke-width: calc(var(--z) * 3px); }

/* selected club: bottom sheet over the map */
.emap-sheet { position: absolute; left: 12px; right: 12px; bottom: 12px; background: #fff; border-radius: 14px; box-shadow: 0 -2px 30px rgba(27,36,64,.18); padding: var(--s3) var(--s7) var(--s3) var(--s3); animation: sheet-up .28s cubic-bezier(.2,.8,.2,1); z-index: 4; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
.emap-sheet-close { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--bg); color: var(--muted); font-size: 17px; cursor: pointer; }
.sel-club { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) auto; gap: var(--s3); align-items: center; padding: 0; }
.sel-who { display: flex; gap: var(--s2); align-items: center; min-width: 0; }
.sel-blade { width: 54px; flex: none; }
.sel-id { min-width: 0; } .sel-id h3 { font-size: 15px; font-weight: 800; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-id p { margin: 1px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-id p b { color: var(--ink); } .sel-addr { margin: 0; }
.sel-choice { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1); }
.sel-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border-radius: 10px; padding: var(--s2) var(--s2); border: 1.5px solid var(--line); background: #fff; font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.sel-opt .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.sel-opt b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.sel-opt small { font-size: 11px; color: var(--muted); }
.sel-opt.ox .lbl { color: var(--blue); } .sel-opt.ld .lbl { color: var(--purple); }
button.sel-opt.ox:hover, .sel-opt.ox.sugg, .sel-opt.ox.here { border-color: var(--blue); background: #F1F5FD; }
button.sel-opt.ld:hover, .sel-opt.ld.sugg, .sel-opt.ld.here { border-color: var(--purple); background: #F6F2FB; }
.sel-opt.other { opacity: .55; cursor: default; }
.sel-actions { display: flex; flex-direction: column; gap: var(--s1); }
.emap-panel { width: min(320px, calc(100% - 24px)); }

/* task panel v2 */
.tasks-tabs { padding: var(--s1); }
.bulk { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); background: var(--ink); color: #fff; border-radius: 14px 14px 0 0; font-size: 13px; }
.bulk b { font-size: 15px; } .bulk span { margin-right: auto; opacity: .8; }
.bulk .linkbtn { color: #9FB8FF; }
.tsec { padding: var(--s1) 0 var(--s2); }
.tsec h3 { display: flex; align-items: baseline; gap: var(--s2); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: var(--s1) 0 var(--s1); }
.tsec h3 span { background: var(--bg); color: var(--ink); border-radius: 99px; padding: 1px var(--s2); font-size: 11px; }
.tsec h3 small { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.tsec.warn h3 { color: var(--warn); } .tsec.warn h3 span { background: var(--warn-bg); color: var(--warn); }
.aq-row { gap: var(--s2); }
.aq-row.checked { background: #EEF3FD; }
.aq-check { width: 18px; height: 18px; min-height: 0; accent-color: var(--blue); flex: none; cursor: pointer; }
.att-ico, .act-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; flex: none; }
.att-ico.pay { background: var(--warn-bg); color: var(--warn); } .att-ico.mail { background: var(--pale); color: var(--blue); }
.ledger { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin: var(--s1) 0 var(--s3); }
.ledger header { display: flex; align-items: baseline; gap: var(--s2); padding: var(--s2) var(--s3); color: #fff; }
.ledger.ox header { background: linear-gradient(100deg, #1247BC, #2C62D4); } .ledger.ld header { background: linear-gradient(100deg, #6B3FA0, #8657BE); }
.lg-name { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; }
.lg-place { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-net { margin-left: auto; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-net small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-right: var(--s1); }
.lg-figs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: var(--s2) var(--s3); gap: var(--s2); font-variant-numeric: tabular-nums; }
.ledger.ox .lg-figs, .ledger.ox .lg-sugg { background: #F3F6FD; } .ledger.ld .lg-figs, .ledger.ld .lg-sugg { background: #F7F3FC; }
.lg-figs dt { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lg-figs dd { margin: 0; font-weight: 700; font-size: 14px; } .lg-figs dd small { color: var(--muted); font-weight: 500; }
.lg-sugg { margin: 0; padding: 0 var(--s3) var(--s2); font-size: 12px; color: var(--muted); }
.ledger .aq-list { padding: var(--s1) var(--s2) var(--s2); }
.ledger .empty { padding: var(--s2) var(--s1); list-style: none; }
.lg-both { text-align: center; font-size: 13px; color: var(--muted); margin: var(--s1) 0 var(--s2); } .lg-both b { color: var(--ink); }
.xbtn.sm { width: 30px; height: 30px; font-size: 16px; }
.act { list-style: none; margin: 0; padding: var(--s1) 0; }
.act li { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s1); border-bottom: 1px solid #F0F2F7; }
.act-ico.paid { background: var(--ok-bg); color: var(--ok); } .act-ico.mailin { background: var(--pale); color: var(--blue); } .act-ico.mailout { background: var(--bg); color: var(--muted); }
.act time { font-size: 12px; color: var(--muted); white-space: nowrap; }

@media (max-width: 899px) {
  .vstrip { grid-template-columns: 1fr 1fr; }
  .vtile-head { padding: var(--s2) var(--s2); } .vtile-head .vtile-id small { display: none; } .vtile-head .vtile-fig b { font-size: 16px; }
  .vtile-body { padding: var(--s2) var(--s2); }
  .vtile-money { grid-template-columns: 1fr 1fr; } .vtile-money span:nth-child(n+3) { display: none; }
  .emap-sheet { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 16px 16px 0 0; padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom)); z-index: 60; box-shadow: 0 -8px 30px rgba(27,36,64,.25); }
  .sel-club { grid-template-columns: 1fr; gap: var(--s2); }
  .sel-actions { flex-direction: row; }
  .dash-line { gap: var(--s2); } .dash-line .close { margin-left: 0; }
  .lg-figs { grid-template-columns: repeat(2, 1fr); }
}

/* ===== v5: collapsible sections + clear venue tiles ===== */
.sx { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: var(--s2); overflow: hidden; }
.sx-head { display: flex; align-items: center; gap: var(--s2); padding-right: var(--s2); }
.sx-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s2); border: 0; background: none; font: inherit; color: inherit; text-align: left; padding: var(--s2) var(--s3); min-height: 44px; cursor: pointer; }
.sx-toggle:hover { background: #FAFBFE; }
.sx-chev { width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .18s; flex: none; margin-right: 2px; }
.sx.open .sx-chev { transform: rotate(45deg); }
.sx-title { font-weight: 800; font-size: 14px; white-space: nowrap; }
.sx-count { font-size: 11px; font-weight: 800; background: var(--bg); border-radius: 99px; padding: 1px var(--s2); }
.sx-sum { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.sx-sum b { color: var(--ink); }
.sx-body { padding: 0 var(--s2) var(--s2); border-top: 1px solid #F0F2F7; animation: sx-in .18s ease; }
@keyframes sx-in { from { opacity: 0; transform: translateY(-4px); } }
.sx.ox { border-left: 4px solid var(--blue); } .sx.ox .sx-title { color: var(--blue); } .sx.ox .sx-count { background: #E8EEFB; color: var(--blue); }
.sx.ld { border-left: 4px solid var(--purple); } .sx.ld .sx-title { color: var(--purple); } .sx.ld .sx-count { background: #F0E9F8; color: var(--purple); }
.sx.warn { border-left: 4px solid #E3A008; } .sx.warn .sx-title { color: var(--warn); } .sx.warn .sx-count { background: var(--warn-bg); color: var(--warn); }
.sx.ledger-sx.ox .sx-head { background: #F3F6FD; } .sx.ledger-sx.ld .sx-head { background: #F7F3FC; }
.sx .lg-figs { padding: var(--s2) 2px var(--s1); background: none !important; }
.sx .aq-list { padding: 0; }
.tasks-head { padding: var(--s1) 2px var(--s2); }

.vtile-fig { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.vtile-fig small { font-size: 11px !important; margin: 0 !important; }
.vtile-status { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px var(--s2); border-radius: 99px; }
.vtile-status.ok { background: var(--ok-bg); color: var(--ok); }
.vtile-status.over { background: var(--warn-bg); color: var(--warn); }
.vtile-status.room { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.vtile-legend { display: flex; gap: var(--s3); flex-wrap: wrap; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.vtile-legend .k { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: var(--s1); vertical-align: -1px; }
.vtile.ox .k.conf { background: var(--blue); } .vtile.ld .k.conf { background: var(--purple); }
.vtile.ox .k.sugg { background: repeating-linear-gradient(135deg, #9DB3E6 0 3px, #C7D4F1 3px 6px); }
.vtile.ld .k.sugg { background: repeating-linear-gradient(135deg, #B9A2D8 0 3px, #DCD0EC 3px 6px); }
.vtile-legend .k.target { width: 2px; height: 12px; border-radius: 1px; background: var(--ink); vertical-align: -2px; margin-left: var(--s1); }
.vtile-why { font-size: 11px; color: var(--muted); }
.vtile-foot { display: none; }
@media (max-width: 899px) { .vtile-why, .vtile-legend span:nth-child(2) { display: none; } }

/* venue landmark: filled pill in the venue colour, white text, pointer to the pin */
.emap-venues .landmark { filter: drop-shadow(0 2px 4px rgba(27,36,64,.3)); }
.emap-venues .landmark rect, .emap-venues .landmark path { stroke: #fff; stroke-width: 1.5; }
.emap-venues .ox .landmark rect, .emap-venues .ox .landmark path { fill: var(--blue); }
.emap-venues .ld .landmark rect, .emap-venues .ld .landmark path { fill: var(--purple); }
.emap-venues .landmark path { stroke: none; }
.emap-venues .landmark text { fill: #fff !important; stroke: none; font: 800 10px Inter, Arial, sans-serif; letter-spacing: .14em; paint-order: normal; }
.emap-clusters { display: none; }

/* v6: quieter tiles, obvious hover, glowing landmarks, info-only sheet */
.vtile-money { grid-template-columns: 1.4fr 1fr 1fr; }
.emap-venues .landmark { filter: drop-shadow(0 0 6px rgba(41,189,220,.55)) drop-shadow(0 2px 4px rgba(27,36,64,.3)); }
.emap-venues .ox .landmark { filter: drop-shadow(0 0 7px rgba(18,71,188,.55)) drop-shadow(0 2px 3px rgba(27,36,64,.25)); }
.emap-venues .ld .landmark { filter: drop-shadow(0 0 7px rgba(107,63,160,.55)) drop-shadow(0 2px 3px rgba(27,36,64,.25)); }
.emap.has-hov .club:not(.hov), .emap.has-hov .emap-routes path:not(.hov) { opacity: .12 !important; transition: opacity .15s; }
.emap.has-hov .emap-routes .route.hov { opacity: 1 !important; stroke-width: calc(var(--z) * 3.4px); }
.emap-clubs .club.hov circle { stroke: #fff; stroke-width: calc(var(--z) * 2.5px); r: calc(var(--z) * (var(--r) + 4) * 1px); filter: drop-shadow(0 0 calc(var(--z) * 6px) var(--cyan)); }
.emap-clubs .club.hov::after { content: none; }
.tag-chosen { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg); border-radius: 4px; padding: 1px var(--s1); margin-left: var(--s1); vertical-align: 1px; }
.seg button { min-width: 64px; }
.sel-club { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.sel-drive { margin: 0; }
.sel-drive small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.emap-sheet { padding-right: var(--s7); }
@media (max-width: 899px) { .sel-club { grid-template-columns: 1fr; } }
/* venue location dot: gold, so it stands apart from the blue and purple club dots */
:root { --gold: #F2B705; --gold-deep: #C98F00; }
.emap-venues .spot { fill: var(--gold) !important; stroke: #fff !important; stroke-width: 2.5; filter: drop-shadow(0 0 5px rgba(242,183,5,.75)) drop-shadow(0 1px 2px rgba(27,36,64,.35)); }
.emap-venues .core { fill: #fff !important; }
.emap-venues .ring, .emap-venues .burst { stroke: var(--gold) !important; }
.vtile-head .vtile-pin, .vtile-pin { background: var(--gold) !important; box-shadow: 0 0 0 2px #fff, 0 0 8px rgba(242,183,5,.8) !important; }

/* ==== mail actions: Mail page day groups + row actions, and the compose page (/admin/mail/compose) ==== */
.notice.err { background: var(--err-bg); color: var(--err); }
.ml-new { margin-left: auto; }
.ml-new svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

.ml-day { margin-bottom: var(--s3); }
.ml-day > summary { list-style: none; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s1); cursor: pointer; user-select: none; }
.ml-day > summary::-webkit-details-marker { display: none; }
.ml-day > summary b { font-size: var(--fs-md); }
.ml-day-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin: 0 var(--s1); }
.ml-day[open] .ml-day-chev { transform: rotate(45deg); }
.ml-day-count { background: var(--pale); color: var(--blue); font-size: var(--fs-xs); font-weight: 700; padding: 1px var(--s2); border-radius: var(--r-pill); }
.ml-day-sum { font-size: var(--fs-sm); }
.ml-row.mx { grid-template-columns: 28px minmax(0, 1fr) 96px 180px 44px 250px; }
.ml-thread { display: inline-block; margin-left: var(--s2); padding: 0 var(--s1); border-radius: var(--r-pill); background: var(--pale); color: var(--blue); font-weight: 600; }
.ml-acts { display: flex; gap: var(--s1); justify-content: flex-end; flex-wrap: wrap; }
.ml-acts form { display: contents; }
.ml-act { border: 1px solid transparent; background: none; color: var(--muted); font: 600 var(--fs-xs) Inter, sans-serif; padding: var(--s1) var(--s2); border-radius: var(--r-pill); text-decoration: none; cursor: pointer; white-space: nowrap; min-height: 28px; display: inline-flex; align-items: center; }
.ml-row:hover .ml-act, .ml-row:focus-within .ml-act { color: var(--blue); border-color: var(--line); background: #fff; }
.ml-row .ml-act:hover { background: var(--pale); border-color: var(--light); }
.ml-row .ml-act.warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
@media (max-width: 899px) {
  .ml-row.mx { grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "dir subject date" ". meta meta" ". acts acts"; }
  .ml-row.mx .ml-entry { grid-area: meta; justify-self: start; }
  .ml-row.mx .ml-files { grid-area: meta; justify-self: end; max-width: 62%; justify-content: flex-end; }
  .ml-acts { grid-area: acts; justify-content: flex-start; }
  .ml-act { min-height: 34px; padding: var(--s1) var(--s3); color: var(--blue); border-color: var(--line); background: #fff; }
}

.mc-head { display: flex; align-items: baseline; gap: var(--s3); margin: var(--s2) 0 var(--s3); }
.mc-head h1 { font-size: var(--fs-lg); margin: 0; }
.mc-back { color: var(--muted); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.mc-back:hover { color: var(--blue); }
.mc { display: grid; grid-template-columns: 1fr; gap: var(--s4); align-items: start; }
@media (min-width: 1100px) { .mc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .mc-side { position: sticky; top: var(--sticky-top); } }
.mc-form, .mc-side { display: grid; gap: var(--s3); min-width: 0; }
.mc-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: var(--card-pad); min-width: 0; }
.mc-label { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: var(--s2); display: flex; gap: var(--s2); align-items: baseline; flex-wrap: wrap; }
.mc-label small { letter-spacing: 0; text-transform: none; font-weight: 500; }
.mc-aud { display: flex; flex-wrap: wrap; gap: var(--s1); background: none; padding: 0; box-shadow: none; }
.mc-aud button { border: 1.5px solid var(--line); background: #fff; color: var(--ink); min-height: 38px; }
.mc-aud button.on { border-color: var(--ink); }
.mc-aud button:disabled { cursor: not-allowed; opacity: .6; }
.mc-find { margin-top: var(--s3); display: block; position: relative; }
.mc-find input { width: 100%; box-shadow: none; }
.mc-hits { margin-top: var(--s2); border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; }
.mc-hit { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left; border: 0; border-bottom: 1px solid #EEF1F6; background: #fff; font: inherit; padding: var(--s2) var(--s3); cursor: pointer; }
.mc-hit:last-child { border-bottom: 0; }
.mc-hit:hover { background: var(--pale); }
.mc-hit > span:first-child { flex: 1; min-width: 0; }
.mc-hit b, .mc-chosen b, .mc-list b { display: block; font-size: var(--fs-sm); }
.mc-hit small, .mc-chosen small, .mc-list small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.mc-hit .muted { font-size: var(--fs-xs); }
.mc-hit .pill, .mc-list .pill { font-size: 11px; padding: 2px var(--s2); }
.mc-chosen { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-ctl); background: var(--pale); }
.mc-chosen b { color: var(--blue); }
.mc-field { margin-bottom: var(--s3); }
.mc-field textarea { min-height: 280px; resize: vertical; line-height: 1.5; font-size: 15px; }
.mc-field textarea:focus { outline: none; border-color: var(--mid); box-shadow: 0 0 0 3px var(--pale); }
.mc-field :disabled { background: #F7F9FD; color: var(--muted); }
.mc-fields { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.mc-fields > span { display: flex; gap: var(--s1); flex-wrap: wrap; }
.mc-chip { border: 1px dashed var(--light); background: var(--pale); color: var(--blue); font: 600 var(--fs-xs) ui-monospace, SFMono-Regular, Menlo, monospace; padding: var(--s1) var(--s2); border-radius: 6px; cursor: pointer; }
.mc-chip:hover:not(:disabled) { border-style: solid; }
.mc-send { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.mc-send .mc-count, .mc-send .mc-confirm, .mc-send .mc-progress { flex: 1; min-width: 200px; }
.mc-count b { font-size: var(--fs-md); }
.mc-send.confirm { border: 2px solid var(--blue); }
.mc-confirm b { display: block; font-size: var(--fs-md); color: var(--blue); }
.mc-confirm small { display: block; }
.mc-progress b { display: block; margin-top: var(--s1); font-size: var(--fs-sm); }
.mc-bar { height: 8px; border-radius: var(--r-pill); background: var(--pale); overflow: hidden; }
.mc-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .3s; }
.mc-fail ul { margin: var(--s1) 0 0; padding-left: var(--s4); }
.mc-subjline { font-size: var(--fs-sm); margin-bottom: var(--s2); }
.mc-subjline small { color: var(--muted); margin-right: var(--s1); }
.mc-preview iframe { display: block; width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #EEF2F8; }
.mc-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow: auto; }
.mc-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s1) 0; border-bottom: 1px solid #EEF1F6; font-size: var(--fs-xs); }
.mc-list li:last-child { border-bottom: 0; }
.mc-list li > span:last-child { text-align: right; }
.mc-skipped { margin-top: var(--s3); }
.mc-skipped summary { cursor: pointer; font-weight: 600; font-size: var(--fs-sm); color: var(--muted); }
.mc-none { padding: var(--s2) 0; font-size: var(--fs-sm); }
/* ==== end mail actions ==== */
/* map search: every entry is findable; rows without a pin (no location yet, unpaid) open the entry instead */
.emap-results a { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: var(--s2) var(--s2); border-radius: 8px; color: var(--ink); text-decoration: none; }
.emap-results a:hover, .emap-results a.on { background: var(--pale); }
.emap-results .hit { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.emap-results .hit .nm { display: flex; align-items: center; gap: var(--s1); }
.emap-results .hit small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emap-off { color: var(--ic-meta); font-size: var(--ic-sm); flex: none; }
.emap-go { color: var(--placeholder); font-size: var(--ic-sm); flex: none; }
.emap-none { margin: 0; padding: var(--s2); color: var(--muted); font-size: 13px; }
.emap-results button.emap-unpaid { min-height: 36px; margin-top: 2px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.emap-unpaid .ic { font-size: var(--ic-sm); } .emap-unpaid.on { color: var(--blue); }
/* Mail › Outbox */
.ob-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); }
.ob-bar .ob-all { display: inline-flex; align-items: center; gap: var(--s1); margin-right: auto; font-size: var(--fs-sm, .875rem); }
.ob-pick, .ob-all input { appearance: auto; -webkit-appearance: checkbox; width: 18px !important; height: 18px !important; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--blue, #1247BC); }
.ml-dir.ob-cell { background: none; }
.ob-bar .ob-all { white-space: nowrap; }
.at-badge { margin-left: var(--s1); min-width: 18px; height: 18px; padding: 0 var(--s1); border-radius: 9px; background: #F2B705; color: #1B2333; font: 700 11px/18px Inter, sans-serif; text-align: center; }
