/*
UBOJA MIS - mwonekano wa pamoja.

A thin layer over W3.CSS, which every page already loads. The point is
one look across the system without rewriting each page: colours, the
top bar, cards, tables and buttons are defined here and the pages keep
their W3 classes.

Colours are taken from the logo on the public site: the teal of the
rider and the ring, black, and white.
*/

:root{
  --ub-teal:        #0E7490;   /* the logo's blue-green */
  --ub-teal-dark:   #0A5A70;
  --ub-teal-darker: #084457;
  --ub-teal-pale:   #E3F2F6;
  --ub-ink:         #16202A;
  --ub-muted:       #6B7785;
  --ub-line:        #E2E8EC;
  --ub-bg:          #F4F6F7;
  --ub-surface:     #FFFFFF;
  --ub-good:        #1B873F;
  --ub-warn:        #B06A00;
  --ub-bad:         #C0392B;
}

/*
An author rule with `display` beats the browser's own [hidden] rule, so
anything the pages hide with el.hidden = true stays on screen - the kata
and kanda pickers kept showing every row because .pick-item sets
display:flex. Say it once, here, with enough weight to win.
*/
[hidden]{ display: none !important; }

body{
  background: var(--ub-bg);
  color: var(--ub-ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- top bar ---------- */

.ub-top{
  background: var(--ub-teal);
  color: #fff;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  position: relative;
  z-index: 5;
}
.ub-top a{ color:#fff; text-decoration:none; }
.ub-brand{ display:flex; align-items:center; gap:9px; font-weight:700; letter-spacing:.3px; }
.ub-brand img{ height:30px; width:30px; border-radius:50%; background:#fff; object-fit:cover; }
.ub-brand small{ display:block; font-weight:400; font-size:10px; opacity:.85; letter-spacing:.2px; }
.ub-top-right{ margin-left:auto; display:flex; align-items:center; gap:12px; font-size:12px; }
.ub-who{ opacity:.9; }
.ub-out{
  border:1px solid rgba(255,255,255,.55); border-radius:3px;
  padding:3px 9px; font-size:12px;
}
.ub-out:hover{ background:rgba(255,255,255,.14); }

/* the hamburger, small screens only */
.ub-burger{
  display:none; background:none; border:0; color:#fff;
  font-size:22px; line-height:1; cursor:pointer; padding:0 6px;
}

/* ---------- side navigation ---------- */

.ub-side{
  background: var(--ub-surface);
  border-right:1px solid var(--ub-line);
  width:226px; position:fixed; top:52px; bottom:0; left:0;
  overflow-y:auto; overscroll-behavior:contain;
  padding:8px 0 24px; z-index:4;
}
.ub-side::-webkit-scrollbar{ width:8px; }
.ub-side::-webkit-scrollbar-thumb{ background:#D6DEE3; border-radius:4px; }

/* every row, group header or link, shares one rhythm */
.ub-side a,
.ub-side summary{
  display:flex; align-items:center; gap:10px;
  padding:0 14px; height:36px;
  font-size:13px; color:#3C4A56; text-decoration:none;
  border-left:3px solid transparent;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.ub-ic{
  width:16px; height:16px; flex:0 0 16px; opacity:.72;
}

/* ---- the standalone first item ---- */
.ub-side .ub-top-item{
  font-weight:600; margin-bottom:4px;
}

/* ---- links ---- */
.ub-side a:hover{ background:#F2F7F9; color:var(--ub-teal-dark); }
.ub-side a:hover .ub-ic{ opacity:1; }

.ub-side a.on{
  background:var(--ub-teal-pale);
  border-left-color:var(--ub-teal);
  color:var(--ub-teal-dark);
  font-weight:600;
}
.ub-side a.on .ub-ic{ opacity:1; color:var(--ub-teal); }

/* keyboard users still get a ring; mouse users do not get a box */
.ub-side a:focus, .ub-side summary:focus{ outline:none; }
.ub-side a:focus-visible, .ub-side summary:focus-visible{
  outline:2px solid var(--ub-teal); outline-offset:-2px;
}

/* ---- groups ---- */
.ub-side .ub-grp{ margin-top:2px; }

.ub-side .ub-grp > summary{
  cursor:pointer; user-select:none;
  justify-content:space-between;
  font-size:11px; font-weight:700; letter-spacing:.7px;
  text-transform:uppercase; color:#6B7884;
  height:38px;
}
/* icon + label travel together on the left; the chevron holds the right */
.ub-side .ub-grp > summary .ub-grp-h{
  display:flex; align-items:center; gap:10px; min-width:0; overflow:hidden;
}
.ub-side .ub-grp > summary .ub-grp-t{
  overflow:hidden; text-overflow:ellipsis;
}
.ub-side .ub-grp > summary .ub-ic{ opacity:.6; }

/* the browser's own triangle, removed in every engine that draws one */
.ub-side .ub-grp > summary{ list-style:none; }
.ub-side .ub-grp > summary::-webkit-details-marker{ display:none; }
.ub-side .ub-grp > summary::marker{ content:""; }

.ub-side .ub-grp > summary:hover{ color:var(--ub-teal-dark); background:#F2F7F9; }
.ub-side .ub-grp > summary:hover .ub-ic{ opacity:1; }

/* our own chevron, drawn rather than typed so it rotates cleanly */
.ub-chev{
  width:8px; height:8px; flex:0 0 8px;
  border-right:1.6px solid currentColor;
  border-bottom:1.6px solid currentColor;
  transform:rotate(45deg) translate(-1px,-1px);
  transition:transform .16s ease; opacity:.55;
}
.ub-side .ub-grp[open] > summary .ub-chev{
  transform:rotate(-135deg) translate(-2px,-2px);
}
.ub-side .ub-grp[open] > summary{ color:var(--ub-teal-dark); }
.ub-side .ub-grp[open] > summary .ub-ic{ opacity:1; color:var(--ub-teal); }

/* a hairline under each group, except the last */
.ub-side .ub-grp + .ub-grp > summary{
  border-top:1px solid #EEF2F4;
}

.ub-grp-b{ padding-bottom:4px; }
.ub-grp-b a{ padding-left:14px; }

.ub-main{ margin-left:226px; padding:18px 20px; }

@media (max-width: 900px){
  .ub-burger{ display:inline-block; }
  .ub-side{ left:-240px; transition:left .18s ease; box-shadow:2px 0 14px rgba(0,0,0,.18); }
  .ub-side.open{ left:0; }
  .ub-main{ margin-left:0; padding:12px; }
}

/* ---------- headings and crumbs ---------- */

.ub-crumb{ font-size:12px; color:var(--ub-muted); margin-bottom:10px; }
.ub-crumb a{ color:var(--ub-teal-dark); text-decoration:none; }
.ub-crumb a:hover{ text-decoration:underline; }

h1,h2,h3,h4,h5{ color:var(--ub-ink); }
.ub-h{
  font-size:17px; font-weight:700; color:var(--ub-teal-dark);
  margin:0 0 3px; letter-spacing:.2px;
}
.ub-sub{ font-size:12px; color:var(--ub-muted); margin:0 0 14px; }

/* ---------- cards ---------- */

.ub-card{
  background:var(--ub-surface); border:1px solid var(--ub-line);
  border-radius:5px; padding:14px; margin-bottom:14px;
}
.ub-card h5{ margin:0 0 9px; font-size:13px; color:var(--ub-teal-dark); font-weight:700; }

/* the dashboard number tiles */
.ub-tiles{ display:flex; flex-wrap:wrap; gap:12px; margin-bottom:6px; }
.ub-tile{
  background:var(--ub-surface); border:1px solid var(--ub-line);
  border-top:3px solid var(--ub-teal); border-radius:5px;
  padding:12px 14px; flex:1 1 150px; min-width:150px;
  text-decoration:none; color:inherit; display:block;
}
a.ub-tile:hover{ border-color:var(--ub-teal); box-shadow:0 1px 6px rgba(14,116,144,.16); }
.ub-tile .k{ font-size:10.5px; text-transform:uppercase; letter-spacing:.7px; color:var(--ub-muted); }
.ub-tile .v{ font-size:25px; font-weight:700; color:var(--ub-ink); line-height:1.25; }
.ub-tile .n{ font-size:11.5px; color:var(--ub-muted); }
.ub-tile.warn{ border-top-color:var(--ub-warn); }
.ub-tile.bad{  border-top-color:var(--ub-bad); }
.ub-tile.good{ border-top-color:var(--ub-good); }

/* ---------- meters ---------- */

.ub-bar{ background:#E8EDF0; border-radius:3px; height:7px; overflow:hidden; }
.ub-bar > i{ display:block; height:7px; background:var(--ub-teal); }
.ub-bar.warn > i{ background:var(--ub-warn); }
.ub-bar.bad  > i{ background:var(--ub-bad); }
.ub-bar.good > i{ background:var(--ub-good); }

/* ---------- tables ---------- */

.ub-table{ width:100%; border-collapse:collapse; background:var(--ub-surface); font-size:13px; }
.ub-table th, .ub-table td{
  padding:8px 10px; border-bottom:1px solid var(--ub-line); text-align:left; vertical-align:top;
}
.ub-table thead th{
  background:var(--ub-teal); color:#fff; font-size:10.5px;
  text-transform:uppercase; letter-spacing:.6px; font-weight:600; border-bottom:0;
}
.ub-table tbody tr:hover{ background:var(--ub-teal-pale); }
.ub-table .r{ text-align:right; }
.ub-wrap{ overflow-x:auto; border:1px solid var(--ub-line); border-radius:5px; }

/* ---------- tags and notes ---------- */

.ub-tag{
  display:inline-block; padding:1px 7px; border-radius:10px;
  font-size:10.5px; font-weight:600; letter-spacing:.2px;
}
.ub-tag.ok{   background:#E3F5E9; color:var(--ub-good); }
.ub-tag.warn{ background:#FFF3DF; color:var(--ub-warn); }
.ub-tag.bad{  background:#FDE9E7; color:var(--ub-bad); }
.ub-tag.flat{ background:#ECEFF1; color:var(--ub-muted); }

.ub-note{ border-left:3px solid var(--ub-teal); background:var(--ub-teal-pale);
          padding:10px 12px; border-radius:0 4px 4px 0; margin-bottom:14px; font-size:13px; }
.ub-note.warn{ border-left-color:var(--ub-warn); background:#FFF8EC; }
.ub-note.bad{  border-left-color:var(--ub-bad);  background:#FDEDEB; }
.ub-note.good{ border-left-color:var(--ub-good); background:#EDF7F0; }
/* notify() hands back a <ul>; it should not look like a bullet list */
.ub-note ul{ margin:0; padding:0; list-style:none; }

/* ---------- buttons ---------- */

.ub-btn{
  display:inline-block; background:var(--ub-teal); color:#fff; border:0;
  border-radius:4px; padding:7px 14px; font-size:13px; cursor:pointer;
  text-decoration:none; font-family:inherit;
}
.ub-btn:hover{ background:var(--ub-teal-dark); }
.ub-btn.ghost{ background:#fff; color:var(--ub-teal-dark); border:1px solid var(--ub-line); }
.ub-btn.ghost:hover{ background:var(--ub-teal-pale); }
.ub-btn.bad{ background:var(--ub-bad); }
.ub-btn.sm{ padding:4px 9px; font-size:11.5px; }

/* W3.CSS buttons that remain on older pages should still look right */
.w3-teal, .w3-button.w3-teal{ background-color:var(--ub-teal) !important; }
.w3-text-teal{ color:var(--ub-teal-dark) !important; }

input.w3-input, select.w3-select, textarea.w3-input, .ub-input{
  border:1px solid var(--ub-line); border-radius:4px; padding:7px 9px;
  font-size:13px; font-family:inherit; background:#fff; width:100%;
}
input.w3-input:focus, select.w3-select:focus, .ub-input:focus{
  outline:0; border-color:var(--ub-teal);
}
label, .ub-label{
  font-size:10.5px; text-transform:uppercase; letter-spacing:.6px;
  color:var(--ub-muted); display:block; margin-bottom:3px;
}
.ub-label .req{ color:var(--ub-bad); }

/*
Fields sit in a grid that reflows on its own: as many ~230px columns as
fit. No breakpoints to maintain, and on a phone it becomes one column.
*/
.ub-grid{
  display:grid; gap:12px 14px;
  grid-template-columns:repeat(auto-fit, minmax(210px, 1fr));
}
.ub-grid .wide{ grid-column:1 / -1; }

.ub-hint{ display:block; font-size:11px; color:var(--ub-muted); margin-top:3px; }

.ub-radios{ display:flex; gap:16px; padding-top:4px; }
.ub-radio{
  font-size:13px; text-transform:none; letter-spacing:0; color:var(--ub-ink);
  display:inline-flex; align-items:center; gap:6px; margin:0; cursor:pointer;
}
.ub-radio input{ accent-color:var(--ub-teal); margin:0; }

.ub-actions{
  display:flex; gap:9px; align-items:center; flex-wrap:wrap;
  padding-top:2px; margin-bottom:18px;
}

/* a search box with its buttons on one line, wrapping on a phone */
.ub-searchrow{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.ub-searchrow .ub-input{ flex:1 1 260px; width:auto; }

.ub-pager{
  display:flex; gap:10px; align-items:center; justify-content:center;
  margin:14px 0 20px; font-size:12px; color:var(--ub-muted);
}

/* step counter for the two-page registration */
.ub-steps{ display:flex; gap:8px; margin:0 0 14px; font-size:12px; flex-wrap:wrap; }
.ub-steps span{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 11px; border-radius:20px;
  background:#fff; border:1px solid var(--ub-line); color:var(--ub-muted);
}
.ub-steps span b{
  width:17px; height:17px; border-radius:50%; background:var(--ub-line);
  color:var(--ub-muted); font-size:10.5px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center;
}
.ub-steps span.on{ background:var(--ub-teal); border-color:var(--ub-teal); color:#fff; }
.ub-steps span.on b{ background:#fff; color:var(--ub-teal-dark); }

/* ---------- older pages ---------- */

/*
Several older pages carry their own fixed W3.CSS sidebar at left:0,
exactly where ours sits, and a .w3-main offset to clear it. Rather than
edit seventy files, let those become ordinary blocks inside the content
column: the page's own sub-menu then reads as a panel above its
content, and nothing overlaps.
*/
.ub-main .w3-sidebar{
  position: static !important;
  width: auto !important;
  height: auto !important;
  top: auto !important; left: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
  border: 1px solid var(--ub-line);
  border-radius: 5px;
  margin-bottom: 14px;
  background: var(--ub-surface);
}
/* a sidebar the page hides until a button is pressed stays hidden */
.ub-main .w3-sidebar[style*="display:none"]{ display: none !important; }

.ub-main .w3-main{ margin-left: 0 !important; }

/* their toggle buttons no longer have anything to toggle */
.ub-main .w3-main > .w3-teal > .w3-button.w3-hide-large{ display: none; }

/* older tables are dense and often overflow on a phone */
.ub-main table{ max-width: 100%; }
.ub-main .w3-table-all th{ background: var(--ub-teal); color: #fff; }
.ub-main .w3-table-all, .ub-main .w3-table{ background: var(--ub-surface); }

/* printing: drop the chrome */
@media print{
  .ub-top, .ub-side, .ub-btn, .ub-crumb{ display:none !important; }
  .ub-main{ margin:0; padding:0; }
}

/* ---------- one person's page ---------- */

/*
The header of a profile: picture, who they are, and the actions. The
picture falls back to initials rather than a broken image, because a
leader need not be a member and only members have photographs.
*/
.ub-person{
  display:flex; gap:14px; align-items:flex-start; flex-wrap:wrap;
  background:var(--ub-surface); border:1px solid var(--ub-line);
  border-top:3px solid var(--ub-teal); border-radius:5px;
  padding:14px; margin-bottom:14px;
}
.ub-person-pic{
  width:64px; height:64px; border-radius:5px; object-fit:cover;
  display:block; flex:0 0 auto; background:var(--ub-bg);
}
.ub-person-blank{
  display:flex; align-items:center; justify-content:center;
  background:var(--ub-teal-pale); color:var(--ub-teal-dark);
  font-weight:700; font-size:20px; letter-spacing:1px;
}
.ub-person-id{ flex:1 1 220px; min-width:0; }
.ub-person-id h3{ margin:0; font-size:18px; font-weight:700; }
.ub-person-meta{ font-size:12px; color:var(--ub-muted); margin-top:2px; }
.ub-person-act{ display:flex; gap:8px; flex-wrap:wrap; align-items:flex-start; }

/* two cards side by side on a wide screen, stacked on a phone */
.ub-cols{
  display:grid; gap:14px;
  grid-template-columns:repeat(auto-fit, minmax(290px, 1fr));
  align-items:start;
}

/* label-and-value rows inside a card */
.ub-kv{ width:100%; border-collapse:collapse; }
.ub-kv th{
  text-align:left; vertical-align:top; padding:6px 10px 6px 0;
  font-size:10.5px; text-transform:uppercase; letter-spacing:.6px;
  color:var(--ub-muted); font-weight:600; white-space:nowrap; width:1%;
}
.ub-kv td{ padding:6px 0; vertical-align:top; font-size:13px; }
.ub-kv tr + tr th, .ub-kv tr + tr td{ border-top:1px solid var(--ub-line); }
.ub-kv a{ color:var(--ub-teal-dark); }
.ub-kv-note{ font-size:11px; color:var(--ub-muted); margin-top:2px; }
.ub-kv code{
  background:var(--ub-bg); border:1px solid var(--ub-line);
  border-radius:3px; padding:1px 5px; font-size:12px;
}

/* ---------- clickable chips ---------- */

/*
Small buttons that drop a merge tag into a message. They are buttons, not
links: they act on the field beside them and must not be followed or
opened in a new tab.
*/
.ub-chips{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; }
.ub-chips-lab{
  font-size:10.5px; text-transform:uppercase; letter-spacing:.6px;
  color:var(--ub-muted); margin-right:2px;
}
.ub-chip{
  background:var(--ub-teal-pale); color:var(--ub-teal-dark);
  border:1px solid #CBE4EB; border-radius:12px;
  padding:3px 10px; font-size:11.5px; font-family:inherit;
  cursor:pointer; line-height:1.4;
}
.ub-chip:hover{ background:var(--ub-teal); color:#fff; border-color:var(--ub-teal); }
.ub-chip:active{ transform:translateY(1px); }

/* ---------- eneo la mwanachama ---------- */

/*
The member area has five sections, so they are tabs across the top
rather than the staff sidebar: a member is not navigating a system, they
are looking at one record. On a phone the row scrolls sideways instead
of collapsing into a drawer nobody finds.
*/
.ma-tabs{
  display:flex; gap:2px; background:var(--ub-surface);
  border-bottom:1px solid var(--ub-line);
  padding:0 12px; overflow-x:auto; overscroll-behavior-x:contain;
  position:sticky; top:0; z-index:3;
}
.ma-tabs::-webkit-scrollbar{ height:0; }
.ma-tabs a{
  display:flex; align-items:center; gap:7px; white-space:nowrap;
  padding:11px 14px; font-size:13.5px; font-weight:600;
  color:var(--ub-muted); text-decoration:none;
  border-bottom:3px solid transparent;
}
.ma-tabs a:hover{ color:var(--ub-teal-dark); background:#F5F9FA; }
.ma-tabs a.on{ color:var(--ub-teal-dark); border-bottom-color:var(--ub-teal); }
.ma-tabs a .ub-ic{ opacity:.7; }
.ma-tabs a.on .ub-ic{ opacity:1; color:var(--ub-teal); }

.ma-main{ max-width:960px; margin:0 auto; padding:18px 20px 40px; }

@media (max-width: 760px){
  .ma-tabs{ padding:0 6px; }
  .ma-tabs a{ padding:10px 11px; font-size:12.5px; }
  .ma-tabs a span{ display:none; }   /* icons only once it is tight */
  .ma-tabs a .ub-ic{ width:19px; height:19px; flex-basis:19px; }
  .ma-main{ padding:14px 12px 32px; }
}

/* a notice in the member area */
.ma-notice{ border-left:3px solid var(--ub-line); padding:0 0 0 12px; margin:0 0 14px; }
.ma-notice:last-child{ margin-bottom:0; }
.ma-notice.pin{ border-left-color:var(--ub-warn); }
.ma-notice h4{ margin:0; font-size:15px; font-weight:700; color:var(--ub-teal-dark); }
.ma-notice-m{ font-size:11px; color:var(--ub-muted); margin:1px 0 5px; }
.ma-notice p{ margin:0; font-size:14px; color:#38454F; }

/* the "si sahihi?" link beside a value the member cannot edit */
.ma-flag{
  font-size:11px; color:var(--ub-muted); text-decoration:none;
  border-bottom:1px dotted var(--ub-muted); margin-left:4px; white-space:nowrap;
}
.ma-flag:hover{ color:var(--ub-teal-dark); border-bottom-color:var(--ub-teal); }

/* ---------- the SMS audience switch ---------- */

/*
Members or leaders is the decision that divides the cost by ten, so it
is a pair of cards rather than a line in a dropdown.
*/
.sms-who{ display:grid; gap:10px; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr)); }
.sms-who-opt{
  display:block; cursor:pointer; margin:0;
  border:1px solid var(--ub-line); border-radius:6px;
  padding:11px 13px 11px 36px; position:relative;
  text-transform:none; letter-spacing:0; color:inherit;
  background:var(--ub-surface);
}
.sms-who-opt:hover{ border-color:var(--ub-teal); }
.sms-who-opt.on{ border-color:var(--ub-teal); background:var(--ub-teal-pale); }
.sms-who-opt input{ position:absolute; left:13px; top:14px; accent-color:var(--ub-teal); margin:0; }
.sms-who-opt b{ display:block; font-size:14.5px; color:var(--ub-ink); }
.sms-who-opt.on b{ color:var(--ub-teal-dark); }
.sms-who-opt span{
  display:block; font-size:11.5px; color:var(--ub-muted);
  text-transform:none; letter-spacing:0; margin-top:1px;
}

/* the live recipient count beside the submit button */
.sms-sum{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; flex-wrap:wrap;
  background:var(--ub-surface); border:1px solid var(--ub-line);
  border-left:3px solid var(--ub-teal); border-radius:5px;
  padding:12px 14px; margin-bottom:12px; font-size:15px;
}
.sms-sum b{ color:var(--ub-teal-dark); font-size:18px; }
.sms-sum-n{ font-size:11.5px; color:var(--ub-muted); margin-top:2px; }
.sms-who-opt span .n{ color:var(--ub-teal-dark); font-size:13px; }
.sms-who-opt span i{ font-style:normal; opacity:.75; }

/* ---------- multiple choice picker ---------- */

/*
A scrolling list of checkboxes with a filter above it, used where a
<select multiple> would be unusable: 662 kanda, on a phone, where
clicking without Ctrl silently clears the lot.
*/
.pick{ border:1px solid var(--ub-line); border-radius:5px; background:var(--ub-surface); }
.pick.has{ border-color:var(--ub-teal); }
.pick-top{ display:flex; align-items:center; gap:8px; padding:7px 8px; border-bottom:1px solid var(--ub-line); }
.pick-top .pick-search{ border:0; padding:3px 2px; font-size:13px; background:transparent; }
.pick-top .pick-search:focus{ outline:none; }
.pick-count{
  font-size:10.5px; text-transform:uppercase; letter-spacing:.5px;
  color:var(--ub-muted); white-space:nowrap;
}
.pick.has .pick-count{ color:var(--ub-teal-dark); font-weight:700; }

.pick-list{ max-height:208px; overflow-y:auto; overscroll-behavior:contain; }
.pick-list::-webkit-scrollbar{ width:8px; }
.pick-list::-webkit-scrollbar-thumb{ background:#D6DEE3; border-radius:4px; }

.pick-grp{
  position:sticky; top:0; background:#F2F7F9;
  font-size:10px; text-transform:uppercase; letter-spacing:.7px;
  color:var(--ub-muted); padding:4px 10px; border-bottom:1px solid var(--ub-line);
}
.pick-item{
  display:flex; align-items:center; gap:9px;
  padding:5px 10px; font-size:13px; cursor:pointer; margin:0;
  text-transform:none; letter-spacing:0; color:var(--ub-ink);
}
.pick-item:hover{ background:#F5F9FA; }
.pick-item input{ accent-color:var(--ub-teal); margin:0; flex:0 0 auto; }
.pick-item .pick-n{ flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pick-item b{ font-size:11.5px; color:var(--ub-muted); font-weight:600; }
.pick-item.empty .pick-n, .pick-item.empty b{ opacity:.45; }
.pick-item:has(input:checked){ background:var(--ub-teal-pale); }

.pick-act{ display:flex; gap:6px; padding:7px 8px; border-top:1px solid var(--ub-line); }
.pick-act button{
  background:none; border:0; font-family:inherit; font-size:11.5px;
  color:var(--ub-teal-dark); cursor:pointer; padding:2px 6px; border-radius:3px;
}
.pick-act button:hover{ background:var(--ub-teal-pale); }

/* the rank checkboxes read as pills, not a list */
.pick-row{ display:flex; flex-wrap:wrap; gap:7px; }
.pick-pill{
  display:inline-flex; align-items:center; gap:7px; margin:0;
  border:1px solid var(--ub-line); border-radius:16px;
  padding:5px 13px 5px 10px; font-size:13px; cursor:pointer;
  text-transform:none; letter-spacing:0; color:var(--ub-ink);
  background:var(--ub-surface);
}
.pick-pill:hover{ border-color:var(--ub-teal); }
.pick-pill.on{ background:var(--ub-teal-pale); border-color:var(--ub-teal); color:var(--ub-teal-dark); font-weight:600; }
.pick-pill input{ accent-color:var(--ub-teal); margin:0; }

.pick-empty{ padding:10px; font-size:12.5px; color:var(--ub-muted); }
.pick-scope{
  margin-left:auto; font-size:11px; color:var(--ub-teal-dark);
  align-self:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.pick-act{ align-items:center; }

/* three pickers side by side where there is room */
.ub-grid3{
  display:grid; gap:12px 14px;
  grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
}

/* ---- member-list filter bar (view.php?option=all) ----
   A labelled strip under the search box: a leading heading, each select
   captioned, and the action pinned to the right, bottom-aligned so the
   button sits level with the controls rather than their captions. */
.ub-filterbar{
  display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px 12px;
  margin-top:12px; padding-top:12px; border-top:1px solid var(--ub-line);
}
.ub-filterbar .ub-filterlab{
  display:inline-flex; align-items:center; gap:6px;
  font-size:11px; font-weight:700; letter-spacing:.04em;
  text-transform:uppercase; color:var(--ub-muted);
  align-self:flex-end; padding-bottom:9px;
}
.ub-filterbar .ub-filterlab .ub-ic{ width:15px; height:15px; }
.ub-fld{ display:flex; flex-direction:column; gap:4px; flex:1 1 190px; min-width:0; }
.ub-fld > span{ font-size:11px; font-weight:600; color:var(--ub-muted); }
.ub-fld select{ width:100%; }
.ub-filteract{ display:flex; gap:8px; align-items:center; margin-left:auto; }
@media (max-width:640px){
  .ub-filterbar .ub-filterlab{ flex:1 1 100%; align-self:flex-start; padding-bottom:0; }
  .ub-filteract{ margin-left:0; flex:1 1 100%; }
  .ub-filteract .ub-btn{ flex:1 1 auto; }
}
