/* NeedsMatch — palette drawn from the island: lagoon teal, ink, paper,
   flamboyant coral reserved strictly for urgency and surge. */
:root {
  --teal: #0B5D5A;
  --teal-soft: #DCEBEA;
  --ink: #152226;
  --paper: #F3F6F5;
  --card: #FFFFFF;
  --coral: #E4572E;
  --coral-soft: #FBE7DF;
  --amber: #C88A1D;
  --line: #D8E2E0;
  --muted: #5B6E6C;
  --radius: 10px;
  /* Motion tokens — a crisp dashboard: short durations, strong ease-out.
     (Curves from the animation audit playbook.) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-fast: 120ms;   /* hover / colour / press */
  --dur-ui: 190ms;     /* dropdowns, toast, form/panel entrances */
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Inter", system-ui, sans-serif; font-size: 15px; line-height: 1.5;
}
h1, h2, h3, .brand-name { font-family: "Archivo", system-ui, sans-serif; }
h1 { font-size: 1.5rem; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
h3 { margin: 0 0 .5rem; font-weight: 700; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .9rem; }

.surge-banner {
  background: var(--coral); color: #fff; text-align: center; padding: .45rem 1rem;
  font-weight: 600; font-size: .85rem; letter-spacing: .04em;
}
.surge-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; margin-right: .4rem; animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
@media (prefers-reduced-motion: reduce) { .surge-dot { animation: none } }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1.5rem; background: var(--teal); color: #fff;
}
.brand { display: flex; align-items: baseline; gap: .5rem; }
.brand-mark { color: #7FD1C7; }
.brand-name { font-weight: 800; font-size: 1.2rem; }
.brand-sub { font-size: .75rem; opacity: .75; text-transform: uppercase; letter-spacing: .12em; }
.org-picker { font-size: .85rem; display: flex; align-items: center; gap: .5rem; }
.org-picker select {
  background: #fff; border: none; border-radius: 6px; padding: .35rem .5rem;
  font-family: inherit; font-size: .85rem; max-width: 240px;
}

.tabs { display: flex; gap: .25rem; padding: 0 1.5rem; background: var(--teal); overflow-x: auto; }
.tab {
  background: none; border: none; color: #CFE5E2; padding: .6rem 1rem; cursor: pointer;
  font: 600 .9rem "Inter", sans-serif; border-radius: 8px 8px 0 0;
}
.tab.active { background: var(--paper); color: var(--ink); }
.tab:focus-visible { outline: 2px solid #fff; }

main { max-width: 1080px; margin: 0 auto; padding: 1.5rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; flex-wrap: wrap; gap: .75rem; }
.head-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.reg-mode { display: flex; gap: 1.2rem; margin: 0 0 .9rem; font-size: .9rem; flex-wrap: wrap; }
.reg-mode label { display: flex; align-items: center; gap: .4rem; }
.sub-h { margin: .8rem 0 .4rem; font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.dpa-notice { background: #FBF6E9; border: 1px solid #E7D9A8; color: #6b5a1e; border-radius: 8px; padding: .7rem 1rem; font-size: .82rem; line-height: 1.4; margin: 0 0 1rem; }
.chk { display: flex; align-items: center; gap: .5rem; font-size: .88rem; margin: .5rem 0; }
.ben-picker-wrap { margin: .8rem 0; }
.ben-picker-label { font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
/* Searchable multi-select: chips (selected) + a search box that opens a
   filtered dropdown. Scales to long beneficiary lists. */
.ben-picker.ben-empty { border: 0; padding: 0; }
.ben-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .4rem; }
.ben-chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--teal-soft); color: var(--teal); border-radius: 999px; padding: .2rem .3rem .2rem .6rem; font-size: .8rem; }
.ben-chip-x { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .2rem; border-radius: 999px; transition: background var(--dur-fast) ease; }
.ben-chip-x:hover { background: rgba(0,0,0,.12); }
.ben-chip-empty { display: inline-block; padding: .1rem 0; }
.ben-search-wrap { position: relative; }
.ben-search { width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--card); color: var(--ink); }
.ben-search:focus { outline: none; border-color: var(--teal); }
.ben-options {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  max-height: 220px; overflow-y: auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(21,34,38,.14);
  transform-origin: top;
}
.ben-options:not(.hidden) { animation: nm-pop-in var(--dur-ui) var(--ease-out); }
.ben-opt { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; font-size: .85rem; cursor: pointer; transition: background-color var(--dur-fast) ease; }
.ben-opt:hover { background: var(--paper); }
.ben-opt.on { color: var(--teal); font-weight: 600; }
.ben-opt-check { width: 1rem; display: inline-block; text-align: center; }
.ben-opt-empty { padding: .5rem .6rem; }
.saved-alerts { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .1rem 0 .6rem; }
.saved-alerts:empty { margin: 0; }
.saved-alerts-label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.alert-chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--light, #EFF5F4); border: 1px solid var(--line, #D8E2E0); border-radius: 999px; padding: .15rem .6rem; font-size: .76rem; }
.alert-chip a { color: var(--muted); text-decoration: none; font-weight: 700; }
.alert-chip a:hover { color: var(--coral, #E4572E); }
.prof-card { margin-top: .5rem; }
.prof-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.prof-meta { font-size: .82rem; color: var(--muted); margin: .3rem 0 .7rem; }
.prof-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.prof-stat { background: var(--light, #EFF5F4); border-radius: 8px; padding: 8px 10px; }
.prof-v { font-size: 18px; font-weight: 800; color: var(--teal, #0B5D5A); }
.prof-l { font-size: 11px; color: var(--muted); margin-top: 2px; }
.prof-note { margin-top: .7rem; }
/* Notification bell + dropdown */
.notif-wrap { position: relative; }
.notif-bell { position: relative; background: transparent; border: 0; cursor: pointer; font-size: 1.2rem; line-height: 1; padding: .2rem .3rem; }
.notif-badge { position: absolute; top: -2px; right: -4px; background: var(--coral, #E4572E); color: #fff; font-size: .62rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.notif-panel { position: absolute; right: 0; top: 130%; width: 320px; max-width: 86vw; max-height: 70vh; overflow-y: auto; background: var(--card, #fff); border: 1px solid var(--line, #D8E2E0); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.16); z-index: 50; }
.notif-item { padding: .6rem .8rem; border-bottom: 1px solid var(--line, #eef2f1); cursor: default; }
.notif-item[data-notiflink] { cursor: pointer; }
.notif-item[data-notiflink]:hover { background: var(--light, #f2f7f6); }
.notif-item.unread { border-left: 3px solid var(--teal, #0B5D5A); background: rgba(11,93,90,.05); }
.notif-title { font-size: .82rem; font-weight: 600; }
.notif-body { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.notif-time { font-size: .68rem; color: var(--muted); margin-top: .2rem; }
.notif-empty { padding: 1rem .8rem; font-size: .82rem; }
.notif-foot { padding: .5rem .8rem; text-align: right; }
.notif-foot a { font-size: .76rem; color: var(--teal, #0B5D5A); }

#map { height: 480px; border-radius: var(--radius); border: 1px solid var(--line); margin-top: 1rem; }
.heat-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .75rem; font-size: .82rem; color: var(--muted); }
.heat-legend span::before { content: "●"; margin-right: .3rem; }

.cards { display: grid; gap: .9rem; margin-top: 1rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.card-top { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; flex-wrap: wrap; }
.card h4 { margin: 0; font-family: "Archivo"; font-size: 1.02rem; }
.card .meta { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .55rem; }
.chip {
  font-size: .74rem; font-weight: 600; padding: .18rem .55rem; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal);
}
.chip.urgent { background: var(--coral-soft); color: var(--coral); }
.chip.amber { background: #F6ECD8; color: var(--amber); }
.chip.grey { background: #E9EEED; color: var(--muted); }

.btn {
  font: 600 .85rem "Inter", sans-serif; border-radius: 8px; padding: .5rem .95rem;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, filter var(--dur-fast) ease;
}
.btn:active { transform: scale(0.97); }               /* tactile press feedback */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: brightness(0.97); }             /* touch fires false hovers on tap */
}
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.small { padding: .3rem .7rem; font-size: .78rem; }
.btn.danger { color: var(--coral); border-color: var(--coral-soft); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.form-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem; margin-top: 1rem;
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; }
.form-grid label, .row label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: 400 .9rem "Inter", sans-serif; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink);
}
textarea { min-height: 60px; resize: vertical; }
.form-actions { margin-top: 1rem; display: flex; gap: .6rem; }
.consent { display: flex; align-items: flex-start; gap: .5rem; margin: .75rem 0; font-size: .85rem; color: var(--muted); line-height: 1.35; }
.consent input { margin-top: .2rem; flex: 0 0 auto; }
.map-fallback { width: 100%; }
.map-fallback-note { font-size: .8rem; color: var(--muted); margin-bottom: .4rem; }
.map-fallback svg { border: 1px solid var(--line, #D8E2E0); border-radius: 8px; display: block; }
/* Resource management */
.filter-check { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); }
.rm-level { margin: .5rem 0 .7rem; }
.rm-level-head { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.stockbar { background: var(--line, #E1E8E7); border-radius: 6px; height: 10px; overflow: hidden; }
.stockbar > span { display: block; height: 100%; background: #2B8A3E; transition: width .2s; }
.stockbar.ok > span { background: #2B8A3E; }
.stockbar.warn > span { background: #C88A1D; }
.stockbar.low > span { background: #E4572E; }
.rm-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .75rem; }
.rm-links-group h5 { margin: 0 0 .4rem; font-size: .82rem; color: var(--ink); }
.rm-link { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; padding: .35rem 0; border-top: 1px solid var(--line, #EEF3F2); font-size: .85rem; }
.rm-link-need { flex: 1; min-width: 0; }
.rm-link-meta { display: flex; align-items: center; gap: .3rem; white-space: nowrap; }
.rm-date { color: var(--muted); font-size: .78rem; }
.small { font-size: .82rem; }
@media (max-width: 640px) { .rm-links { grid-template-columns: 1fr; } }
.row { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.num { width: 80px; }
.switch { flex-direction: row !important; align-items: center; gap: .5rem !important; }

.suggestion-box { background: var(--teal-soft); border-radius: 8px; padding: .8rem 1rem; margin-top: .8rem; }
.suggestion-box h5 { margin: 0 0 .4rem; font-family: "Archivo"; }
.suggestion { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .35rem 0; font-size: .85rem; flex-wrap: wrap; }

.dupe-box { background: var(--coral-soft); border-radius: 8px; padding: .8rem 1rem; margin-top: .8rem; }

.thread { background: var(--paper); border-radius: 8px; padding: .75rem; margin-top: .7rem; }
.msg { margin: .3rem 0; font-size: .87rem; }
.msg b { color: var(--teal); }
.thread-input { display: flex; gap: .5rem; margin-top: .5rem; }
.thread-input input { flex: 1; }
.contact-reveal {
  margin-top: .6rem; padding: .55rem .8rem; border-left: 3px solid var(--teal);
  background: var(--teal-soft); font-size: .84rem; border-radius: 0 8px 8px 0;
}

.toast {
  position: fixed; bottom: 1.25rem; left: 50%;
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: .6rem 1.1rem; border-radius: 8px;
  font-size: .87rem; max-width: 90vw; z-index: 2000;
  transition: opacity var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.success { background: #1E7A46; }

@media (max-width: 640px) {
  .topbar { flex-direction: column; gap: .5rem; align-items: flex-start; }
  main { padding: 1rem; }
  #map { height: 340px; }
}

/* ---------- Pilot Edition additions ---------- */
.topbar-right { display: flex; align-items: center; gap: .7rem; }
.lang-toggle {
  background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px; padding: .25rem .55rem; font: 700 .78rem "Inter", sans-serif; cursor: pointer;
}
.whoami { font-size: .82rem; opacity: .9; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn.wide { width: 100%; margin-top: .6rem; }

.auth-wrap { display: flex; justify-content: center; padding: 3rem 1rem; }
.auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; max-width: 620px; width: 100%;
}
.auth-card label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: .6rem; }
.auth-tabs { display: flex; gap: .4rem; margin: 1rem 0 .4rem; border-bottom: 1px solid var(--line); }
.auth-tab { background: none; border: none; padding: .5rem .9rem; font: 600 .9rem "Inter", sans-serif; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.auth-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.small-note { font-size: .74rem; margin-top: .6rem; }

/* ---------- Landing page ---------- */
.landing { max-width: 1080px; margin: 0 auto; padding: 1rem; }
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center;
  padding: 2.5rem 0 2rem;
}
.hero-copy { max-width: 34rem; }
.hero-eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem;
  font-weight: 700; color: var(--teal); background: var(--teal-soft);
  padding: .25rem .6rem; border-radius: 999px; margin: 0 0 1rem;
}
.hero-title {
  font-family: "Archivo", "Inter", sans-serif; font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.1; color: var(--ink); margin: 0 0 1rem;
}
.hero-sub { font-size: 1.05rem; line-height: 1.55; color: var(--muted); margin: 0 0 1.5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1rem; }
.hero-cta .btn { padding: .7rem 1.3rem; font-size: .95rem; }
.hero-note { font-size: .78rem; color: var(--muted); margin: 0; }
.hero .auth-card { box-shadow: 0 12px 40px -18px rgba(11,93,90,.35); }

.land-section { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.land-section > h2 {
  font-family: "Archivo", "Inter", sans-serif; font-size: 1.5rem; color: var(--ink); margin: 0 0 1.5rem;
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step { display: flex; gap: .9rem; align-items: flex-start; }
.step-n {
  flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 999px; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-family: "Archivo", sans-serif;
}
.step h3 { margin: .1rem 0 .3rem; font-size: 1rem; color: var(--ink); }
.step p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.audiences { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.aud-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.aud-card h3 { margin: 0 0 .5rem; color: var(--teal); font-size: 1.1rem; }
.aud-card p { margin: 0; line-height: 1.55; color: var(--muted); }
.land-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center;
  padding: 1.5rem 0; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted);
}
.land-foot a { color: var(--teal); font-weight: 600; text-decoration: none; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; }
  .steps, .audiences { grid-template-columns: 1fr; }
}

/* ---------- Text link button (forgot password) ---------- */
.link-btn {
  background: none; border: none; padding: .3rem 0; margin-top: .5rem; cursor: pointer;
  color: var(--teal); font: 600 .82rem "Inter", sans-serif; text-decoration: underline;
}
.link-btn:hover { color: var(--ink); }

/* ---------- Modal overlay (change password) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(21,34,38,.5); display: grid; place-items: center;
  z-index: 1000; padding: 1rem;
}
.modal-card {
  background: var(--card); border-radius: var(--radius); padding: 1.6rem; width: 100%; max-width: 26rem;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.4);
}
.modal-card h3 { margin: 0 0 .8rem; color: var(--ink); }
.modal-card label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: .7rem; }
.modal-card input { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 7px; font: inherit; background: #fff; color: var(--ink); }
.modal-card input:focus { outline: none; border-color: var(--teal); }
.form-actions { display: flex; gap: .6rem; margin-top: 1.2rem; }

/* ---------- Admin: create-user form ---------- */
.create-user { border: 1px solid var(--line); border-radius: 8px; padding: .4rem .8rem; margin-bottom: 1rem; background: var(--paper); }
.create-user > summary { cursor: pointer; font-weight: 600; color: var(--teal); padding: .4rem 0; }
.create-user-form { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; padding: .6rem 0 .8rem; align-items: end; }
.create-user-form label { display: flex; flex-direction: column; gap: .25rem; font-size: .78rem; font-weight: 600; color: var(--muted); }
.create-user-form input, .create-user-form select { padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 7px; font: inherit; background: #fff; color: var(--ink); }
.create-user-form #cuCreate { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 560px) { .create-user-form { grid-template-columns: 1fr; } }

/* ---------- Account menu (header) ---------- */
.account-wrap { position: relative; }
.account-btn {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff;
  padding: .25rem .6rem .25rem .3rem; border-radius: 999px; font: 600 .84rem "Inter", sans-serif;
  transition: background-color var(--dur-fast) ease;
}
.account-btn:hover { background: rgba(255,255,255,.2); }
.account-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.account-avatar {
  width: 1.55rem; height: 1.55rem; border-radius: 999px; background: #fff; color: var(--teal);
  display: grid; place-items: center; font: 800 .78rem "Archivo", sans-serif; flex: 0 0 auto;
}
.account-caret { font-size: .65rem; opacity: .85; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + .4rem); z-index: 200; min-width: 12.5rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .3rem;
  box-shadow: 0 12px 32px -12px rgba(0,0,0,.35);
}
.account-item {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: .55rem .7rem; border-radius: 7px; font: 500 .85rem "Inter", sans-serif; color: var(--ink);
  transition: background-color var(--dur-fast) ease;
}
.account-item:hover { background: var(--teal-soft); }
.account-item:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.account-item.danger { color: var(--coral); }
.account-item.danger:hover { background: var(--coral-soft); }

/* ---------- Tab bar: scroll affordance ---------- */
.tabs-wrap { position: relative; }
.tabs-wrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 2.5rem; pointer-events: none;
  background: linear-gradient(to right, transparent, var(--teal)); opacity: 0; transition: opacity var(--dur-ui) ease;
}
.tabs-wrap.can-scroll-right::after { opacity: 1; }

/* ---------- Loading skeletons ---------- */
.skeleton-wrap { display: grid; gap: .6rem; padding: .4rem 0; }
.skeleton {
  height: 1rem; border-radius: 6px;
  background: linear-gradient(90deg, var(--line) 25%, #e9f0ef 37%, var(--line) 63%);
  background-size: 400% 100%; animation: nm-shimmer 1.2s ease-in-out infinite;
}
.skeleton.tall { height: 4.5rem; }
.skeleton.w-60 { width: 60%; } .skeleton.w-40 { width: 40%; } .skeleton.w-80 { width: 80%; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin-top: 1rem; }
@keyframes nm-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; margin-top: 1rem; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat-value { font-family: "Archivo"; font-weight: 800; font-size: 1.7rem; color: var(--teal); }
.stat-label { font-size: .82rem; font-weight: 600; color: var(--ink); margin-top: .15rem; }
.stat-sub { font-size: .74rem; color: var(--muted); margin-top: .1rem; }

.event-log { max-height: 260px; overflow-y: auto; }

/* ---------- Comprehensive fix pass additions ---------- */
.btn.outline { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn.outline.danger { color: var(--coral); border-color: var(--coral); }
.chip.danger { background: var(--coral-soft); color: var(--coral); }

.verify-banner {
  background: #F6ECD8; color: var(--amber); text-align: center; padding: .5rem 1rem;
  font-weight: 600; font-size: .85rem; cursor: pointer; border-bottom: 1px solid var(--line);
}
.verify-banner:hover { filter: brightness(0.97); }

.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.filter-bar select { min-width: 140px; }

.report-table { width: 100%; border-collapse: collapse; margin-top: .6rem; font-size: .84rem; }
.report-table th { text-align: left; border-bottom: 2px solid var(--teal); padding: .4rem .6rem; color: var(--teal); }
.report-table td { padding: .35rem .6rem; border-bottom: 1px solid var(--line); }
.report-table tbody tr:hover { background: var(--teal-soft); }

.chart-legend { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); margin-top: .3rem; flex-wrap: wrap; }
.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; margin-top: 1rem; }
.chart-card h3 { font-size: .95rem; }

.report-section { margin-top: 1.4rem; }
.report-section:first-child { margin-top: 0; }

/* ---------- Matches: grouped sections ---------- */
.match-group-title { font-size: 1rem; color: var(--teal); margin: 1.2rem 0 .4rem; display: flex; align-items: center; gap: .5rem; }
.match-group-title:first-child { margin-top: .2rem; }

/* ---------- Admin reference-data editor ---------- */
.rd-group { border: 1px solid var(--line); border-radius: 8px; margin-bottom: .6rem; padding: .2rem .6rem; background: var(--card); }
.rd-group > summary { cursor: pointer; font-weight: 600; padding: .5rem .2rem; color: var(--teal); }
.rd-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.rd-row:last-child { border-bottom: 0; }
.rd-row.rd-new { background: var(--paper); border-radius: 6px; padding: .45rem .5rem; margin-top: .3rem; }
.rd-cat { border-bottom: 2px solid var(--line); padding: .3rem 0 .5rem; }
.rd-subs { margin-left: 1.4rem; }
.rd-sub { border-bottom: 1px dotted var(--line); }
.rd-in { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; min-width: 8rem; flex: 1 1 8rem; background: var(--card); color: var(--ink); }
.rd-in.rd-key { max-width: 8rem; flex: 0 0 auto; }
.rd-in.rd-lat, .rd-in.rd-lon { max-width: 6rem; flex: 0 0 auto; }
.rd-key { font-family: monospace; font-size: .8rem; color: var(--muted); min-width: 6rem; }
.rd-move { display: inline-flex; gap: .15rem; flex: 0 0 auto; }
.rd-move .btn { padding: .2rem .45rem; line-height: 1; }
.rd-chk { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); white-space: nowrap; }

/* ============================================================
   Motion — entrances & feedback. Restrained for a crisp, low-bandwidth
   dashboard; durations short, ease-out, transforms only. Values from the
   animation audit playbook. All movement is dropped under reduced-motion.
   ============================================================ */
@keyframes nm-pop-in  { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes nm-fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes nm-bell-pulse { 0% { transform: scale(1); } 30% { transform: scale(1.18); } 60% { transform: scale(0.96); } 100% { transform: scale(1); } }

/* Notification dropdown scales from its trigger (top-right, under the bell) */
.notif-panel, .account-menu { transform-origin: top right; }
.notif-panel:not(.hidden), .account-menu:not(.hidden) { animation: nm-pop-in var(--dur-ui) var(--ease-out); }

/* Inline forms ease in instead of teleporting; tab panels get a light fade */
.form-card:not(.hidden) { animation: nm-fade-up var(--dur-ui) var(--ease-out); }
.tab-panel:not(.hidden) { animation: nm-fade-up 150ms var(--ease-out); }

/* Card lists: subtle fade with a small, capped stagger (first load & filters) */
.cards > .card { animation: nm-fade-up 200ms var(--ease-out) both; }
.cards > .card:nth-child(2) { animation-delay: 40ms; }
.cards > .card:nth-child(3) { animation-delay: 80ms; }
.cards > .card:nth-child(4) { animation-delay: 120ms; }
.cards > .card:nth-child(5) { animation-delay: 160ms; }
.cards > .card:nth-child(n+6) { animation-delay: 200ms; }

/* One-shot attention when a new notification arrives */
.notif-bell.pulse { animation: nm-bell-pulse 500ms var(--ease-out); }

/* Smooth the previously-instant hover colour changes */
.notif-item, .report-table tbody tr, .alert-chip a, .verify-banner, .tab {
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, filter var(--dur-fast) ease;
}

@media (prefers-reduced-motion: reduce) {
  /* Keep opacity/colour fades that aid comprehension; drop all movement. */
  .btn:active { transform: none; }
  .toast { transition: opacity var(--dur-ui) var(--ease-out); }
  .toast, .toast.show { transform: translate(-50%, 0); }
  .notif-panel:not(.hidden), .account-menu:not(.hidden), .form-card:not(.hidden), .tab-panel:not(.hidden),
  .cards > .card, .notif-bell.pulse, .ben-options:not(.hidden) { animation: none; }
}
