/* Pet Project Foundation — volunteer scheduling
   Brand palette pulled from petprojectfoundation.org:
   navy #14446C, dark #083860, light accent #CCE8F4, neutral grays. */

:root {
  --navy: #14446c;
  --navy-dark: #083860;
  --navy-900: #0a2338;
  --accent: #cce8f4;
  --accent-strong: #7fc4e6;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e3e8ee;
  --bg: #f4f7fa;
  --card: #ffffff;
  --ok: #2e7d55;
  --ok-bg: #e6f4ec;
  --warn: #b45309;
  --warn-bg: #fdf1e3;
  --danger: #b3261e;
  --danger-bg: #fbe9e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 35, 56, .06), 0 8px 24px rgba(10, 35, 56, .06);
  --font-body: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Roboto Slab", Georgia, serif;
  /* The palette is light-only. Declaring it stops mobile browsers in dark mode
     from giving unstyled controls (file inputs, checkboxes, date/time pickers)
     dark chrome against our forced-white fields. */
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy-900); margin: 0 0 .4em; }
a { color: var(--navy); }

/* ---------- Layout ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--accent-strong);
}
.site-header .bar {
  max-width: 1180px; margin: 0 auto; padding: .6rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
  /* .nav-panel anchors to this box on mobile (position:absolute, top:100%) so
     the dropdown spans the header's full width regardless of .nav's own
     (much narrower, hamburger-only) box. */
  position: relative;
}
.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.brand img { height: 46px; width: auto; background: #fff; padding: 6px 10px; border-radius: 10px; }
.brand .title { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; line-height: 1.1; }
.brand .title small { display: block; font-family: var(--font-body); font-weight: 400; opacity: .8; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
/* ── Header nav ── */
/* .nav is just a row holding the (mobile-only) hamburger toggle and the
   panel; the panel carries the layout .nav used to have directly, so that
   collapsing it on mobile doesn't disturb the desktop flex column below. */
.nav {
  display: flex; align-items: center; gap: .3rem;
  margin-left: auto; min-width: 0;
}
.nav-panel {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 0; min-width: 0;
}
/* Hamburger toggle — hidden on desktop; shown only under the mobile query. */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  background: none; border: none; border-radius: 8px; cursor: pointer; padding: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,.14); }
.nav-toggle-icon { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 22px; height: 16px; }
.nav-toggle-icon span {
  display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px;
  transition: transform .15s ease, opacity .15s ease;
}
/* Animate the bars into an X while the panel is open. */
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* nav-main: one flex row — scrollable links + static right section */
.nav-main {
  display: flex; align-items: center;
}
/* Links wrap rather than scroll. A hidden-scrollbar strip silently swallowed
   whole nav items (Reports/Availability were unreachable at 375px) with no
   affordance that anything was there. Wrapping keeps every item reachable;
   .nav-user sits on its own row so Sign out never moves. */
.nav-links {
  display: flex; align-items: center; gap: .15rem;
  flex-wrap: wrap; justify-content: flex-end; row-gap: .1rem;
  min-width: 0;
}
/* nav-static: Coordinate dropdown + Admin — never scroll, never clip */
.nav-static {
  display: flex; align-items: center; gap: .15rem; flex-shrink: 0;
}
.nav-user {
  display: flex; align-items: center; gap: .5rem;
  padding-top: .1rem; justify-content: flex-end;
}
.nav a {
  color: #fff; text-decoration: none; padding: .38rem .72rem; border-radius: 999px;
  font-size: .88rem; opacity: .92; white-space: nowrap; flex-shrink: 0;
}
.nav a:hover, .nav a.active { background: rgba(255,255,255,.16); opacity: 1; }
.nav .who { opacity: .75; font-size: .8rem; white-space: nowrap; }

