/* ------------------------------------------------------------
   Man O' War C2 shirt page
   Deep forest green base, crest gold for actions, chalk for text.
   Georgia for the big words, the phone's own font for everything else.
   ------------------------------------------------------------ */
:root {
  --forest: #0a1f16;
  --canopy: #11291d;
  --canopy-2: #173628;
  --line: #25493a;
  --chalk: #f1f4ef;
  --sage: #a3b8ab;
  --gold: #f0b23e;
  --gold-ink: #2a1d00;
  --green: #34c474;
  --green-ink: #04210f;
  --clay: #f4917f;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--forest);
  color: var(--chalk);
  font: 16px/1.5 var(--sans);
  padding-bottom: env(safe-area-inset-bottom);
}
body.no-scroll { overflow: hidden; }

a { color: var(--gold); }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Nigerian flag stripe */
.flagbar {
  height: 5px;
  background: linear-gradient(90deg, #0b8f4a 0 33.33%, #ffffff 33.33% 66.66%, #0b8f4a 66.66% 100%);
}

/* ---------- Top bar ---------- */
.topbar {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--chalk); min-width: 0; }
.brand-mark {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 2px solid var(--gold);
  border-radius: 10px;
  color: var(--gold);
  font: 700 1.1rem/1 var(--serif);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-size: 1rem; }
