/* Beenleigh Brass Band members app. Palette and type follow the public site (brass gold + maroon on cream/ink). */
:root {
  --ink: #15161a; --ink-2: #202229;
  --brass: #c9a03c; --brass-2: #e6c86b; --brass-soft: #f6ecd2;
  --maroon: #8a1e2a; --maroon-2: #a52836; --maroon-soft: #f7e3e5;
  --cream: #faf6ee; --white: #fff; --text: #24262b; --muted: #646873; --line: #e6e0d4;
  --green: #1f6b3a; --green-soft: #e1f2e6; --amber: #8a5a00; --amber-soft: #fff1cc; --grey-soft: #eceef1;
  --radius: 16px; --radius-sm: 10px; --max: 1040px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow: 0 10px 30px -20px rgba(21, 22, 26, .45);
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--text); background: var(--cream); }
img { max-width: 100%; height: auto; }
a { color: var(--maroon); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 1.7rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- Shell ---------- */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.app-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; background: rgba(250, 246, 238, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1rem; }
.brand img { border-radius: 8px; }
.me-link { margin-left: auto; display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); min-height: 44px; }
.me-name { display: none; font-weight: 600; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--maroon); color: #fff; font-weight: 700; font-size: .85rem; }
.app-main { flex: 1; width: min(var(--max), 100%); margin: 0 auto; padding: 1rem 1rem calc(var(--nav-h) + 1.5rem); }
.app-nav-side { display: none; }
.app-nav-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--nav-h); font-size: .75rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.nav-item svg { width: 24px; height: 24px; }
.nav-item.active { color: var(--maroon); }
@media (min-width: 900px) {
  .app-nav-bottom { display: none; }
  .app-nav-side { display: flex; gap: .25rem; margin-left: 1.5rem; }
  .app-nav-side .nav-item { flex-direction: row; gap: .5rem; padding: 0 .9rem; min-height: 44px; border-radius: 999px; font-size: .95rem; }
  .app-nav-side .nav-item.active { background: var(--maroon-soft); }
  .me-name { display: inline; }
  .app-main { padding: 1.5rem 1.5rem 3rem; }
  h1 { font-size: 2rem; }
}

