:root {
  --green: #1E4D3A; --green-dark: #143528; --green-soft: #E3EFE8; --green-line: #A9CDB8;
  --ink: #16222E; --muted: #4E5963; --muted2: #3C4750; --ground: #F4F1EA; --line: #DDD6C8; --head: #EDE8DD; --field: #B9B1A2;
  --amber: #B4530E; --amber-soft: #FCEBDD; --amber-line: #E7B891; --amber-ink: #7A3408;
  --red: #A3261D; --red-soft: #FBE4E1; --red-ink: #7C1A13; --gold: #F2C14E; --blue-soft: #E6ECF5; --blue-ink: #243B63;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.45; }
a { color: var(--green); } a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
.bar { background: var(--green); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 16px; flex-wrap: wrap; }
.bar .brand { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: .06em; color: #fff; text-decoration: none; }
.bar nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.bar nav a { color: #fff; font-weight: 600; text-decoration: none; }
.bar nav a:hover { text-decoration: underline; color: #fff; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
h1 { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1.1; margin: 0 0 6px; }
h2 { font-family: var(--display); font-weight: 700; font-size: 24px; margin: 28px 0 10px; letter-spacing: .02em; }
.sub { color: var(--muted); margin: 0 0 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--green); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--green-dark); color: #fff; }
.btn.outline { background: #fff; color: var(--green); border: 2px solid var(--green); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid var(--red); }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn:disabled { background: #CFC8BA; color: var(--muted2); cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
label { font-weight: 700; font-size: 15px; display: block; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=date], input[type=number], select, textarea { min-height: 44px; border: 1px solid var(--field); border-radius: 8px; padding: 0 10px; background: #fff; width: 100%; }
textarea { padding: 10px; min-height: 80px; }
.form { display: grid; gap: 14px; }
.form.cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.check input { width: 20px; height: 20px; }
.notice { border-radius: 12px; padding: 14px 18px; margin: 0 0 18px; }
.notice.ok { background: var(--green-soft); border: 1px solid var(--green-line); color: var(--green-dark); font-weight: 600; }
.notice.warn { background: var(--amber-soft); border: 1px solid var(--amber-line); color: #5C2A0A; }
.notice.bad { background: var(--red-soft); border: 1px solid #E2A39C; color: var(--red-ink); }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 15px; }
th { background: var(--head); text-align: left; font-size: 14px; color: var(--muted2); padding: 10px 12px; }
td { padding: 9px 12px; border-top: 1px solid var(--head); vertical-align: top; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; margin: 2px 4px 2px 0; }
.tag.amber { background: var(--amber-soft); color: var(--amber-ink); }
.tag.green { background: var(--green-soft); color: var(--green-dark); }
.tag.blue { background: var(--blue-soft); color: var(--blue-ink); }
.tag.grey { background: var(--head); color: var(--muted2); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.tablewrap { overflow-x: auto; }
/* Admin layout */
.admin { display: flex; min-height: 100vh; }
.side { width: 240px; background: var(--ink); color: #fff; padding: 22px 12px; display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.side .brand { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .08em; padding: 0 10px; }
.side .who { font-size: 14px; color: #B8C2CB; padding: 0 10px 16px; }
.side a { color: #DDE3E8; text-decoration: none; font-weight: 600; padding: 11px 12px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.side a.on { background: var(--green); color: #fff; }
.side a:hover { background: #26313A; color: #fff; }
.side .count { background: var(--gold); color: var(--ink); border-radius: 999px; font-size: 13px; padding: 1px 8px; }
.side .spacer { flex: 1; }
.main { flex: 1; padding: 30px 36px 60px; min-width: 0; }
@media (max-width: 860px) { .admin { flex-direction: column; } .side { width: auto; } .main { padding: 20px 16px; } }
.duty { background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 18px; display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.duty b.k { font-family: var(--display); color: var(--gold); letter-spacing: .08em; }
.duty span.r { color: #B8C2CB; }
/* QR sign-in */
.qrbox { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.qr { padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; min-width: 260px; min-height: 260px; display: flex; align-items: center; justify-content: center; }
.qr img { width: 240px; height: 240px; image-rendering: pixelated; }
.steps { display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 12px; }
.step .n { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hidden { display: none !important; }
input.code { font-size: 26px; letter-spacing: .3em; text-align: center; max-width: 240px; }
@media print { .noprint { display: none !important; } body { background: #fff; } }
