/* Shared design system for every page in /register.
   One file so the parent flow, the leader dashboard and the staff dashboard
   cannot drift apart visually. */

/* Palette from the ImpACT brand: navy #14213D and orange #F7941D. Rendered
   dark, because this is a working tool people sit in front of for an hour at a
   time, and because the navy is deep enough to be a background rather than an
   accent. The logo files are not in the repo yet — when they land, they go in
   register/img/ and only the header markup changes. */
/* The same two families the marketing site and the trip pages use. Until now
   the portal was system-ui throughout, which is why it looked like a different
   company to the page a family arrived from. Loaded with display=swap so text
   is readable immediately and reflows to the brand face when it lands — a
   portal that shows nothing for 400ms is worse than one that shifts. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #0b1120; --panel: #131c30; --line: #24304a; --sunk: #0a0f1c;
  --ink: #e8ecf6; --dim: #93a0bb; --accent: #F7941D; --navy: #14213D;
  --good: #3fb950; --warn: #d29922; --bad: #f85149;
  --radius: 11px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--body);
}

/* Layout ------------------------------------------------------------------ */
.wrap { max-width: 40rem; margin: 0 auto; padding: 2rem 1.1rem 5rem; }
.wrap--wide { max-width: 76rem; }
/* Bars are layout only. Stickiness comes from wrapping them in .stickytop.

   The leader portal has two bars — the header and the tab strip — and pinning
   the second with a hand-guessed `top: 3.1rem` meant it sat *on top of* the
   first whenever the header grew past that: a narrow window, or a signed-in
   email long enough to wrap. One sticky container holding both keeps them
   stacked at any height, with no magic number to get wrong. */
.bar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .85rem 1.25rem; border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.stickytop { position: sticky; top: 0; z-index: 5; background: var(--bg); }
.stickytop .bar:last-child { border-bottom: 1px solid var(--line); }
.stickytop .bar:not(:last-child) { border-bottom: 1px solid var(--line); }
.bar h1 { font-size: 1rem; margin: 0; font-weight: 600; }
.bar .spacer { flex: 1; }

/* Staff previewing a family or teacher portal. Deliberately the loudest thing
   on the page and inside .stickytop, so it cannot scroll away and leave
   somebody convinced they are looking at their own account. */
.previewbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .6rem 1.25rem; font-size: .87rem;
  background: var(--accent); color: var(--navy);
  border-bottom: 1px solid var(--accent);
}
.previewbar button.link { color: var(--navy); font-weight: 600; text-decoration: underline; }
header.centered { text-align: center; margin-bottom: 2rem; }
header.centered h1 { font-size: 1.3rem; margin: 0 0 .2rem; letter-spacing: -.01em; }
header.centered p { margin: 0; color: var(--dim); font-size: .92rem; }
main { max-width: 76rem; margin: 0 auto; padding: 1.5rem 1.25rem 5rem; }

h2 { font-size: 1.05rem; margin: 1.8rem 0 .5rem; font-weight: 600; }
h2:first-child { margin-top: 0; }
.sub, p.hint { color: var(--dim); font-size: .89rem; margin: .1rem 0 1rem; }
.muted { color: var(--dim); }
.bad { color: var(--bad); } .good { color: var(--good); } .warn { color: var(--warn); }

.card, .panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem;
}
.grid { display: grid; gap: 1rem; }
@media (min-width: 60rem) { .grid--2 { grid-template-columns: 1fr 1fr; } }

