:root {
  --navy: #102f54; --blue: #12638b; --blue-hover: #0c4c6e; --ground: #f3f6fa; --paper: #fff;
  --ink: #20364c; --muted: #53687c; --line: #dce4ed; --selected: #e8f2fa;
  --green: #206449; --green-bg: #eaf5ee; --amber: #815315; --amber-bg: #fff4df; --red: #9b2c2c;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; line-height: 1.5; }
body.staff { font-size: 0.9rem; }
a { color: var(--blue); }
a:hover { color: var(--blue-hover); }
.top { display: flex; align-items: center; gap: 16px; padding: 14px 24px; background: var(--paper); border-bottom: 4px solid var(--navy); flex-wrap: wrap; }
.brand img { height: 44px; width: auto; display: block; max-width: 70vw; }
.tag { background: var(--navy); color: #fff; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.who form { margin: 0; }
.staffnav { display: flex; gap: 20px; padding: 10px 24px; background: var(--navy); flex-wrap: wrap; }
.staffnav a { color: #fff; text-decoration: none; font-weight: 600; }
.staffnav a:hover { text-decoration: underline; color: #fff; }
main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 24px 16px; }
h1 { color: var(--navy); font-size: 1.8rem; margin: 0.4em 0; }
h2 { color: var(--navy); font-size: 1.25rem; margin: 0 0 12px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 16px 0; }
.narrow { max-width: 520px; margin: 40px auto; }
.lead { font-size: 1.1rem; }
.small { font-size: 0.85rem; }
.muted { color: var(--muted); }
.notice, .flash { background: var(--amber-bg); color: var(--amber); border-radius: 8px; padding: 12px 16px; }
.flash { background: var(--green-bg); color: var(--green); font-weight: 600; margin-bottom: 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
label { font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=number], input:not([type]), select {
  font: inherit; padding: 10px 12px; border: 1px solid #9bafc3; border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%;
}
input:focus, select:focus, button:focus, a:focus { outline: 3px solid #b7d4e8; outline-offset: 2px; }
button, .button { font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--blue); background: #fff; color: var(--blue); cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: var(--selected); }
button.primary { background: var(--blue); color: #fff; }
button.primary:hover { background: var(--blue-hover); }
button.big { padding: 14px 24px; font-size: 1.1rem; }
button.link { border: 0; background: none; padding: 0; color: var(--blue); text-decoration: underline; font-weight: 400; }
button.danger { color: var(--red); }
.tiles { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--blue); background: var(--selected); }
.tile strong { display: block; font-size: 1.15rem; color: var(--navy); }
.tile span { color: var(--muted); }
.upload { display: flex; flex-direction: column; gap: 10px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 3px dashed #9bafc3; border-radius: var(--radius); padding: 32px 16px; text-align: center; cursor: pointer; background: var(--ground); }
.drop.over { border-color: var(--blue); background: var(--selected); }
.drop-main { font-size: 1.2rem; color: var(--blue); text-decoration: underline; }
.drop-sub { color: var(--muted); font-weight: 400; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.chosen { margin: 0; padding-left: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
td.actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
td.actions form { margin: 0; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; align-items: end; }
.grid label { display: flex; flex-direction: column; gap: 4px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; }
.check { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.indent { margin-left: 28px; }
.pickgroup { margin-bottom: 8px; }
details summary { cursor: pointer; color: var(--blue); font-weight: 600; margin-top: 12px; }
.row.between { display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 640px) {
  html { font-size: 17px; }
  .files thead { display: none; }
  .files tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .files td { display: block; border: 0; padding: 2px 0; }
  .list { display: block; overflow-x: auto; }
}