/* ---------- Auth ---------- */
.auth-shell { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem 1rem; background: linear-gradient(180deg, var(--cream), #f1e9d8); }
.auth-card { width: min(440px, 100%); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem 1.5rem; }
.auth-brand { text-align: center; margin-bottom: 1.25rem; }
.auth-brand img { border-radius: 14px; }
.auth-title { font-weight: 800; font-size: 1.2rem; color: var(--ink); margin-top: .5rem; }
.auth-sub { color: var(--muted); font-size: .9rem; }

/* ---------- Banners, boot, errors ---------- */
.banner { padding: .65rem 1rem; font-size: .95rem; display: flex; gap: .75rem; align-items: center; justify-content: center; text-align: center; }
.banner[hidden] { display: none; } /* an author display rule beats the UA [hidden] rule, so restate it */
#blazor-error-detail { margin: .5rem 0 0; padding: .5rem .75rem; max-height: 9rem; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: .75rem; line-height: 1.35; background: rgba(0, 0, 0, .06); border-radius: 6px; text-align: left; }
#blazor-error-detail[hidden] { display: none; }
.banner.offline { background: var(--amber-soft); color: var(--amber); border-bottom: 1px solid #efd68a; }
.banner.update { position: sticky; top: 0; z-index: 40; background: var(--ink); color: #fff; }
.boot { display: grid; place-items: center; min-height: 100dvh; text-align: center; color: var(--muted); }
.loading { display: flex; align-items: center; gap: .75rem; color: var(--muted); padding: 1.5rem 0; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--maroon); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { background: var(--maroon-soft); border: 1px solid #e9c3c8; color: var(--maroon); border-radius: var(--radius-sm); padding: .9rem 1rem; margin: 1rem 0; }
.error-box p { margin: 0 0 .5rem; }
.field-error { color: var(--maroon); font-size: .88rem; margin: .25rem 0 0; }
.notice { border-radius: var(--radius-sm); padding: .8rem 1rem; margin: 0 0 1rem; font-size: .95rem; border: 1px solid transparent; }
.notice.warn { background: var(--amber-soft); border-color: #efd68a; color: var(--amber); }
.notice.info { background: var(--brass-soft); border-color: #e7d6a4; color: #5a4a12; }
.notice.ok { background: var(--green-soft); border-color: #bfe1c9; color: var(--green); }
.notice.bad { background: var(--maroon-soft); border-color: #e9c3c8; color: var(--maroon); }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; background: #fff3cd; color: #5a4a12; padding: .8rem 1rem; box-shadow: 0 -2px 10px rgba(0,0,0,.15); }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .8rem; }

/* ---------- Page bits ---------- */
.page { display: grid; gap: 1rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1rem; }
.page-head h1 { margin-bottom: .2rem; }
.eyebrow { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--maroon); margin-bottom: .3rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem; }
.card h2 { margin-bottom: .6rem; }
.card + .card { margin-top: 0; }
.card.highlight { border-color: var(--brass); box-shadow: var(--shadow); }
.stack { display: grid; gap: .75rem; }
.row { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.between { justify-content: space-between; }
.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; font-size: .97rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; }
.empty { color: var(--muted); padding: 1.25rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .75rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 999px; border: 2px solid transparent; font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; background: var(--grey-soft); color: var(--ink); transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brass); border-color: var(--brass); }
.btn-primary:hover { background: var(--brass-2); border-color: var(--brass-2); }
.btn-maroon { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.btn-maroon:hover { background: var(--maroon-2); }
.btn-outline { background: transparent; border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-danger { background: transparent; border-color: var(--maroon); color: var(--maroon); }
.btn-small { min-height: 36px; padding: .35rem .85rem; font-size: .85rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: .4rem 0; color: var(--maroon); font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }

/* ---------- RSVP ---------- */
.rsvp-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.rsvp-btn { min-height: 56px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: var(--white); font: 700 1rem var(--font); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; }
.rsvp-btn small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.rsvp-btn:disabled { opacity: .5; cursor: not-allowed; }
.rsvp-btn.going.selected { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.rsvp-btn.not-going.selected { background: var(--maroon-soft); border-color: var(--maroon); color: var(--maroon); }
.rsvp-btn.unsure.selected { background: var(--amber-soft); border-color: #d9a400; color: var(--amber); }
.rsvp-status { margin-top: .6rem; font-size: .93rem; color: var(--muted); }
.rsvp-note textarea { width: 100%; min-height: 70px; }

/* ---------- Pills, badges ---------- */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; background: var(--grey-soft); color: var(--muted); }
.pill.status-going { background: var(--green-soft); color: var(--green); }
.pill.status-not-going { background: var(--maroon-soft); color: var(--maroon); }
.pill.status-unsure { background: var(--amber-soft); color: var(--amber); }
.pill.status-none { background: var(--grey-soft); color: var(--muted); border: 1px dashed #c7cbd3; }
.pill.type { background: var(--brass-soft); color: #5a4a12; }
.pill.draft { background: var(--grey-soft); color: var(--ink); }
.pill.cancelled { background: var(--ink); color: #fff; }
.pill.review { background: var(--amber-soft); color: var(--amber); }
.readiness { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.readiness::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.readiness.met { background: var(--green-soft); color: var(--green); }
.readiness.short { background: var(--maroon-soft); color: var(--maroon); }
.readiness.needs { background: var(--amber-soft); color: var(--amber); }
.readiness.cancelled { background: var(--ink); color: #fff; }

/* ---------- Lists ---------- */
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.event-row { display: grid; grid-template-columns: 58px 1fr auto; gap: .8rem; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .8rem; text-decoration: none; color: inherit; min-height: 64px; }
.event-row:hover { border-color: var(--brass); }
.event-row.past { opacity: .75; }
.date-block { text-align: center; line-height: 1.05; }
.date-block .dow { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--maroon); }
.date-block .day { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.date-block .mon { font-size: .72rem; color: var(--muted); }
.event-row .title { font-weight: 700; color: var(--ink); }
.event-row .meta { font-size: .88rem; color: var(--muted); }
.event-row .side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.month-head { margin: 1rem 0 .4rem; font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { min-height: 38px; padding: .3rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font: 600 .88rem var(--font); cursor: pointer; color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.person { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .2rem; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person .name { font-weight: 600; }
.person .sub { font-size: .85rem; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.coverage { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.coverage th, table.coverage td { padding: .5rem .5rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.coverage th:first-child, table.coverage td:first-child { text-align: left; }
table.coverage th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table.coverage td.short { color: var(--maroon); font-weight: 800; }
table.coverage td.met { color: var(--green); font-weight: 700; }
table.coverage td.unset { color: var(--muted); }
table.coverage tfoot td { font-weight: 700; }
table.plain { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.plain th, table.plain td { padding: .5rem .4rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }

/* ---------- Forms ---------- */
.form { display: grid; gap: .9rem; }
.form label, .field label, .form-2 > label { font-weight: 600; font-size: .92rem; display: grid; gap: .3rem; }
.form input, .form select, .form textarea, .form-2 input, .form-2 select, .form-2 textarea, .field input, .field select, .field textarea, input.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1.5px solid #cfd3da; border-radius: var(--radius-sm); font: inherit; background: var(--white); color: var(--text);
}
.form textarea, .field textarea { min-height: 96px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid rgba(201, 160, 60, .5); border-color: var(--brass); }
.form .hint, .hint { font-size: .85rem; color: var(--muted); font-weight: 400; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; min-height: 44px; }
.check input, .form-2 .check input { width: 22px; height: 22px; min-height: 0; }
.form-2 textarea { min-height: 96px; resize: vertical; }
.form-2 { display: grid; gap: .9rem; }
@media (min-width: 600px) { .form-2 { grid-template-columns: 1fr 1fr; } .form-2 .span { grid-column: 1 / -1; } }
details.panel { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); padding: .3rem .9rem; }
.repeat { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--cream, #faf6ee); padding: .8rem .9rem; }
.repeat .chips { margin: .4rem 0; }
.repeat .hint { margin: .4rem 0; }
details.panel summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.num { width: 5.5rem; text-align: right; }

/* ---------- Finance ---------- */
.subnav { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: .25rem; -webkit-overflow-scrolling: touch; }
.subnav-item { white-space: nowrap; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-weight: 600; font-size: .88rem; color: var(--ink); text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; }
.subnav-item.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--maroon); }
.stat-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; }
.stat .label { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat .value { font-size: 1.35rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat a { text-decoration: none; }
table.plain tr.matched td { color: var(--muted); }
table.plain tr.total td { font-weight: 800; border-top: 2px solid var(--ink); }
.recon { display: grid; gap: .3rem; grid-template-columns: 1fr auto; max-width: 460px; }
.recon .diff { font-weight: 800; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem 0; }
.inline-form .input { width: auto; flex: 1 1 180px; min-width: 150px; }
.copy { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--grey-soft); padding: .15rem .45rem; border-radius: 6px; }
@media print {
  .app-header, .app-nav-bottom, .subnav, .no-print, #update-banner { display: none !important; }
  .app-main { padding: 0; }
  .card { border: 0; padding: 0; }
  body { background: #fff; font-size: 12px; }
}