/* Sign-out icon button — replaces a text label everywhere (mobile + desktop)
   so it reads as a distinct, compact action next to the volunteer's name. */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; min-width: 44px; min-height: 44px;
  padding: 0; border-radius: 999px; border: 1px solid transparent;
  background: #fff; color: var(--navy); cursor: pointer;
  transition: filter .12s ease;
}
.icon-btn:hover { filter: brightness(.96); }
.icon-btn svg { width: 18px; height: 18px; display: block; }

/* Coordinate dropdown — click-toggled via JS, lives in nav-static (no overflow clip) */
.nav-dropdown { position: relative; }
.nav-drop-btn {
  background: none; border: none; cursor: pointer;
  color: #fff; padding: .38rem .72rem; border-radius: 999px;
  font-size: .88rem; opacity: .92; font-family: inherit; white-space: nowrap;
}
.nav-drop-btn:hover { background: rgba(255,255,255,.16); opacity: 1; }
.nav-drop-menu {
  display: none; position: absolute; right: 0; top: calc(100% + .4rem);
  background: var(--navy-dark); border-radius: 8px; min-width: 180px;
  box-shadow: 0 6px 20px rgba(0,0,0,.4); z-index: 200; overflow: hidden;
}
.nav-drop-menu.open { display: block; }
.nav-drop-menu a {
  display: block; border-radius: 0; padding: .6rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08); font-size: .88rem;
}
.nav-drop-menu a:last-child { border-bottom: none; }

