/* Site shell. Phone first. Helvetica/Arial per the spec, dark green and cream from the report, and
   one bit of character: the striped cart awning under the header. No external resources. */
:root { --green: #1E5B52; --green-dark: #164740; --cream: #F5EFE2; --wood: #C08A55; --red: #B3261E; --red-bg: #FBE9E7;
  --amber-bg: #FFF4D6; --amber-ink: #6B4A00; --ink: #1F2A27; --muted: #5F6460; --line: #DAD8D0; --paper: #FFFFFF;
  color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: Helvetica, Arial, sans-serif; margin: 0; color: var(--ink); background: var(--paper); line-height: 1.4; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--wood); outline-offset: 2px; }

.test-banner { background: var(--red); color: #fff; text-align: center; font-weight: 700; padding: .35rem .75rem; }
.top { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; justify-content: space-between; padding: .6rem 1rem; background: var(--green); color: #fff; }
.brand { color: #fff; font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.who { display: flex; flex-wrap: wrap; gap: .1rem .9rem; align-items: center; font-size: .9rem; }
.who a { color: #fff; }
.who-name { opacity: .85; }
.link-on-dark { background: none; border: 0; color: #fff; font: inherit; min-height: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.awning { height: 10px; background: repeating-linear-gradient(90deg, var(--green-dark) 0 22px, var(--cream) 22px 44px); border-bottom: 1px solid var(--line); }

.site-nav { display: flex; gap: .15rem; overflow-x: auto; padding: .35rem .6rem; border-bottom: 1px solid var(--line); background: var(--paper); scrollbar-width: thin; }
.site-nav a { flex: 0 0 auto; padding: .55rem .7rem; color: var(--ink); text-decoration: none; font-size: .95rem; border-radius: 4px; }
.site-nav a:hover { background: var(--cream); }
.site-nav a[aria-current="page"] { background: var(--green); color: #fff; }

.page { padding: 1rem; max-width: 62rem; margin: 0 auto; }
.page.narrow { max-width: 34rem; }
.page.wide { max-width: 50rem; }
h1 { color: var(--green); font-size: 1.6rem; line-height: 1.15; margin: .4rem 0 .6rem; }
h2 { color: var(--green); font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.lead { color: var(--muted); margin: 0 0 1rem; max-width: 60ch; }
.muted { color: var(--muted); font-size: .9rem; }

.notice, .warn, .error { padding: .55rem .75rem; margin: .6rem 0; border-left: 4px solid; }
.notice { background: var(--cream); border-color: var(--wood); }
.warn { background: var(--amber-bg); color: var(--amber-ink); border-color: #D9A400; }
.error { background: var(--red-bg); color: #7E1A14; border-color: var(--red); }
.warn-inline { color: var(--amber-ink); background: var(--amber-bg); font-size: .85rem; padding: .05rem .35rem; }

/* Controls: big enough for a thumb, 16px text so phones do not zoom. */
label { display: block; font-size: .95rem; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select {
  display: block; width: 100%; min-height: 44px; margin-top: .2rem; padding: .45rem .55rem; font: inherit; font-size: 1rem;
  border: 1px solid #9A9C94; border-radius: 4px; background: #fff; color: var(--ink); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--green); }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .45rem .85rem; font: inherit; font-size: .95rem;
  background: #fff; color: var(--green); border: 1px solid var(--green); border-radius: 4px; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--cream); }
.primary, button.primary { background: var(--green); color: #fff; font-weight: 700; }
.primary:hover, button.primary:hover { background: var(--green-dark); }
button.danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
button.danger:hover { background: #8E1D17; }

.inline { display: inline; }
.stack-form { display: grid; gap: .8rem; }
.stack-form > button { justify-self: start; }
.row-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin: .5rem 0; }
.row-form label { flex: 1 1 10rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pair.wide-first { grid-template-columns: 2fr 1fr; }
fieldset { border: 1px solid var(--line); border-radius: 4px; margin: 0; padding: .5rem .75rem .7rem; }
legend { font-size: .95rem; padding: 0 .3rem; }
.choice label { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; margin-right: 1rem; }
.addons label { display: flex; margin-right: 0; }
.line { border-bottom: 1px solid var(--line); padding: .4rem 0; }
.line:last-child { border-bottom: 0; }
summary { cursor: pointer; min-height: 32px; font-weight: 700; }

.dropzone { border: 2px dashed var(--wood); border-radius: 6px; background: var(--cream); padding: 1.1rem; text-align: center; font-weight: 700; }
.dropzone input { display: block; width: 100%; margin-top: .6rem; font-weight: 400; }

.panel { border: 1px solid var(--line); border-radius: 6px; padding: .75rem; margin: 1rem 0; }
.panel > h2:first-child { margin-top: 0; }
.plain { list-style: none; margin: .3rem 0; padding: 0; }
.plain li { padding: .25rem 0; }
.warnings li { border-bottom: 1px solid var(--line); padding: .4rem 0; font-size: .95rem; }
.tag { display: inline-block; border: 1px solid #9A9C94; border-radius: 3px; font-size: .78rem; padding: 0 .35rem; white-space: nowrap; }
.tag.ok { border-color: var(--green); background: #E3F1EA; color: var(--green-dark); }
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* The Sunday ledger: the date leads each row, figures follow. */
.sunday-rows { list-style: none; margin: .4rem 0; padding: 0; border-top: 2px solid var(--green); }
.sunday-rows li { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.sunday-date { grid-column: 1 / -1; font-size: 1.1rem; font-weight: 700; }
.figure { font-variant-numeric: tabular-nums; }
.figure-label { display: block; color: var(--muted); font-size: .8rem; }
.is-short .amount, .is-short .amount .figure-label { color: var(--red); font-weight: 700; }
.warn-inline { grid-column: 1 / -1; justify-self: start; }
.compact li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; }
.compact .sunday-date { min-width: 8rem; font-size: 1rem; }

.quick-picks { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-bottom: 1rem; }
.month-pick { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-end; flex: 1 1 100%; }
.month-pick label { flex: 0 0 100%; }
.month-pick select { width: auto; flex: 1 1 8rem; margin-top: 0; }
.check-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--green); }
.check-list > li { border-bottom: 1px solid var(--line); padding: .25rem 0; }
.check-list label { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; min-height: 44px; cursor: pointer; }
.check-list .sunday-date { font-size: 1rem; font-weight: 400; }
.cards > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .7rem; }
.card-label { font-weight: 700; min-width: 8rem; }
.sticky-actions { position: sticky; bottom: 0; background: var(--paper); padding: .6rem 0; border-top: 1px solid var(--line); margin-top: .5rem; }

.shift-list { list-style: none; margin: .2rem 0 .8rem; padding: 0; border-top: 1px solid var(--line); }
.shift-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.shift-date { flex: 1 1 100%; font-weight: 700; }
.shift-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.shift-note { flex: 1 1 100%; }
.shift-list .row-actions { flex: 1 1 100%; }
.day-group h3 { margin-top: 1rem; }
.past-shifts { margin-top: 1.5rem; }
.correct { flex: 1 1 100%; font-size: .9rem; }
.correct summary { font-weight: 400; }

/* Required, no dismiss: it stands apart from everything else on the worker's page. */
.attendance-card { background: var(--cream); border: 2px solid var(--wood); border-radius: 6px; padding: .9rem; margin: .4rem 0 1rem; }
.attendance-card h2 { margin: 0 0 .3rem; }
.attendance-card p { margin: 0 0 .5rem; }

.account-list { list-style: none; margin: .6rem 0; padding: 0; border-top: 2px solid var(--green); }
.account-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.account-name { font-weight: 700; }
.account-list .row-actions { flex: 1 1 100%; }
.is-off { opacity: .65; }
.temp-password { font-family: Consolas, Menlo, monospace; font-size: 1.25rem; background: var(--cream); padding: .75rem; overflow-wrap: anywhere; }

.cost-rows { list-style: none; margin: .3rem 0; padding: 0; border-top: 2px solid var(--green); }
.cost-rows li { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .6rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.cost-name { grid-column: 1 / -1; font-weight: 700; }
.cost-rows label { font-size: .85rem; }

.filter-form { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-items: end; margin-bottom: .6rem; }
.filter-form label:first-of-type:nth-last-of-type(3) { grid-column: 1 / -1; }

.data { border-collapse: collapse; width: 100%; font-size: .92rem; }
.data th { background: var(--green); color: #fff; text-align: left; padding: .4rem .5rem; }
.data td { border-bottom: 1px solid var(--line); padding: .4rem .5rem; vertical-align: top; }
.data .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.data .when { white-space: nowrap; }
.row-link { display: inline-block; margin-left: .3rem; font-size: .85rem; }
.report-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }

@media (max-width: 599px) {
  .data.stack thead { display: none; }
  .data.stack, .data.stack tbody, .data.stack tr, .data.stack td { display: block; width: 100%; }
  .data.stack tr { border-bottom: 2px solid var(--line); padding: .4rem 0; }
  .data.stack td { border: 0; display: flex; justify-content: space-between; gap: .9rem; padding: .15rem 0; text-align: right; white-space: normal; }
  .data.stack td::before { content: attr(data-label); color: var(--muted); text-align: left; flex: 0 0 auto; }
  .data.stack td.row-actions { justify-content: flex-end; }
  .data.stack td:empty { display: none; }
  /* A donation is several short facts: keep each one to about four lines on a phone. */
  .tips-table.stack tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .15rem .5rem; padding: .55rem 0; }
  .tips-table.stack td { display: block; padding: 0; text-align: left; white-space: normal; }
  .tips-table.stack td::before { display: block; font-size: .72rem; }
  .tips-table.stack td.wide { grid-column: 1 / -1; }
  .tips-table.stack td.two { grid-column: span 2; }
}

@media (min-width: 600px) {
  .sunday-rows li:not(.compact li) { grid-template-columns: 11rem repeat(4, 1fr); align-items: baseline; }
  .sunday-date { grid-column: auto; }
  .warn-inline { grid-column: 2 / -1; }
  .shift-date { flex: 0 0 auto; }
  .shift-list .row-actions, .account-list .row-actions { flex: 0 0 auto; margin-left: auto; }
  .cost-rows li { grid-template-columns: 2fr 1fr 1fr 1fr; align-items: end; }
  .cost-name { grid-column: auto; align-self: center; }
  .filter-form { grid-template-columns: 2fr 1fr 1fr auto; }
  .filter-form label:first-of-type:nth-last-of-type(3) { grid-column: auto; }
  .month-pick { flex: 0 1 auto; }
  .month-pick label { flex: 0 0 auto; align-self: center; }
}