/* Stats ------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.stat b { display: block; font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.stat span { color: var(--dim); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }

/* Forms ------------------------------------------------------------------- */
label { display: block; margin: .7rem 0 .2rem; font-size: .82rem; color: var(--dim); }
input, select, textarea {
  width: 100%; padding: .55rem .65rem; background: var(--sunk); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
textarea { min-height: 4.5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* The rule above sets width:100% for every input, which is right for text and
   wrong for a checkbox — a full-width checkbox stretches into a bar and shoves
   its label around. Every checkbox in the app was overriding it inline with
   style="width:auto"; the one on the agreement was not, which is why that
   screen looked broken. Fixed here so it cannot happen again. */
input[type=checkbox], input[type=radio] {
  width: auto; accent-color: var(--accent);
}

/* A consent control. Big enough to hit on a phone, and the text set as text
   rather than as a form label — label styling is small and dim, which is the
   wrong register for the sentence where somebody accepts a contract. */
.agree {
  display: flex; gap: .75rem; align-items: flex-start; cursor: pointer;
  background: var(--sunk); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .95rem 1.05rem; margin: .2rem 0 1.1rem;
}
.agree:hover { border-color: var(--accent); }
.agree input[type=checkbox] {
  width: 1.2rem; height: 1.2rem; flex: none; margin: .12rem 0 0; cursor: pointer;
}
.agree > span {
  color: var(--ink); font-size: .95rem; line-height: 1.55;
}
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0 1rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
@media (max-width: 30rem) { .two { grid-template-columns: 1fr; } }

button {
  padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--line);
  background: #212734; color: var(--ink); font: inherit; cursor: pointer;
}
button:hover { background: #2a3140; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--navy); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.wide { width: 100%; }
button.small { padding: .28rem .55rem; font-size: .82rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }
.link { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* Tables ------------------------------------------------------------------ */
table { width: 100%; border-collapse: collapse; font-size: .89rem; }
th, td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable:hover { background: #1b2029; cursor: pointer; }
tr.due td { color: var(--warn); }
.table-wrap { overflow-x: auto; }

/* Bits -------------------------------------------------------------------- */
.pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .71rem; border: 1px solid var(--line); }
.pill--open, .pill--active, .pill--paid { color: var(--good); border-color: #1c4227; }
.pill--draft { color: var(--dim); }
.pill--closed, .pill--scheduled { color: var(--warn); border-color: #4a3a12; }
.pill--cancelled, .pill--overdue { color: var(--bad); border-color: #4a1c19; }
.pill--due { color: var(--warn); border-color: #4a3a12; }
.pill--upcoming { color: var(--dim); }

/* A form, and whether it is done -------------------------------------------
   A tick or a cross against each line, because the question a parent actually
   has is "is there anything left for me to do" and a list of links does not
   answer it. Upcoming gets a dash rather than a cross: nothing is wrong with
   a form that has not opened yet, and marking it failed is how a checklist
   becomes something people stop reading. */
.chk { list-style: none; margin: .5rem 0 0; padding: 0; }
.chk li { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem 0; border-top: 1px solid var(--line); }
.chk li:first-child { border-top: none; }
.chk .mark {
  flex: none; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; margin-top: .1rem;
}
.chk .mark--yes  { background: #14331f; color: var(--good); }
.chk .mark--no   { background: #33191a; color: var(--bad); }
.chk .mark--wait { background: var(--panel); color: var(--dim); }
.chk .why { color: var(--dim); font-size: .85rem; display: block; margin-top: .12rem; }
.chk .grow { flex: 1; min-width: 0; }

/* Itinerary ---------------------------------------------------------------- */
.itin-day { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.itin-day:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.itin-row { display: grid; grid-template-columns: 9rem 1fr; gap: .7rem; padding: .55rem 0; }
@media (max-width: 34rem) { .itin-row { grid-template-columns: 1fr; gap: .1rem; } }
.itin-row .when { color: var(--accent); font-size: .8rem; font-weight: 600; }

/* Built from --accent rather than a hand-picked hex. The old #23200f/#4a3a12
   pair was a dark olive that read as brown against the navy, which is not a
   color in the brand at all — the tint below is the same orange as every other
   accent on the page, just at ten percent. */
.note {
  background: rgba(247, 148, 29, .10);
  border: 1px solid rgba(247, 148, 29, .38);
  color: #f7d6ac;
  border-radius: 8px; padding: .7rem .85rem; font-size: .85rem; margin: .8rem 0;
}
.note strong, .note b { color: var(--accent); }
.note--info { background: #0f1d2b; border-color: #1d3a55; color: #bcd8f2; }

/* Side navigation ---------------------------------------------------------
   The staff portal outgrew a row of pills at about ten sections. A column
   holds seventeen without scrolling, and — the actual reason — it can carry
   headings, so the list is read in groups rather than scanned as a wall. */
.shell { display: grid; grid-template-columns: 14.5rem 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 60rem) { .shell { grid-template-columns: 1fr; gap: .8rem; } }

.sidenav {
  display: flex; flex-direction: column;
  /* Sticky alone meant the menu was pinned but as tall as its contents, so
     reaching the last form required scrolling the CONTENT down first — the two
     panes were welded together and the wrong one moved. A fixed height
     separates them; the scrolling happens in .sidenav__scroll, so that Sign out
     below it stays on screen rather than needing the menu scrolled to its end. */
  position: sticky; top: 1rem;
  max-height: calc(100vh - 2rem);
}
.sidenav__scroll {
  display: flex; flex-direction: column; gap: .1rem;
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;   /* stop the page taking over at the ends */
  padding-right: .2rem;
}
.sidenav__scroll::-webkit-scrollbar { width: 6px; }
.sidenav__scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
@media (max-width: 60rem) {
  /* Sticky is wrong on a phone: it would pin a tall menu over the content, and
     a menu with its own scrollbar inside a scrolling page is worse still. */
  .sidenav { position: static; max-height: none; }
  .sidenav__scroll { overflow: visible; min-height: auto; }

  /* Twenty-odd items, each form its own line, is a screen and a half of menu
     before the content starts. On a phone it collapses behind the toggle and
     closes again the moment something is chosen. */
  .sidenav { display: none; }
  .sidenav.is-open { display: flex; }
  .navtoggle { display: inline-flex !important; }
}

.navtoggle {
  display: none; align-items: center; gap: .45rem;
  background: none; border: 1px solid var(--line); color: var(--ink);
  border-radius: 8px; padding: .35rem .6rem; font-size: .85rem; cursor: pointer;
}



/* Orange and bold. These are the only orange text on the page apart from the
   active marker, which is the point — the eye lands on the headings first and
   reads the group, rather than scanning seventeen items of equal weight. */
.sidenav__group {
  color: var(--accent); font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 1rem .6rem .3rem;
}
.sidenav__group:first-child { padding-top: .2rem; }

.sidenav__item {
  display: block; width: 100%; text-align: left;
  background: none; border: 1px solid transparent; text-decoration: none;
  color: var(--dim); padding: .45rem .6rem; border-radius: 8px;
  font-size: .88rem; cursor: pointer;
}

/* Separates the two pinned items at the foot of the family portal — "add
   another traveler" and "sign out" — from the sections above them. A blank
   .sidenav__group was doing this job and rendered an empty orange heading. */
/* Outside the scrolling list and therefore always on screen. flex:none stops it
   being squeezed to nothing when the menu is taller than the viewport. */
.sidenav__foot {
  flex: none; margin-top: .9rem; padding-top: .6rem;
  border-top: 1px solid var(--line); background: var(--bg);
}
.sidenav__item:hover { background: var(--panel); color: var(--ink); }
.sidenav__item.is-on {
  background: var(--panel); color: var(--ink); font-weight: 600;
  border-color: var(--line);
  /* The active marker is a bar rather than a fill: at this size a solid
     orange block shouts louder than the content it points at. */
  box-shadow: inset 3px 0 0 var(--accent);
}

/* A form in the menu. Laid out as a row so the mark, the label and a chevron
   sit together — a bare tick beside text reads as decoration, and the whole
   point is that these are the things you click. */
.sidenav__item--form {
  display: flex; align-items: flex-start; gap: .6rem;
  line-height: 1.4;
}
.sidenav__item--form .grow { flex: 1; min-width: 0; }
.sidenav__item--form::after {
  content: '›'; color: var(--line); font-size: .95rem; line-height: 1.4;
}
.sidenav__item--form:hover::after { color: var(--accent); }
.sidenav__item--form:hover .grow > span:first-child { text-decoration: underline; }

/* Circled, so it reads as a status marker rather than a stray character —
   but small, and no border. At this size a ring around a filled dot is two
   outlines a few pixels apart, which is what made it look heavy and crowd the
   label. Fill alone carries the color; margin-top sits it on the first line
   rather than above it. */
.sidenav__item .navmark {
  flex: none; display: inline-grid; place-items: center;
  width: .95rem; height: .95rem; border-radius: 50%;
  font-size: .56rem; font-weight: 700; line-height: 1;
  /* Centred on the first line of the label, not sitting above it:
     (label line 1.4 × .88rem = 1.232rem − mark .95rem) ÷ 2 ≈ .14rem. */
  margin-top: .14rem;
  border: 0;
}
.sidenav__item .navmark--yes  { color: #7fd6a0; background: #1b3a28; }
.sidenav__item .navmark--no   { color: #f2a7a3; background: #46201f; }
.sidenav__item .navmark--wait { color: var(--dim);  background: #262c38; }
/* On its own line, always. Inline it fitted on short labels and wrapped on
   long ones, so every other row was a different height — which is what made
   the list look untidy rather than the words themselves. */
.sidenav__item .req { display: block; color: var(--dim); font-size: .72rem; }
.sidenav__item .flag {
  display: block; font-size: .72rem; margin-top: .1rem; color: var(--warn);
}
.sidenav__item .flag--bad { color: var(--bad); }

/* "Add another traveler" is not a menu row, it is the thing a parent with a
   second child is looking for. */
.sidenav__cta {
  display: block; text-align: left; text-decoration: none;
  margin: .45rem 0 .2rem; padding: .5rem .6rem; border-radius: 8px;
  border: 1px dashed var(--accent); color: var(--accent);
  font-size: .85rem; font-weight: 600; background: none; cursor: pointer;
}
.sidenav__cta:hover { background: var(--panel); }
.err { color: var(--bad); font-size: .87rem; margin-top: .55rem; }
.total { display: flex; justify-content: space-between; align-items: baseline;
         padding: .85rem 0 .2rem; border-top: 1px solid var(--line); margin-top: .5rem; }
.total b { font-size: 1.35rem; letter-spacing: -.02em; }
code { background: var(--sunk); padding: .1em .4em; border-radius: 4px; font-size: .92em; }

.steps { display: flex; gap: .35rem; margin-bottom: 1.2rem; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--accent); }

/* Occupancy picker — the price is the decision, so it is the loudest thing */
.occ { display: grid; gap: .5rem; margin-top: .3rem; }
.occ label {
  display: flex; align-items: center; gap: .7rem; margin: 0;
  border: 1px solid var(--line); border-radius: 9px; padding: .75rem .85rem;
  cursor: pointer; color: var(--ink); font-size: .94rem;
}
.occ label:has(input:checked) { border-color: var(--accent); background: #16233150; }
.occ input { width: auto; margin: 0; accent-color: var(--accent); }
.occ .price { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.occ small { display: block; color: var(--dim); font-size: .77rem; }

.waiver {
  max-height: 15rem; overflow-y: auto; border: 1px solid var(--line);
  border-radius: 8px; padding: .9rem; background: var(--sunk); font-size: .87rem;
}
.waiver h2 { font-size: .95rem; margin-top: .6rem; }

/* Rooming ----------------------------------------------------------------- */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; }
.room { border: 1px solid var(--line); border-radius: 9px; padding: .7rem .8rem; background: var(--sunk); }
.room h3 { margin: 0 0 .1rem; font-size: .92rem; }
.room .cap { color: var(--dim); font-size: .76rem; }
.room ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .25rem; }
.room li { display: flex; align-items: center; gap: .4rem; font-size: .85rem; }
.room li .x { margin-left: auto; }
.room.over { border-color: var(--bad); }

/* Toasts ------------------------------------------------------------------ */
#toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 20; }
.toast { background: #212734; border: 1px solid var(--line); border-left: 3px solid var(--accent);
         padding: .6rem .9rem; border-radius: 8px; max-width: 28rem; transition: opacity .5s; font-size: .88rem; }
.toast--error { border-left-color: var(--bad); }
.toast--ok { border-left-color: var(--good); }
.toast--out { opacity: 0; }

/* Branding -----------------------------------------------------------------
   The lockup, and the typographic fallback used until register/img/ has the
   real files. Both occupy the same space, so nothing reflows when the real
   artwork lands. */
.brand { display: inline-flex; align-items: baseline; gap: .55rem; line-height: 1; }
/* Sized by height so the aspect ratio comes from the file, not from here.
   The full lockup is wide (3.34:1), so it needs more height than a square mark
   before it reads as a logo rather than a strip. */
.brand__img { height: 2.5rem; width: auto; display: block; }
.brand--compact .brand__img { height: 1.7rem; }
.brand__name {
  font-weight: 700; letter-spacing: -.02em; font-size: 1.35rem; color: var(--ink);
}
.brand__name::first-letter { color: var(--ink); }
.brand__rule {
  color: var(--accent); font-size: .62rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; white-space: nowrap;
}
.bar .brand { margin-right: .3rem; }
.bar .brand__name { font-size: 1rem; }
header.centered .brand, header:not(.bar) .brand { justify-content: center; }

/* Checklists --------------------------------------------------------------
   The staged-requirements list from db/015. Four states, and the visual weight
   is deliberately ordered: overdue shouts, upcoming whispers. A parent
   registering fourteen months out should be able to see at a glance that the
   grayed-out rows are not their problem yet. */
.check { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .45rem; }
.check li {
  display: flex; align-items: flex-start; gap: .65rem;
  border: 1px solid var(--line); border-radius: 9px;
  padding: .65rem .8rem; background: var(--sunk);
}
.check li .mark { flex: none; width: 1.15rem; text-align: center; font-size: .95rem; }
.check li .what { flex: 1; min-width: 0; }
.check li .what b { display: block; font-weight: 500; font-size: .92rem; }
.check li .what small { color: var(--dim); font-size: .79rem; display: block; margin-top: .12rem; }
.check li.is-complete { opacity: .62; }
.check li.is-complete .mark { color: var(--good); }
.check li.is-overdue { border-color: #4a1c19; background: #1c1012; }
.check li.is-overdue .mark { color: var(--bad); }
.check li.is-due .mark { color: var(--warn); }
.check li.is-upcoming { opacity: .45; }
.check li .go { flex: none; align-self: center; }

/* Drag-and-drop boards ----------------------------------------------------
   Used for chaperone groups. Dragging is the fast path; every action is also
   reachable by clicking, because drag-and-drop is unusable on a phone and a
   group leader is frequently on one. */
.dnd { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.bin {
  border: 1px solid var(--line); border-radius: 9px; background: var(--sunk);
  padding: .7rem .8rem; min-height: 6rem; transition: border-color .12s, background .12s;
}
.bin.over { border-color: var(--accent); background: #1a2438; }
.bin h3 { margin: 0; font-size: .92rem; display: flex; align-items: center; gap: .4rem; }
.bin h3 .count { color: var(--dim); font-size: .76rem; font-weight: 400; margin-left: auto; }
.bin .lead { color: var(--accent); font-size: .78rem; margin: .15rem 0 .4rem; }
.bin ul { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .3rem; }
.chip {
  display: flex; align-items: center; gap: .4rem; font-size: .85rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 7px;
  padding: .3rem .5rem; cursor: grab;
}
.chip:active { cursor: grabbing; }
.chip.dragging { opacity: .4; }
.chip .tag { font-size: .68rem; color: var(--dim); }
.chip .x { margin-left: auto; }

/* Adults are gold, everywhere they appear. A leader glancing at a board of
   forty names has to be able to see who the grown-ups are without reading, and
   the same colour is used for the chaperone leading a group, an adult waiting
   to be given one, and an adult sitting inside somebody else's group — which
   is a thing worth noticing. */
.chip--adult {
  border-color: var(--accent); color: var(--accent);
  background: #F7941D14;
}
.chip--adult .tag { color: var(--accent); opacity: .85; }
.bin--led { border-color: #3d3218; }
.bin--led h3 { color: var(--accent); }
.bin .lead { color: var(--accent); font-size: .78rem; margin: .15rem 0 .4rem; font-weight: 500; }
.bin .lead--none { color: var(--warn); font-weight: 400; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--dim); margin-top: .5rem; }
.legend b { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .35rem; }

/* Document list ----------------------------------------------------------- */
.docs { display: grid; gap: .5rem; margin-top: .5rem; }
.doc {
  display: flex; align-items: center; gap: .7rem;
  border: 1px solid var(--line); border-radius: 9px; padding: .7rem .85rem;
  background: var(--sunk);
}
.doc .who { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
            color: var(--dim); border: 1px solid var(--line);
            border-radius: 999px; padding: .05rem .45rem; }
.doc.signed { opacity: .6; }
.doc .t { flex: 1; min-width: 0; }
.doc .t b { display: block; font-weight: 500; font-size: .92rem; }
.doc .t small { color: var(--dim); font-size: .78rem; }

/* Toasts raised while a modal is open live inside it — see toast() in app.js.
   A modal renders in the top layer, so anything appended to #toasts is drawn
   behind the backdrop and never seen. */
.toasts--modal {
  position: sticky; bottom: -1.25rem; margin: .9rem -1.25rem -1.25rem;
  padding: .75rem 1.25rem; display: grid; gap: .5rem;
  background: linear-gradient(to bottom, transparent, var(--panel) 35%);
}
.toasts--modal .toast { max-width: none; }

.gate { max-width: 24rem; margin: 5rem auto; text-align: center; }
dialog {
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem; max-width: 46rem; width: 92%;
}
dialog::backdrop { background: rgba(0,0,0,.62); }

/* ===========================================================================
   Dashboard furniture
   ===========================================================================
   Lifted in spirit from the NoVAPA staff portal: a banner, a tip strip, a
   greeting that says where you are, a row of numbers, then panels with a
   header and a way out of them. ImpACT's navy and orange throughout, and the
   brand faces rather than system-ui — the portal used to look like a different
   company to the page a family arrived from.

   All of it lives here rather than in one page, because three portals sharing
   a look is the only reason a shared stylesheet exists. */

/* The banner. Gold on deep navy, display face, and no more than two lines —
   it is a masthead, not a hero, and everything below it is the actual work. */
.banner {
  background: linear-gradient(135deg, #0d1730 0%, #14213D 55%, #1b2a4d 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.25rem; margin-bottom: 1rem; text-align: center;
}
.banner h2 {
  font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  color: var(--accent); margin: 0; letter-spacing: -.01em;
}
.banner p {
  margin: .35rem 0 0; color: rgba(232,236,246,.72);
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}

/* The tip strip. One sentence, and it has to earn its place — a box that says
   something obvious every day is a box people stop seeing. */
.tipbar {
  display: flex; gap: .85rem; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: .9rem 1.05rem; margin-bottom: 1.2rem;
}
.tipbar .ico { flex: none; font-size: 1rem; line-height: 1.35; }
.tipbar .lbl {
  display: block; color: var(--accent); font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: .2rem;
}
.tipbar p { margin: 0; font-size: .95rem; }

/* The greeting: who you are, where you are, and the one thing you probably
   came to do, on the right where a button belongs. */
.greet { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.greet__text { flex: 1; min-width: 14rem; }
.greet h2 {
  font-family: var(--display); font-weight: 600; font-size: 1.5rem;
  margin: 0; color: var(--ink); letter-spacing: -.01em;
}
.greet__meta { margin: .2rem 0 0; color: var(--dim); font-size: .92rem; }

/* The numbers. Existing .stats/.stat, dressed to match: a small dim label, a
   large figure, and a line under it saying what the figure is OF — a number
   without a denominator is a number nobody can act on. */
.stat b { font-family: var(--display); font-weight: 600; color: var(--accent); }
/* The staff portal already colors these figures semantically with .bad,
   .good and .warn. The rule above is a class-plus-element selector and those
   are bare classes, so it wins — without these three, every red "payments
   stuck" figure would have quietly turned orange and stopped meaning
   anything. */
.stat b.bad  { color: var(--bad); }
.stat b.good { color: var(--good); }
.stat b.warn { color: var(--warn); }
.stat b.is-good { color: var(--good); }
.stat b.is-bad  { color: var(--bad); }
.stat b.is-calm { color: var(--ink); }
.stat .of { display: block; color: var(--dim); font-size: .8rem; margin-top: .3rem;
            text-transform: none; letter-spacing: 0; }

/* A panel with a title and a way onward. */
.panel__head {
  display: flex; align-items: center; gap: 1rem;
  margin: -.15rem 0 .9rem;
}
.panel__head h2 { margin: 0; flex: 1; font-size: 1.02rem; }
.panel__head .go {
  background: none; border: none; color: var(--accent); cursor: pointer;
  font: inherit; font-size: .88rem; padding: 0;
}
.panel__head .go:hover { text-decoration: underline; }

/* Two panels side by side on a wide screen, stacked on a narrow one. */
/* My details: the account holder's photo beside their name. Not .duo — that is
   a 1.45fr/1fr reading layout and would give a 64px avatar half the card. */
.whorow { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line); flex: none; display: block;
}
.avatar--empty {
  display: grid; place-items: center; background: var(--sunk);
  color: var(--dim); font-weight: 600; font-size: 1.35rem; letter-spacing: .02em;
}

.duo { display: grid; grid-template-columns: 1.45fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 62rem) { .duo { grid-template-columns: 1fr; } }

/* Headings inside cards pick up the display face too, so the portal reads as
   one thing rather than a stylesheet with a banner bolted on. */
.card h2, .panel h2, .gate h1, .bar h1 { font-family: var(--display); font-weight: 600; }

/* The countdown, beside the masthead. It is the single number a family checks
   this portal for between paying and packing. */
.banner__row { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.banner__count {
  font-family: var(--body); font-weight: 700; font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--navy); background: var(--accent);
  border-radius: 999px; padding: .3rem .8rem; white-space: nowrap;
}
.banner__count--soon { background: #ffd88a; }
.banner__count--home { background: rgba(232,236,246,.16); color: var(--ink); }

/* Departure day. Fires once, the first time the portal is opened on or after
   the day they leave, and never again — a celebration that repeats is
   decoration, and decoration in a payments portal is noise.

   Pure CSS pieces rather than a confetti library: one animation, no
   dependency, and it cannot fail in a way that blocks the page. */
.party { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.party i {
  position: absolute; top: -5vh; width: .55rem; height: .9rem; opacity: 0;
  animation: fall linear forwards;
}
@keyframes fall {
  0%   { opacity: 1; transform: translateY(-10vh) rotate(0deg); }
  100% { opacity: 0; transform: translateY(105vh) rotate(720deg); }
}
@media (prefers-reduced-motion: reduce) {
  /* Somebody who has asked their machine to stop moving things has asked for
     a reason. They still get the message, just still. */
  .party { display: none; }
}
.party__note {
  position: fixed; left: 50%; top: 18%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 1.1rem 1.5rem; text-align: center; z-index: 61; pointer-events: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); max-width: 90vw;
}
.party__note h2 { font-family: var(--display); color: var(--accent); margin: 0 0 .2rem; }
.party__note p { margin: 0; color: var(--dim); font-size: .92rem; }

/* The eye on a password field. The input keeps its own styling; the button
   sits inside its right edge, and the padding stops long passwords running
   underneath it. */
.reveal-wrap { position: relative; }
.reveal-wrap input { padding-right: 2.6rem; }
.reveal {
  position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: .25rem .4rem; cursor: pointer;
  font-size: 1rem; line-height: 1; opacity: .75;
}
.reveal:hover { background: none; opacity: 1; }