.main { max-width: 1180px; margin: 1.6rem auto; padding: 0 1.25rem; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head p { color: var(--muted); margin: .15rem 0 0; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .card-body { padding: 1.1rem 1.25rem; }
.grid { display: grid; gap: 1.1rem; }
@media (min-width: 780px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .9rem;
  padding: .5rem .95rem; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; transition: filter .12s ease, background .12s ease;
}
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--accent); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: #f0c5c0; }
.btn-danger:hover { filter: brightness(.98); }
.btn-sm { padding: .32rem .7rem; font-size: .82rem; }

/* ---------- Schedule grid ---------- */
.week { display: grid; gap: .85rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .week { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .week { grid-template-columns: repeat(3, 1fr); } }

.day { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; box-shadow: var(--shadow); }
.day.is-today { outline: 2px solid var(--accent-strong); }
.day-head { padding: .55rem .85rem; background: var(--navy-900); color: #fff; display: flex; justify-content: space-between; align-items: baseline; }
.day-head .dow { font-family: var(--font-head); font-size: 1rem; }
.day-head .date { opacity: .75; font-size: .82rem; }
.day-body { padding: .7rem .85rem; display: grid; gap: .7rem; }

.shift { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; }
.shift.cancelled { background: repeating-linear-gradient(45deg,#faf1f0,#faf1f0 8px,#fff 8px,#fff 16px); }
.shift-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .45rem; }
.shift-label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.shift-label .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-strong); }
.shift-time { color: var(--muted); font-size: .82rem; }
.shift-oneoff { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); background: var(--warn-bg); padding: .12rem .45rem; border-radius: 999px; }

/* qualification groups — names grouped within their qualification + slot count */
.qgroups { display: grid; gap: .5rem; margin-bottom: .55rem; }
.qgroup { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qgroup.full { opacity: .85; }
.qgroup-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .3rem .55rem; background: var(--accent); color: var(--navy-dark);
  font-size: .82rem; font-weight: 700;
}
.qgroup.full .qgroup-head { background: #eef1f4; color: var(--muted); }
.qgroup-head .qcount { font-variant-numeric: tabular-nums; }
.qdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .4rem; vertical-align: middle; }
.qmembers { list-style: none; margin: 0; padding: .3rem .55rem; display: grid; gap: .25rem; }
.qmembers li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .85rem; }
.qmembers li.me { font-weight: 700; color: var(--navy); }
.qmembers .slot-open { color: var(--muted); font-style: italic; font-size: .78rem; }
.qmembers .tag { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--navy-dark); background: var(--accent); border: 1px solid #b9dcee; padding: .02rem .35rem; border-radius: 999px; }
/* Touch-friendly remove: text label, comfortable tap target. */
.btn-x { border: 1px solid transparent; background: transparent; color: var(--danger); cursor: pointer; font-size: .78rem; font-weight: 600; line-height: 1; padding: .4rem .6rem; border-radius: 8px; min-height: 32px; }
.btn-x:hover { background: var(--danger-bg); border-color: #f0c5c0; }
.member-actions { display: inline-flex; align-items: center; gap: .25rem; flex: 0 0 auto; }

/* "Away this week" banner — travel blocks overlapping the viewed week,
   surfaced at the top of the coordinate page ahead of the day-by-day grid. */
.away-banner { border-color: #f0d6ad; }
.away-banner .card-body { background: var(--warn-bg); border-radius: var(--radius); }
.away-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.away-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; font-size: .88rem; }
.away-name { font-weight: 700; color: var(--navy-900); }
.away-dates { color: var(--warn); font-weight: 600; font-size: .82rem; white-space: nowrap; }
.away-note { color: var(--muted); font-size: .82rem; font-style: italic; }

/* Secondary 'end recurring' follow-up banner. */
.recur-banner { margin-bottom: 1.1rem; border-color: var(--accent-strong); }
.recur-banner .card-body { background: var(--accent); border-radius: var(--radius); }
.recur-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.recur-actions .btn { min-height: 44px; }

/* Consolidated horizontal week grid (paper-schedule style). */
/* max-height makes this a real vertical scroll container, which is what the
   sticky day header below needs — with height unconstrained the page scrolled
   instead and `position: sticky` on the header never engaged. */
.week-scroll {
  overflow: auto; max-height: 78vh;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
  overscroll-behavior: contain;
}
.week-grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; font-size: .82rem; }
.week-grid th, .week-grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
/* z-index must beat .rowhead (1) so the header wins where they cross. */
.week-grid thead th { background: var(--navy-900); color: #fff; padding: .5rem .6rem; text-align: left; position: sticky; top: 0; z-index: 3; }
.week-grid thead th.is-today { background: var(--navy); }
.week-grid thead .dow { font-family: var(--font-head); display: block; }
.week-grid thead .date { opacity: .75; font-size: .74rem; }
/* The corner is sticky on both axes (top: 0 comes from the thead rule above),
   so it has to sit above the header row (3) and the row headers (1). */
.week-grid .corner { background: var(--navy-900); position: sticky; left: 0; z-index: 4; }
.week-grid .rowhead { background: var(--accent); color: var(--navy-900); font-weight: 700; padding: .5rem .6rem; white-space: nowrap; position: sticky; left: 0; z-index: 1; }
.week-grid .rowhead .rowtime { display: block; font-weight: 400; color: var(--navy-dark); font-size: .72rem; }
.week-grid td { padding: .45rem .55rem; min-width: 130px; }
.week-grid td.mine { background: #f0f7fb; box-shadow: inset 3px 0 0 var(--accent-strong); }
.week-grid td.cancelled { background: repeating-linear-gradient(45deg,#faf1f0,#faf1f0 8px,#fff 8px,#fff 16px); }
.gname { font-weight: 600; line-height: 1.35; }
.gname em { font-weight: 400; color: var(--muted); font-style: normal; }
.gopen {
  display: inline-block; font-size: .72rem; font-weight: 600;
  border: 1px dashed currentColor; border-radius: 6px;
  padding: .12rem .4rem; margin: .12rem .12rem 0 0;
  background: rgba(255,255,255,.5);
}
.cell-empty { color: var(--line); }
.cell-actions { margin-top: .35rem; }
.btn-cell { font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; border-radius: 999px; padding: .25rem .6rem; border: 1px solid transparent; min-height: 30px; }
.btn-cell.join { background: var(--navy); color: #fff; }
.btn-cell.leave { background: var(--danger-bg); color: var(--danger); border-color: #f0c5c0; }

@media (max-width: 640px) {
  .week-grid td { min-width: 120px; }
}

/* Co-workers shown on upcoming shifts. */
.coworkers { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; font-size: .8rem; }
.cw-label { color: var(--muted); }
.cw-name { background: var(--accent); color: var(--navy-dark); border: 1px solid #b9dcee; border-radius: 999px; padding: .05rem .5rem; }
.cw-open { margin-left: auto; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: .05rem .5rem; font-weight: 600; }

.assign-block { padding: 0 .55rem .5rem; }
.assign-block .assign-row { padding: 0; margin: 0 0 .3rem; }
.chk { display: flex; align-items: center; gap: .35rem; font-size: .74rem; color: var(--muted); font-weight: 400; }
.chk input { width: auto; }

.pill { font-size: .72rem; padding: .12rem .5rem; border-radius: 999px; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-full { background: #eef1f4; color: var(--muted); }
.pill-cancel { background: var(--danger-bg); color: var(--danger); }

/* ---------- Messages ---------- */
.messages { max-width: 1180px; margin: 1rem auto 0; padding: 0 1.25rem; display: grid; gap: .5rem; }
.alert { padding: .7rem 1rem; border-radius: 10px; border: 1px solid; font-size: .9rem; }
.alert-success { background: var(--ok-bg); border-color: #bfe3cd; color: var(--ok); }
.alert-error, .alert-danger { background: var(--danger-bg); border-color: #f0c5c0; color: var(--danger); }
.alert-info { background: var(--accent); border-color: #b9dcee; color: var(--navy-dark); }
.alert-warning { background: var(--warn-bg); border-color: #f0d6ad; color: var(--warn); }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .92rem; }
.form-row .help { color: var(--muted); font-size: .82rem; margin-top: .2rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time],
input[type=number], select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-strong); border-color: var(--accent-strong); }
.errorlist { color: var(--danger); font-size: .82rem; list-style: none; padding: 0; margin: .3rem 0 0; }

.auth-wrap { max-width: 420px; margin: 3rem auto; }
.auth-wrap .card-body { padding: 1.6rem; }
.center-narrow { max-width: 720px; margin: 0 auto; }

.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.badge-count { background: var(--accent-strong); color: var(--navy-900); border-radius: 999px; padding: .05rem .5rem; font-size: .75rem; font-weight: 700; }
.section-title { display: flex; align-items: center; gap: .6rem; margin: 1.6rem 0 .8rem; }
.section-title h2 { margin: 0; }
.muted { color: var(--muted); }
.stack > * + * { margin-top: .6rem; }
.inline-form { display: inline; }
.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 2rem 1rem; }

/* ---------- Reports ---------- */
.report-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.report-table th, .report-table td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); }
.report-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.report-table tfoot th { border-top: 2px solid var(--line); border-bottom: none; }
.report-table .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; }
.month-bars { display: grid; gap: .3rem; }
.mb-row { display: grid; grid-template-columns: 2.5rem 1fr 2.8rem; align-items: center; gap: .5rem; font-size: .82rem; text-decoration: none; color: inherit; padding: .15rem .3rem; border-radius: 8px; }
a.mb-row:hover { background: var(--accent); }
a.mb-row.active { background: var(--accent); outline: 1px solid var(--accent-strong); }
.mb-label { color: var(--muted); }
.mb-track { background: #eef2f6; border-radius: 999px; height: 12px; overflow: hidden; }
.mb-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-strong), var(--navy)); border-radius: 999px; min-width: 2px; }
.mb-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }

.assign-row { display: flex; gap: .4rem; margin: 0; padding: 0 .55rem .5rem; }
.assign-row select { flex: 1; min-width: 0; padding: .35rem .5rem; font-size: .82rem; }
details > summary::-webkit-details-marker { display: none; }
details > summary { display: inline-flex; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .site-header .bar { gap: .5rem .9rem; padding: .6rem .9rem; }
  .brand img { height: 38px; }
  .brand .title { font-size: .95rem; }
  .brand .title small { display: none; }

  /* Hamburger menu: the toggle sits inline next to the brand; the actual
     nav content drops down as a full-width panel below the header instead
     of competing for space in the header row. */
  .nav-toggle { display: inline-flex; }
  .nav-panel {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--navy-dark); padding: .75rem .9rem 1rem;
    box-shadow: 0 12px 28px rgba(0,0,0,.35);
    z-index: 150; max-height: calc(100vh - 60px); overflow-y: auto;
  }
  .nav-panel.open { display: flex; }
  .nav-main { width: 100%; flex-direction: column; align-items: stretch; row-gap: .15rem; }
  .nav-links {
    flex-direction: column; align-items: stretch;
    justify-content: flex-start; row-gap: .1rem;
  }
  .nav-static {
    flex-direction: column; align-items: stretch; row-gap: .1rem;
    margin-top: .3rem; padding-top: .4rem;
    border-top: 1px solid rgba(255,255,255,.14);
  }
  .nav a { padding: .6rem .65rem; font-size: .92rem; border-radius: 8px; }
  .nav-drop-btn { width: 100%; text-align: left; padding: .6rem .65rem; font-size: .92rem; border-radius: 8px; }
  /* The submenu expands inline within the panel rather than floating —
     floating a second absolutely-positioned box inside one that's already
     absolute/full-width invites overlap and z-index fights. */
  .nav-drop-menu {
    position: static; box-shadow: none; min-width: 0;
    margin: .15rem 0 .2rem .5rem; background: rgba(0,0,0,.18);
  }
  .nav-user {
    width: 100%; justify-content: space-between;
    margin-top: .5rem; padding-top: .5rem;
    border-top: 1px solid rgba(255,255,255,.14);
  }

  .main { margin: 1rem auto; padding: 0 .9rem; }
  .page-head { flex-direction: column; align-items: stretch; gap: .6rem; }
  .page-head h1 { font-size: 1.5rem; }
  .page-head > div:last-child { display: flex; flex-wrap: wrap; }

  .grid.cols-2 { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .messages { padding: 0 .9rem; }

  /* Larger touch targets — WCAG 2.5.8 / Apple HIG want ~44px. .btn-x and
     .btn-cell are the primary actions on the coordinate and schedule pages
     and were measuring 32px and 30px tall. */
  .btn { padding: .6rem 1rem; min-height: 44px; }
  .btn-sm { padding: .45rem .8rem; min-height: 40px; }
  .btn-x { min-height: 44px; padding: .55rem .7rem; }
  .btn-cell { min-height: 44px; padding: .5rem .8rem; }
  .roster li { flex-wrap: wrap; }
  /* Long single-word names shouldn't spill out of the 2-column roster. */
  .roster-members li { overflow-wrap: anywhere; }
}

@media (max-width: 380px) {
  .buckets { gap: .25rem; }
  .bucket { font-size: .72rem; padding: .18rem .4rem; }
}

/* Coordinator page: roster + message history sections */
.coord-section {
  margin-top: 2rem;
}
.section-head {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .8rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .8rem;
}
.roster-group {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  padding: .6rem .75rem;
}
.roster-qhead {
  font-size: .82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-bottom: .35rem;
}
.roster-members {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .82rem;
  line-height: 1.65;
}
/* Wrapper scrolls the table instead of letting it widen the page — the
   column-hiding query below only fires at ≤600px, so 601–760px could push
   the whole document into horizontal scroll. */
.msg-log-scroll { overflow-x: auto; }
.msg-log {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.msg-log th, .msg-log td {
  padding: .45rem .6rem;
  text-align: left;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.msg-log th {
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #666;
}
@media (max-width: 600px) {
  .roster-grid { grid-template-columns: 1fr 1fr; }
  .msg-log th:nth-child(n+4), .msg-log td:nth-child(n+4) { display: none; }
}
