:root {
  --brand: #10526d;
  --brand-dark: #0a3a4e;
  --brand-tint: #e8f1f5;
  --ink: #1d2b33;
  --muted: #5b6b74;
  --line: #d6e0e6;
  --bg: #f6f9fa;
  --danger: #a32121;
}
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-block: 2rem 3rem; }
.wrap { width: min(1100px, 100% - 2rem); margin-inline: auto; }
a { color: var(--brand); }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; margin: 0 0 .75rem; color: var(--brand-dark); }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; color: var(--brand-dark); }
.sr { position: absolute; left: -9999px; }

.site-header { background: #fff; border-bottom: 3px solid var(--brand); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .6rem; flex-wrap: wrap; }
.brand img { height: 52px; display: block; }
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { text-decoration: none; font-weight: 600; color: var(--brand-dark); padding: .35rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a:focus-visible { border-color: var(--brand); }
.site-footer { background: var(--brand-dark); color: #d6e6ee; padding-block: 1.25rem; font-size: .9rem; }

.hero { background: var(--brand); color: #fff; border-radius: 12px; padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3.5rem); }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); }
.hero p { max-width: 38rem; font-size: 1.1rem; }
.hero .btn { background: #fff; color: var(--brand-dark); }
.hero .btn-ghost { background: transparent; color: #fff; border-color: #fff; }

.btn { display: inline-block; background: var(--brand); color: #fff; border: 2px solid var(--brand); border-radius: 999px; padding: .5rem 1.25rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.hero .btn:hover { background: var(--brand-tint); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-dark); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.page-head .count { font-size: 1rem; font-weight: 600; background: var(--brand-tint); color: var(--brand-dark); border-radius: 999px; padding: .1rem .7rem; vertical-align: middle; }
.actions { display: flex; gap: .5rem; align-items: center; }
.actions form { margin: 0; }
.crumb { margin: 0 0 1rem; }

.search { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.search input { flex: 1 1 16rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=search], textarea {
  width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid #aebdc5; border-radius: 8px; background: #fff; color: var(--ink);
}
textarea { resize: vertical; }

.table-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
table.list { width: 100%; border-collapse: collapse; min-width: 720px; }
.list th { text-align: left; background: var(--brand-tint); color: var(--brand-dark); padding: .7rem .9rem; font-size: .9rem; }
.list td { padding: .7rem .9rem; border-top: 1px solid var(--line); vertical-align: top; }
.list tbody tr[data-href] { cursor: pointer; }
.list tbody tr:hover { background: #f1f7fa; }
.list td:first-child a { font-weight: 600; }
.tag { display: inline-block; background: var(--brand-tint); color: var(--brand-dark); border-radius: 999px; padding: .05rem .6rem; font-size: .8rem; margin: 0 .2rem .2rem 0; white-space: nowrap; }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 2rem; text-align: center; color: var(--muted); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.5rem; margin: 0 0 1.25rem; }
dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem 2rem; }
dt { font-size: .85rem; color: var(--muted); }
dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: .85rem; }

fieldset.card { min-width: 0; }
legend { font-size: 1.15rem; font-weight: 700; color: var(--brand-dark); padding: 0 .4rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem 1.5rem; align-items: end; }
.field label, .field .label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .25rem; }
.field.wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.days { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.alert { background: #fdeeee; border: 1px solid var(--danger); color: #6e1414; border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1.25rem; }
.alert ul { margin: .25rem 0 0; padding-left: 1.2rem; }

@media (prefers-reduced-motion: no-preference) { .btn { transition: background .15s; } }

.card.ok { border-color: #2e7d4f; background: #f0f8f3; }
.card.notice { border-color: #b7791f; background: #fff8ea; }
.card ul { margin: .5rem 0 0; padding-left: 1.2rem; }
input[type=file] { font: inherit; max-width: 100%; }

/* Logged-in user and log out */
.who { display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.who a { color: var(--muted); text-decoration: none; font-weight: 600; }
.who a:hover { color: var(--brand-dark); text-decoration: underline; }
.who form { margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand); cursor: pointer; text-decoration: underline; }

/* Login and other small forms */
.narrow { max-width: 26rem; margin-inline: auto; }
.stack { display: grid; gap: 1rem; }
input[type=password] { width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid #aebdc5; border-radius: 8px; background: #fff; color: var(--ink); }
.hint { color: var(--muted); font-size: .85rem; margin: .25rem 0 0; }
.tag.off { background: #eceff1; color: var(--muted); }
.tag.admin { background: #10526d; color: #fff; }
.grid.top { align-items: start; }

/* ===== Shift calendar and logins (added Oct 2026) ===== */
:root { --packing: #10526d; --packing-tint: #e8f1f5; --greet: #b25e0e; --greet-tint: #fbf0e4; }
.site-header nav { flex-wrap: wrap; gap: .4rem 1.25rem; }
.hero { margin-bottom: 1.25rem; }
.actions { flex-wrap: wrap; }
.search select { font: inherit; padding: .55rem .7rem; border: 1px solid #aebdc5; border-radius: 8px; background: #fff; color: var(--ink); }
.btn-sm { padding: .2rem .8rem; font-size: .85rem; }
.btn:disabled, .btn:disabled:hover { opacity: .45; cursor: not-allowed; background: var(--brand); border-color: var(--brand); }
.btn-ghost:disabled, .btn-ghost:disabled:hover { background: transparent; }
.flash { padding-block: .75rem; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.25rem; letter-spacing: .03em; }
.password-box dl { margin-bottom: .5rem; }
.intro { max-width: 46rem; }
.badge { display: inline-block; background: #b7791f; color: #fff; border-radius: 999px; padding: 0 .5rem; font-size: .75rem; font-weight: 700; line-height: 1.5; vertical-align: middle; }
.dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-right: .45rem; vertical-align: middle; flex: none; }
h1 .dot { width: .6em; height: .6em; vertical-align: .12em; }
h2 .dot { width: .8em; height: .8em; vertical-align: .05em; }
.dot-packing { background: var(--packing); }
.dot-meet_greet { background: var(--greet); }
.tag.st-pending { background: #fff1d6; color: #7a4a00; }
.tag.st-confirmed { background: #dcf1e4; color: #1d5c37; }
.tag.st-rejected { background: #eceff1; color: var(--muted); }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; padding: 0; margin: 0 0 .75rem; font-size: .9rem; }
.cal-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin: 1.5rem 0 .5rem; }
.cal-bar > :first-child { justify-self: start; }
.cal-bar > :last-child { justify-self: end; }
.cal-title { margin: 0; font-size: 1.4rem; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, .45fr)); gap: 5px; }
.cal-dow { font-size: .8rem; font-weight: 700; color: var(--muted); text-align: center; padding: .2rem; }
.day { background: #fff; border: 1px solid var(--line); border-radius: 8px; min-height: 8rem; padding: .35rem .4rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.day.out { background: transparent; border-color: transparent; }
.day.out .day-num { visibility: hidden; }
.day.past { opacity: .6; }
.day.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.day-num { font-weight: 700; font-size: .85rem; color: var(--muted); }
.day-full { display: none; }
.shift { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; border-left: 4px solid var(--packing); border-radius: 6px; padding: .35rem .45rem; background: var(--packing-tint); font-size: .82rem; color: var(--ink); text-decoration: none; min-width: 0; }
.shift-meet_greet { border-color: var(--greet); background: var(--greet-tint); }
a.shift:hover { box-shadow: 0 0 0 2px var(--line); }
.s-name { font-weight: 700; }
.places { color: var(--muted); }
.shift.full .places { font-weight: 700; color: var(--ink); }
.shift form { margin: auto 0 0; }
.shift .tag { margin: 0; }
.names { list-style: none; padding: 0; margin: 0; font-size: .78rem; line-height: 1.35; }
.you { font-size: .75rem; font-weight: 600; color: var(--brand-dark); }

.my-shifts, .people, .card ul.my-shifts, .card ul.people { list-style: none; padding: 0; margin: 0; }
.my-shifts li, .people li { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); }
.my-shifts li:first-child, .people li:first-child { border-top: 0; }
.my-shifts .when { font-weight: 600; min-width: 15rem; }
.people li { justify-content: space-between; }
.people li > div:first-child { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: baseline; }
.people .hint { margin: 0; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.req-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; margin-bottom: .5rem; }
.req-head h2 { margin: 0; }
.meter { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: .25rem 0 1.25rem; }
.meter .bar { width: 1.75rem; height: .6rem; border-radius: 999px; background: var(--line); }
.meter .bar.on { background: var(--brand); }
.meter strong { margin-left: .5rem; }

/* Phones: the month becomes a list of shift days */
@media (max-width: 760px) {
  .cal { display: block; }
  .cal-dow, .day { display: none; }
  .day.has-shift { display: block; min-height: 0; margin-bottom: .5rem; padding: .5rem .6rem; }
  .day-num { display: none; }
  .day-full { display: block; font-weight: 700; color: var(--brand-dark); margin-bottom: .3rem; }
  .shift { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; font-size: .9rem; }
  .shift form { margin: 0 0 0 auto; }
  .names { display: flex; flex-wrap: wrap; gap: 0 .6rem; width: 100%; }
  .my-shifts .when { min-width: 0; }
}

/* ===== Policies (added Nov 2026) ===== */
.policy-list { list-style: none; padding: 0; margin: 0; }
.card ul.policy-list { padding: 0; margin: 0; }
.policy-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.policy-list li:first-child { border-top: 0; }
.policy-list li > div { display: flex; flex-wrap: wrap; gap: .2rem .75rem; align-items: baseline; }
.policy-list .tag { margin: 0; }
.p-title { font-weight: 700; font-size: 1.05rem; }
.policy-mini, .card ul.policy-mini { list-style: none; padding: 0; margin: .75rem 0 0; }
.policy-mini li { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .2rem 1rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.policy-mini li:first-child { border-top: 0; }
.policy-mini .tag { margin: 0; }
.pdf-frame { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: .5rem 0 .4rem; }
.pdf-frame iframe { display: block; width: 100%; height: 75vh; min-height: 32rem; border: 0; }
.pdf-help { margin: 0 0 1.25rem; }
.confirm-box .check { align-items: flex-start; font-weight: 600; }
.confirm-box .check input { margin-top: .2rem; flex: none; }
h3.sub { font-size: 1rem; margin: 0 0 .4rem; color: var(--brand-dark); }
@media (max-width: 760px) {
  .pdf-frame iframe { height: 60vh; min-height: 22rem; }
  .policy-list li { align-items: flex-start; }
}
h2 .count { font-size: .85rem; font-weight: 600; background: var(--brand-tint); color: var(--brand-dark); border-radius: 999px; padding: .1rem .6rem; margin-left: .35rem; vertical-align: middle; }
.mark-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; }
.mark-row .field { flex: 0 1 14rem; }
.mark-list input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); align-self: center; margin: 0; }
.mark-list label.p-title { cursor: pointer; }
.tick { color: #2e7d4f; font-weight: 700; width: 1.1rem; text-align: center; }

/* ===== Documents library (added Nov 2026) ===== */
details.add-doc > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.add-doc > summary::-webkit-details-marker { display: none; }
details.add-doc > summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
details.add-doc[open] > summary::before { content: "–"; }
details.add-doc > summary h2 { margin: 0; }
details.add-doc[open] > summary { margin-bottom: 1rem; }
table.docs td.nowrap { white-space: nowrap; }
table.docs td.row-actions { white-space: nowrap; text-align: right; }
table.docs .row-actions { display: table-cell; }
table.docs .row-actions form { display: inline; }
.tag.doc-pdf { background: #fde8e6; color: #8a1f12; }
.tag.doc-word { background: #e3ecfb; color: #1c4587; }
.search #cat-filter { flex: 0 1 14rem; }
.field select { width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid #aebdc5; border-radius: 8px; background: #fff; color: var(--ink); }
table.docs td:nth-child(n+3) { white-space: nowrap; }
table.docs td:first-child { min-width: 14rem; }
table.docs td.downloads { white-space: normal; min-width: 11rem; }
.downloads .dl { margin: 0 .3rem .3rem 0; padding: .2rem .7rem; }
.downloads .dl span { font-weight: 400; opacity: .8; font-size: .8em; }
.downloads .dl-pdf { background: #fde8e6; color: #8a1f12; border-color: #e7b3ab; }
.downloads .dl-pdf:hover { background: #8a1f12; color: #fff; border-color: #8a1f12; }
.downloads .dl-word { background: #e3ecfb; color: #1c4587; border-color: #b2c6ea; }
.downloads .dl-word:hover { background: #1c4587; color: #fff; border-color: #1c4587; }
.add-version { font-size: .85rem; margin-top: .15rem; }
.add-version summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.add-version form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .4rem; }
.add-version input[type=file] { font-size: .8rem; max-width: 14rem; }
.grid .hint.wide { grid-column: 1 / -1; margin-top: -.5rem; }
.add-version summary { list-style: none; }
.add-version summary::-webkit-details-marker { display: none; }
.downloads .dl-other { background: #e6f4ec; color: #1d5c37; border-color: #a9d6bb; }
.downloads .dl-other:hover { background: #1d5c37; color: #fff; border-color: #1d5c37; }
.add-version select { font: inherit; font-size: .8rem; padding: .15rem .3rem; border: 1px solid #aebdc5; border-radius: 6px; }
