/* =========================================================
   AccelerateMyEdu — Staff portal shared styles
   (loaded on every /portal/ page after ../style.css)
   ========================================================= */

.portal-wrap { max-width: 900px; margin: 0 auto; padding: 32px 24px 80px; }
.portal-view { display: none; }
.portal-view.active { display: block; }

/* Shown while Firebase restores the session (default view on every page) —
   prevents the login form flashing before auth state is known. */
.auth-wait {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 90px 0; color: var(--text-muted); font-size: 0.9rem;
}
.auth-wait .spin {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: pspin .8s linear infinite;
}
@keyframes pspin { to { transform: rotate(360deg); } }

/* ── Login / no-access cards ── */
.login-card {
  max-width: 400px; margin: 60px auto 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}
.login-card h1 { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; text-align: center; }

/* Escape hatch back to the public site. After signing out, the navbar brand
   is the only other way back and does not read as navigation. */
.portal-home {
  display: block; margin-top: 18px; text-align: center;
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
  transition: color .15s;
}
.portal-home:hover { color: var(--accent); }

/* ── Portal navigation ── */
.portal-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.portal-nav a {
  padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  border: 1.5px solid var(--border); color: var(--text-muted); transition: .2s;
}
.portal-nav a:hover { color: var(--text); border-color: var(--ink); }
.portal-nav a.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.portal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.portal-head h1 { font-size: 1.4rem; font-weight: 800; }
.who { font-size: 0.82rem; color: var(--text-muted); }

/* Signed-in identity: avatar (photo or initials) + name */
.whoWrap { display: inline-flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.8rem;
  border: 1.5px solid var(--border); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Panels & list items ── */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
}
.panel > h2 { font-size: 1.02rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel .hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; }

.item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px; background: var(--bg);
}
.item .meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }
.item blockquote { font-size: 0.9rem; font-style: italic; margin: 6px 0 10px; color: var(--text); }
.item .stars-sm { color: var(--gold); letter-spacing: 2px; font-size: 0.82rem; }
.item .row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.item.clickable { cursor: pointer; transition: border-color .2s; }
.item.clickable:hover { border-color: rgba(74,124,255,.4); }
.item h3 { font-size: 0.95rem; font-weight: 700; }
.item .kv { font-size: 0.85rem; color: var(--text); margin: 2px 0; }
.item .kv b { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em; margin-right: 6px; }

/* ── Small buttons & badges ── */
.btn-sm {
  padding: 6px 14px; font-size: 0.8rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
}
.btn-sm.ok  { background: #E9F8EE; border-color: #15803D; color: #15803D; }
.btn-sm.bad { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.4); color: #B91C1C; }
.btn-sm.blue{ background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* Sign out lives in the dark (--ink) navbar, where .btn-sm's ink text and
   ink border are invisible. Repaint it light-on-dark. */
.navbar #signOutBtn {
  border: 1.5px solid #AEB6CB; color: #FFFFFF; background: transparent;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.navbar #signOutBtn:hover {
  background: var(--gold); border-color: #FFFFFF; color: var(--ink);
  transform: translate(-1px, -1px);
}

.badge { font-size: 0.7rem; font-weight: 700; padding: 2px 9px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }
.badge.logged   { background: var(--gold-soft); color: var(--gold-deep); }
.badge.approved { background: #E9F8EE; color: #15803D; }
.badge.dead     { background: var(--surface-2); color: var(--text-muted); }

/* ── Forms ── */
.pform .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pform .form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.pform label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.pform input, .pform select, .pform textarea {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; color: var(--text);
  outline: none; width: 100%;
}
.pform input:focus, .pform select:focus, .pform textarea:focus { border-color: var(--accent); }
.pform textarea { resize: vertical; min-height: 70px; }
.pform .checks { display: flex; flex-wrap: wrap; gap: 10px; }
.pform .checks label {
  display: inline-flex; align-items: center; gap: 6px; text-transform: none;
  letter-spacing: 0; font-size: 0.85rem; color: var(--text);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.pform .checks input { width: auto; }

/* Password show/hide toggle. portal.js injects the wrapper + button into
   any password field, so the five portal pages need no markup changes. */
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; padding-right: 44px; }
.pw-peek {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 6px 8px;
  font-size: 1rem; line-height: 1; border-radius: 6px; opacity: .6;
  transition: opacity .15s, background .15s;
}
.pw-peek:hover { opacity: 1; background: var(--surface-2); }
.pw-peek:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; opacity: 1; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input, .inline-form select {
  flex: 1; min-width: 180px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.9rem; color: var(--text); outline: none;
}
.inline-form select { flex: 0 0 auto; }

.tokrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; }
.tokrow code { background: var(--surface-2); padding: 2px 8px; border-radius: 4px; font-size: 0.78rem; }
.tokrow .used { color: var(--text-muted); }

.msg { font-size: 0.85rem; margin-top: 10px; }
.msg.err { color: #B91C1C; }
.msg.ok  { color: #15803D; }
.empty { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }

/* ── Hub cards (dashboard) ── */
.hub-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hub-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; transition: border-color .2s, transform .2s;
}
.hub-card:hover { border-color: rgba(74,124,255,.4); transform: translateY(-2px); }
.hub-card .icon { font-size: 1.8rem; margin-bottom: 10px; }
.hub-card h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 4px; }
.hub-card p { font-size: 0.82rem; color: var(--text-muted); }
.hub-card .count { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--accent); margin-top: 10px; }