.brand-text small { color: var(--sage); font-size: .8rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 20px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  color: var(--chalk);
  background: transparent;
}
.btn-sm { padding: 9px 14px; font-size: .9rem; border-radius: 10px; }
.btn-block { display: block; width: 100%; padding: 16px; font-size: 1.05rem; }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: #f6c25f; }
.btn-green { background: var(--green); color: var(--green-ink); }
.btn-ghost { border-color: var(--line); color: var(--chalk); background: var(--canopy); }
.btn-ghost:hover { border-color: var(--sage); }
.btn-danger { border-color: #6b3a33; color: var(--clay); background: transparent; }
.btn-danger:hover { background: #2a1511; }

/* ---------- Messages ---------- */
.toasts { padding-top: 4px; }
.toast {
  margin: 8px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--canopy);
  cursor: pointer;
}
.toast.success { border-color: var(--green); background: #0f3321; }
.toast.error { border-color: var(--clay); background: #33160f; }

/* ---------- Hero ---------- */
.hero { padding: 26px 0 22px; }
.slogan {
  font: 700 clamp(2.3rem, 9.5vw, 4.4rem)/1.02 var(--serif);
  letter-spacing: -0.02em;
}
.slogan-tail {
  margin-top: 14px;
  font: italic 400 clamp(1.3rem, 5vw, 2rem)/1.25 var(--serif);
  color: var(--gold);
}
.hero-note { margin: 18px 0 20px; max-width: 34rem; color: var(--sage); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.stat { background: var(--canopy); padding: 12px 16px; }
.stat b { display: block; font-size: 1.45rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--sage); font-size: .85rem; }

.sizes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.size-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "label count" "note note";
  align-items: baseline;
  column-gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.size-label { grid-area: label; color: var(--gold); font: 700 1.15rem/1 var(--serif); }
.size-stat b { grid-area: count; justify-self: end; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.size-stat small { grid-area: note; color: var(--sage); font-size: .8rem; }
.size-none .size-label { color: var(--sage); font-size: .95rem; font-family: var(--sans); font-weight: 600; }
.fine { margin-top: 8px; color: var(--sage); font-size: .8rem; }
.money { margin: 6px 0 16px; color: var(--sage); }
.money b { color: var(--chalk); }

@media (min-width: 600px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .sizes { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Search and filters ---------- */
.toolbar { margin: 26px 0 16px; display: grid; gap: 12px; }
input[type="search"], input[type="text"], input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--canopy);
  color: var(--chalk);
  font: inherit;
  font-size: 1rem;
}
input::placeholder { color: #6f8a7b; }
input:focus { border-color: var(--gold); outline: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.chip {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--chalk);
  font: 600 .9rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.chip span { margin-left: 4px; color: var(--sage); font-variant-numeric: tabular-nums; }
.chip.is-on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.chip.is-on span { color: var(--gold-ink); }

/* ---------- People grid ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; } }

.person {
  background: var(--canopy);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.zoom { cursor: zoom-in; }
.person > .zoom { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 25%; background: var(--canopy-2); }
.person-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.person h2 { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.code { color: var(--sage); font-size: .85rem; font-variant-numeric: tabular-nums; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.5;
}
.pill-size { border-color: var(--gold); color: var(--gold); }
.pill-ok { background: #0f3321; border-color: var(--green); color: var(--green); }
.pill-muted { color: var(--sage); }
.pill-warn { border-color: var(--clay); color: var(--clay); }
.pill-wait { background: #33280f; border-color: var(--gold); color: var(--gold); }

.empty { padding: 36px 8px; text-align: center; color: var(--sage); }

/* Floating register button on phones */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 20;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}
@media (min-width: 700px) { .fab { display: none; } }

/* ---------- Forms ---------- */
.sheet { max-width: 540px; margin: 8px auto 0; padding: 22px 0 8px; }
.sheet-narrow { max-width: 420px; }
.h1 { font: 700 clamp(1.7rem, 6vw, 2.3rem)/1.1 var(--serif); letter-spacing: -0.01em; }
.lead { margin: 10px 0 22px; color: var(--sage); }

.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { display: block; margin-bottom: 8px; font-weight: 650; padding: 0; }
.help { margin-top: 6px; color: var(--sage); font-size: .85rem; }
.err { margin-top: 6px; color: var(--clay); font-size: .9rem; font-weight: 600; }

.size-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .size-grid { grid-template-columns: repeat(4, 1fr); } }
.size-tile { display: block; position: relative; cursor: pointer; }
.size-tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.size-tile span {
  display: block;
  padding: 16px 8px;
  text-align: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--canopy);
  font-weight: 700;
}
.size-tile input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.size-tile input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.photo-field { display: flex; align-items: center; gap: 16px; position: relative; }
.photo-field img, .photo-empty {
  flex: none;
  width: 104px; height: 104px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center 25%;
}
.photo-empty {
  display: grid; place-items: center;
  border: 1.5px dashed var(--sage);
  color: var(--sage);
  font-size: .85rem;
  text-align: center;
  padding: 8px;
}
.photo-side { min-width: 0; }
.photo-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.file-hidden { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.back { margin-top: 18px; text-align: center; }
.back a { color: var(--sage); }

/* ---------- Payment popup ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(3, 12, 7, .8);
  animation: lb-in .15s ease-out;
}
.modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 100%;
  overflow-y: auto;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--canopy);
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
}
@media (min-width: 600px) {
  .modal { align-items: center; padding: 16px; }
  .modal-card { border-radius: 20px; }
}
.modal-title { font: 700 1.4rem/1.2 var(--serif); }
.account { margin: 18px 0 14px; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.account-row { background: var(--forest); padding: 12px 14px; }
.account-row dt { color: var(--sage); font-size: .85rem; }
.account-row dd { margin: 2px 0 0; font-weight: 650; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-number { font: 700 1.7rem/1.2 var(--serif); letter-spacing: .04em; font-variant-numeric: tabular-nums; user-select: all; -webkit-user-select: all; }
.modal-card .btn-block { margin-top: 12px; }
.modal-card .help { margin-bottom: 4px; }

/* ---------- Admin panel ---------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding: 8px 0 18px; }
.page-head .lead { margin: 6px 0 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.head-actions form { margin: 0; }
.approve-all { margin: 0 0 14px; }

.rows { display: grid; gap: 10px; }
.row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px 14px;
  padding: 12px;
  background: var(--canopy);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.avatar { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; object-position: center 25%; }
.row-main { min-width: 0; }
.row-main h2 { font-size: 1.05rem; overflow-wrap: anywhere; }
.row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions form { margin: 0; }
@media (min-width: 760px) {
  .row { grid-template-columns: 76px 1fr auto; align-items: center; }
  .row-actions { grid-column: auto; justify-content: flex-end; }
}

/* ---------- Footer ---------- */
.footer { padding-top: 36px; padding-bottom: 96px; text-align: center; color: var(--sage); }
.footer-slogan { font: italic 400 1rem/1.4 var(--serif); }
.footer-links { margin-top: 10px; font-size: .85rem; }
.footer-links a { color: var(--sage); }

/* ---------- Photo viewer (tap any photo) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 12, 7, .95);
  animation: lb-in .15s ease-out;
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 130px);
  max-height: calc(100dvh - 130px);
  width: auto;
  height: auto;
  border-radius: 10px;
  touch-action: pinch-zoom;
}
.lightbox figcaption { font: 700 1.15rem/1.3 var(--serif); text-align: center; }
.lb-close, .lb-nav {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(241, 244, 239, .16);
  color: var(--chalk);
  cursor: pointer;
  line-height: 1;
}
.lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 46px; height: 46px; font-size: 2rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 2.2rem; padding-bottom: 4px; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lightbox.single .lb-nav { display: none; }

@media (prefers-reduced-motion: reduce) {
  .lightbox, .modal { animation: none; }
}