/* ── Summary strip (timesheets) ── */
.sum-strip { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.sum-strip .sum { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 18px; }
.sum-strip .sum b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; color: var(--accent); }
.sum-strip .sum span { font-size: 0.75rem; color: var(--text-muted); }

/* ── Members table (members.html) ──
   Each member is a <details>: the <summary> is the table row, the body
   holds the details + actions. On phones the row shrinks to name/email +
   status, and everything else is one tap away. */
.badge.free { background: var(--accent-soft); color: var(--accent-dark); }
.mem-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mem-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.mem-search {
  flex: 0 1 260px; min-width: 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.85rem; color: var(--text); outline: none;
}
.mem-search:focus { border-color: var(--accent); }
/* Pager (50 members a page): above and below the list. */
.mem-pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.mem-pager[hidden] { display: none; }
#memPagerBottom { margin: 14px 0 0; }
.mem-pager-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.mem-pager .btn-sm:disabled { opacity: .45; cursor: default; }
.mem-pager-info { margin-left: auto; font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mem-group { font-size: 0.9rem; font-weight: 700; margin: 18px 0 8px; }
.mem-group:first-child { margin-top: 0; }
.mem-table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.mem-head, .mem-sum {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 20px 28px minmax(0, 1.2fr) 92px minmax(0, 1.1fr) minmax(0, 1.6fr) 92px 142px 16px;
  padding: 10px 14px;
}
.mem-head {
  background: var(--surface-2); font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.mem-row + .mem-row, .mem-head + .mem-row { border-top: 1px solid var(--border); }
.mem-sum { cursor: pointer; list-style: none; font-size: 0.85rem; }
.mem-sum::-webkit-details-marker { display: none; }
.mem-sum:hover { background: var(--surface); }
.mem-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mem-c { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-name strong { font-weight: 700; }
.mem-sub { display: none; }
.mem-kind, .mem-date, .mem-act { color: var(--text-muted); }
.mem-num { color: var(--text-muted); font-variant-numeric: tabular-nums; text-align: right; }
.mem-date, .mem-act { display: flex; flex-direction: column; }
.mem-time { font-size: 0.75rem; }
.mem-dup { margin-left: 6px; font-size: 0.68rem; vertical-align: middle; }
.mem-status { display: flex; align-items: center; gap: 8px; }
.mem-plan { color: var(--text-muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; }
.mem-caret::before { content: '▸'; color: var(--text-muted); }
.mem-row[open] .mem-caret::before { content: '▾'; }
.mem-row[open] > .mem-sum { background: var(--surface); }
.mem-detail.item { margin: 0; border: none; border-top: 1px dashed var(--border); border-radius: 0; background: var(--surface); padding: 12px 14px 14px; }
.mem-detail .kv { overflow-wrap: anywhere; }
/* Type / Country / School filters and the bulk-delete bar (2026-10-25). */
.mem-facets { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: -4px 0 12px; }
.mem-facets label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.mem-facets select, .mem-facets input[type="date"] {
  max-width: 220px; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 8px; font-family: 'Space Grotesk', sans-serif; font-size: 0.82rem; color: var(--text);
}
.mem-facets select:focus, .mem-facets input[type="date"]:focus { border-color: var(--accent); outline: none; }
/* Sign-ups on one day (2026-11-02). */
.mem-daycount { margin: -4px 0 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 0.85rem; }
.mem-daycount[hidden] { display: none; }
.mem-bulk { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; font-size: 0.85rem; }
.mem-bulk[hidden] { display: none; }
.mem-bulk label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.mem-bulk .btn-sm:disabled { opacity: .45; cursor: default; }
.mem-bulk-msg { font-size: 0.8rem; color: var(--text-muted); }
.mem-pick { display: flex; align-items: center; }
.mem-pick input, .mem-bulk input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.mem-row.picked > .mem-sum { background: var(--accent-soft); }

@media (max-width: 700px) {
  .hub-cards { grid-template-columns: 1fr; }
  .pform .form-row { grid-template-columns: 1fr; }
  .mem-search { flex: 1 1 100%; }
  .mem-head { display: none; }
  .mem-sum { grid-template-columns: 18px 22px minmax(0, 1fr) auto 16px; gap: 10px; padding: 10px 12px; }
  /* A <select> is as wide as its longest option (a long school name), so
     both the label and the select must be allowed to shrink. */
  .mem-facets label { flex: 1 1 100%; min-width: 0; justify-content: space-between; }
  .mem-facets select, .mem-facets input[type="date"] { flex: 1 1 0; width: 0; min-width: 0; max-width: none; }
  .mem-kind, .mem-email, .mem-date, .mem-act, .mem-plan { display: none; }
  .mem-name { display: flex; flex-direction: column; }
  .mem-sub { display: block; font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
}

/* =========================================================
   Admin-dashboard shell (2026-10-31, after TailAdmin)
   body.portal-app is set by portal.js once staff is confirmed:
   sidebar (.p-side) + sticky top bar (.p-top) + content (.p-main).
   The login / no-access views keep the site navbar.
   ========================================================= */
.portal-app {
  --p-side-w: 264px;
  --p-canvas: #F6F3EC;              /* a step off --bg so white cards lift */
  --p-line: var(--border-soft);
  --p-good: #15803D; --p-good-soft: #E9F8EE;
  --p-bad: #B91C1C;  --p-bad-soft: #FDECEC;
  background: var(--p-canvas);
}
.portal-app > .navbar { display: none; }
.portal-app .portal-wrap { max-width: 1240px; padding: 28px 32px 80px; }
.portal-app .portal-nav { display: none; }

.ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Sidebar ── */
.p-side {
  position: fixed; inset: 0 auto 0 0; z-index: 60; width: var(--p-side-w);
  display: flex; flex-direction: column; background: var(--surface);
  border-right: 1px solid var(--p-line); overflow-y: auto;
}
.p-brand { display: flex; align-items: center; gap: 10px; padding: 22px 22px 18px; color: var(--text); }
.p-brand img { width: 34px; height: 34px; }
.p-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.p-brand-text b { font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 1rem; }
.p-brand-text small { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.p-menu { padding: 6px 14px 18px; flex: 1; }
.p-menu-title {
  font-size: 0.68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); margin: 14px 10px 8px;
}
.p-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.p-menu a, .p-side-foot {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600; color: var(--text-muted); transition: background .15s, color .15s;
}
.p-menu a:hover, .p-side-foot:hover { background: var(--surface-2); color: var(--text); }
.p-menu a.active { background: var(--accent-soft); color: var(--accent-dark); }
.p-menu a:focus-visible, .p-side-foot:focus-visible, .p-toggle:focus-visible, .p-top #signOutBtn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.p-side-foot { margin: 0 14px 18px; border: 1px solid var(--p-line); }

/* ── Main column + top bar ── */
.p-main { margin-left: var(--p-side-w); min-height: 100vh; }
.p-top {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px;
  min-height: 68px; padding: 10px 32px; background: var(--surface); border-bottom: 1px solid var(--p-line);
}
.p-toggle {
  display: none; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--p-line); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); cursor: pointer;
}
.p-crumb { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 0.85rem; color: var(--text-muted); }
.p-crumb b { color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-crumb span::after { content: '/'; margin-left: 8px; color: var(--text-muted); }
.p-top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; min-width: 0; }
.p-top .whoWrap { min-width: 0; }
.p-top .who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.p-top .who b { color: var(--text); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-top .who small { font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-top .avatar { width: 40px; height: 40px; }
.p-top #signOutBtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border: 1px solid var(--p-line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
.p-top #signOutBtn:hover { border-color: var(--ink); }
.p-top #signOutBtn .ic { width: 18px; height: 18px; }

/* ── Cards in the shell: white on the canvas, hairline borders ── */
.portal-app .portal-head { margin-bottom: 22px; }
.portal-app .portal-head h1 { font-family: 'Archivo Black', sans-serif; font-weight: 400; font-size: 1.5rem; }
.portal-app .panel { border-color: var(--p-line); border-radius: 14px; }
.portal-app .panel > h2 { font-size: 1.05rem; }

/* Dashboard metric cards (index.html) */
.portal-app .hub-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.portal-app .hub-card {
  display: flex; flex-direction: column; border-color: var(--p-line); border-radius: 14px; padding: 22px; color: var(--text);
}
.portal-app .hub-card:hover { border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--shadow-sm); }
.portal-app .hub-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hub-card .chip {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 12px; background: var(--surface-2); color: var(--ink); margin-bottom: 16px;
}
.hub-card .chip .ic { width: 24px; height: 24px; }
.portal-app .hub-card .count {
  margin: 0 0 4px; font-family: 'Archivo Black', sans-serif; font-weight: 400;
  font-size: 1.45rem; color: var(--text); font-variant-numeric: tabular-nums;
}
.portal-app .hub-card .count small {
  display: block; font-family: 'Space Grotesk', sans-serif; font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
}
.portal-app .hub-card h3 { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; }
.portal-app .hub-card p { font-size: 0.8rem; margin-top: auto; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; }
.dash-cols .panel { margin-bottom: 0; }

/* Stat tiles (income recap and any later KPI row) */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--p-line); border-radius: 12px; padding: 16px 18px; min-width: 0;
}
.stat .lbl { font-size: 0.76rem; font-weight: 600; color: var(--text-muted); }
.stat .val {
  display: block; margin-top: 6px; font-family: 'Archivo Black', sans-serif; font-size: 1.3rem;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.stat .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.76rem; color: var(--text-muted); }
.delta { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border-radius: 999px; font-weight: 700; font-size: 0.72rem; }
.delta.up { background: var(--p-good-soft); color: var(--p-good); }
.delta.down { background: var(--p-bad-soft); color: var(--p-bad); }
.delta.flat { background: var(--surface-2); color: var(--text-muted); }

@media (max-width: 1100px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .p-side { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  .p-side-open .p-side { transform: none; visibility: visible; transition: transform .2s ease; }
  .p-shade { position: fixed; inset: 0; z-index: 55; background: rgba(19, 28, 49, .45); display: none; }
  .p-side-open .p-shade { display: block; }
  .p-main { margin-left: 0; }
  .p-toggle { display: inline-flex; }
  .dash-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .p-side, .p-side-open .p-side { transition: none; } }
@media (max-width: 640px) {
  .portal-app .portal-wrap { padding: 20px 16px 64px; }
  .p-top { padding: 10px 16px; gap: 10px; }
  .p-crumb span, .p-top .who { display: none; }
  .p-top #signOutBtn span { display: none; }
  .portal-app .hub-cards { grid-template-columns: minmax(0, 1fr); }
  .stat-row { gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .val { font-size: 1.05rem; }
}
@media (max-width: 440px) {
  .stat-row { grid-template-columns: minmax(0, 1fr); }
  .stat .val { font-size: 1.2rem; }
}

/* Theme 2026-11-16: the public site is a blue page with white text; the staff
   portal stays a light page with dark text (its views are behind a login and
   full of tables), keeping the new navbar, red buttons and ocean-blue lines. */
body { background-color: var(--bg); color: var(--text);
  background-image: linear-gradient(rgba(14,58,87,0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(14,58,87,0.05) 1px, transparent 1px); }
main h1, main h2, .section-heading h2, .login-card h1 { color: var(--ink); }
.section-heading p { color: var(--text-muted); }
