/* PJ EMPIRE — light theme: white field, navy brand (matches the paper forms' navy bars).
   Navy = structure/actions, white = surface, color = status only. Sunlight-first. */
:root{
  --bg:#f3f5f9; --panel:#ffffff; --ink:#122a4d; --mut:#5c6b81;
  --navy:#12386b; --navy2:#0d2a52; --royal:#1e5bd7;
  --glass:#ffffff; --glass2:#eef2f8;
  --hair:#dde4ee; --hair2:#c3cedf;
  --ok:#188a45; --warn:#c77700; --bad:#d02b20;
  --r:20px; --spring:cubic-bezier(.32,1.4,.5,1);
  --serif:'Times New Roman',Georgia,serif;
}
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body{ margin:0; height:100%; }
body{
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Display','Segoe UI Variable Display','Segoe UI',Roboto,sans-serif;
  letter-spacing:-.01em; background:var(--bg); color:var(--ink);
  display:flex; flex-direction:column; overflow:hidden;
}
.glow{ display:none; }

/* ---------- header — the navy bar ---------- */
header{ display:flex; justify-content:space-between; align-items:center; padding:14px 20px;
  background:var(--navy); border-bottom:3px solid var(--navy2); }
.brand{ display:flex; align-items:center; gap:14px; min-width:0; }
.brand img{ height:26px; display:block; }
.sep{ width:1px; height:22px; background:rgba(255,255,255,.3); }
.app{ font-size:13px; font-weight:650; color:rgba(255,255,255,.75); letter-spacing:.02em; white-space:nowrap; }
header .chip{ background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.22); color:rgba(255,255,255,.85); }
header .chip.ok{ color:#7ee2a4; } header .chip.ok::before{ background:#3ddc84; box-shadow:0 0 8px #3ddc84; }
header .chip.warn{ color:#ffd58a; } header .chip.warn::before{ background:#ffb84d; box-shadow:0 0 8px #ffb84d; }
header .gear{ background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.25); color:#fff; }
.chips{ display:flex; gap:8px; align-items:center; }

/* pills */
.chip{ display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:650; color:var(--mut);
  padding:7px 13px; border-radius:999px; background:var(--panel); border:1px solid var(--hair2); white-space:nowrap; }
.chip::before{ content:''; width:7px; height:7px; border-radius:50%; background:var(--mut); }
.chip.ok{ color:var(--ok); } .chip.ok::before{ background:var(--ok); }
.chip.warn{ color:var(--warn); } .chip.warn::before{ background:var(--warn); }
.chip.big{ font-size:19px; font-weight:750; padding:11px 20px; border-radius:16px; color:var(--ink);
  background:var(--panel); border:1.5px solid var(--hair2); letter-spacing:-.02em;
  box-shadow:0 2px 10px rgba(18,42,77,.06); }
.chip.big::before{ display:none; }

/* ---------- job strip ---------- */
.job{ display:flex; align-items:center; gap:16px; padding:16px 20px 6px; }
.gps{ color:var(--mut); font-weight:650; font-size:13px; }
.plans{ margin-left:auto; display:flex; flex-direction:column; align-items:center; gap:1px;
  padding:10px 18px; border-radius:14px; border:0; background:var(--navy);
  color:#fff; font-family:inherit; font-size:15px; font-weight:700; letter-spacing:-.01em;
  cursor:pointer; transition:transform .15s var(--spring); box-shadow:0 3px 12px rgba(18,56,107,.25); }
.plans small{ font-size:11px; font-weight:500; color:rgba(255,255,255,.7); }
.plans:active{ transform:scale(.96); }

/* ---------- segmented mode control ---------- */
.modes{ display:grid; grid-template-columns:repeat(4,1fr); gap:4px; margin:10px 20px 0;
  padding:4px; background:var(--glass2); border:1px solid var(--hair); border-radius:16px; }
.mode{ appearance:none; border:0; background:transparent; color:var(--mut); border-radius:12px;
  padding:12px 6px; font-family:inherit; font-size:15px; font-weight:650; letter-spacing:-.01em;
  display:flex; flex-direction:column; align-items:center; gap:2px; cursor:pointer;
  transition:background .2s ease, color .2s ease, transform .15s var(--spring); }
.mode small{ font-weight:500; font-size:11px; color:inherit; opacity:.65; }
.mode:active{ transform:scale(.97); }
.mode.active{ background:var(--navy); color:#fff; box-shadow:0 4px 14px rgba(18,56,107,.3); }

/* ---------- tap stage ---------- */
.tap{ flex:1; position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; margin:8px 20px 14px; overflow:hidden; background:var(--panel);
  border:1.5px solid var(--hair); border-radius:var(--r); box-shadow:0 4px 24px rgba(18,42,77,.06); }
.rings{ position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; }
.rings i{ position:absolute; width:150px; height:150px; border-radius:50%;
  border:1.5px solid rgba(18,56,107,.28); animation:ripple 2.6s ease-out infinite; }
.rings i:nth-child(2){ animation-delay:.85s; }
.rings i:nth-child(3){ animation-delay:1.7s; }
@keyframes ripple{ 0%{ transform:scale(.55); opacity:0 } 18%{ opacity:.9 } 100%{ transform:scale(2.6); opacity:0 } }
.badge{ width:158px; height:158px; display:block; filter:drop-shadow(0 8px 24px rgba(18,56,107,.25));
  animation:breathe 2.6s ease-in-out infinite; }
@keyframes breathe{ 0%,100%{ transform:scale(1) } 50%{ transform:scale(1.035) } }
.prompt{ margin-top:18px; font-size:23px; font-weight:750; letter-spacing:-.02em; text-align:center; color:var(--navy); }
.subprompt{ color:var(--mut); font-size:14px; font-weight:500; }
.nfc{ position:absolute; opacity:0; pointer-events:none; width:1px; height:1px; }

/* ---------- crew ledger ---------- */
.crew{ margin:0 20px 18px; background:var(--panel); border:1.5px solid var(--hair); border-radius:var(--r);
  max-height:36vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 4px 24px rgba(18,42,77,.06); }
.crewhead{ display:flex; justify-content:space-between; align-items:center; padding:14px 18px 10px; }
.crewhead b{ font-size:13px; font-weight:700; color:var(--navy); letter-spacing:.02em; text-transform:uppercase; }
.link{ background:var(--glass2); border:1px solid var(--hair2); color:var(--navy); font-family:inherit;
  font-weight:700; font-size:13px; padding:8px 14px; border-radius:999px; cursor:pointer;
  transition:transform .15s var(--spring); }
.link:active{ transform:scale(.96); }
.list{ overflow:auto; padding:0 8px 10px; }
.row{ display:grid; grid-template-columns:8px 1fr auto auto 20px; align-items:center; gap:12px;
  padding:11px 12px; font-size:16px; border-top:1px solid var(--hair);
  animation:rowIn .35s var(--spring); }
.row:first-child{ border-top:0; }
@keyframes rowIn{ from{ opacity:0; transform:translateY(-6px) } to{ opacity:1; transform:none } }
.row .dot{ width:8px; height:8px; border-radius:50%; }
.row b{ font-weight:650; letter-spacing:-.01em; }
.row .typ{ color:var(--mut); font-weight:650; font-size:12px; }
.row .time{ font-variant-numeric:tabular-nums; font-weight:650; color:var(--ink); }
.row .sy{ text-align:center; font-size:13px; }
.row .sy.ok{ color:var(--ok); } .row .sy.warn{ color:var(--warn); }

/* ---------- modals ---------- */
.modal{ position:fixed; inset:0; background:rgba(13,29,54,.45); backdrop-filter:blur(6px);
  display:none; align-items:center; justify-content:center; padding:20px; z-index:50; }
.modal.show{ display:flex; }
.modal .card{ background:var(--panel); border:1px solid var(--hair); border-radius:24px;
  padding:26px; width:min(500px,100%); box-shadow:0 30px 80px rgba(13,29,54,.35);
  animation:cardIn .3s var(--spring); }
@keyframes cardIn{ from{ opacity:0; transform:scale(.94) translateY(10px) } to{ opacity:1; transform:none } }
.modal h2{ margin:0 0 6px; font-size:20px; font-weight:750; letter-spacing:-.02em; color:var(--navy); }
.modal label{ display:block; margin:15px 0 6px; color:var(--mut); font-weight:650; font-size:12px; }
.in{ width:100%; padding:14px 16px; border-radius:14px; border:1.5px solid var(--hair2);
  background:#fff; color:var(--ink); font-family:inherit; font-size:17px; }
.in:focus{ outline:none; border-color:var(--royal); }
.actions{ display:flex; gap:10px; margin-top:22px; }
.btn{ flex:1; padding:15px; border:0; border-radius:14px; background:var(--navy); color:#fff;
  font-family:inherit; font-size:16px; font-weight:700; letter-spacing:-.01em; cursor:pointer;
  transition:transform .15s var(--spring), opacity .2s; box-shadow:0 3px 12px rgba(18,56,107,.25); }
.btn:active{ transform:scale(.97); }
.btn.ghost{ background:var(--glass2); color:var(--navy); border:1px solid var(--hair2); box-shadow:none; }

/* ---------- lunch-or-done choice ---------- */
.card.choice{ text-align:center; }
.choice-btns{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:18px; }
.cbtn{ display:flex; flex-direction:column; align-items:center; gap:6px; padding:26px 10px 20px;
  border-radius:20px; border:1.5px solid var(--hair2); background:var(--panel); color:var(--ink);
  font-family:inherit; font-size:19px; font-weight:700; letter-spacing:-.01em; cursor:pointer;
  transition:transform .15s var(--spring), background .2s; }
.cbtn:active{ transform:scale(.96); }
.cbtn .ico{ font-size:40px; line-height:1; }
.cbtn small{ font-size:13px; font-weight:500; color:var(--mut); }
.cbtn.lunch{ border-color:#e8b562; background:#fff8ec; }
.cbtn.out{ border-color:var(--navy); background:var(--navy); color:#fff; box-shadow:0 3px 12px rgba(18,56,107,.25); }
.cbtn.out small{ color:rgba(255,255,255,.7); }
.cancel{ margin-top:14px; width:100%; }

/* ---------- toast ---------- */
.toast{ position:fixed; left:50%; bottom:28px; transform:translateX(-50%) translateY(24px) scale(.95); opacity:0;
  transition:all .35s var(--spring); padding:15px 26px; border-radius:999px; font-size:17px; font-weight:700;
  letter-spacing:-.01em; color:#fff; background:var(--ok); box-shadow:0 12px 40px rgba(13,29,54,.35);
  pointer-events:none; max-width:92vw; text-align:center; z-index:60; }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0) scale(1); }
.toast.warn{ background:var(--warn); }

/* ---------- admin ---------- */
.gear{ background:var(--panel); border:1px solid var(--hair2); color:var(--navy); width:36px; height:34px;
  border-radius:999px; font-size:15px; cursor:pointer; }
.card.wide{ width:min(720px,100%); max-height:88vh; overflow:auto; }
.ahead{ display:flex; justify-content:space-between; align-items:center; }
.asec{ margin-top:20px; border-top:1px solid var(--hair); padding-top:16px; }
.asec h3{ margin:0 0 10px; font-size:13px; font-weight:700; color:var(--navy); }
.muted{ color:var(--mut); font-size:13px; }
.alist{ display:flex; flex-direction:column; gap:8px; }
.arow{ display:grid; grid-template-columns:1fr auto auto auto auto; align-items:center; gap:10px;
  padding:12px 14px; background:var(--glass2); border:1px solid var(--hair); border-radius:14px; font-size:15px; }
.arow .typ{ color:var(--mut); font-size:12px; }
.arow .uid{ font-family:ui-monospace,'SF Mono',monospace; font-size:12px; color:var(--mut); }
.arow .st{ font-size:12px; font-weight:700; padding:4px 10px; border-radius:999px; }
.arow .st.on{ color:var(--ok); background:rgba(24,138,69,.1); }
.arow .st.off{ color:var(--bad); background:rgba(208,43,32,.1); }
.mini{ padding:8px 14px; border:1px solid var(--hair2); background:var(--panel); color:var(--navy);
  border-radius:999px; font-family:inherit; font-weight:700; font-size:12px; cursor:pointer; }

@media (orientation:portrait){
  .modes{ grid-template-columns:repeat(2,1fr); }
  .brand img{ height:21px; } .app{ display:none; }
}

/* tools menu */
.menub{ padding:8px 16px; border-radius:999px; border:1px solid rgba(255,255,255,.3); background:rgba(255,255,255,.12);
  color:#fff; font-family:inherit; font-weight:750; font-size:14px; letter-spacing:-.01em; cursor:pointer; white-space:nowrap; }
.mlist{ display:flex; flex-direction:column; gap:8px; margin-top:16px; }
.mitem{ display:flex; align-items:center; gap:14px; width:100%; text-align:left; padding:14px 16px;
  border-radius:14px; border:1px solid var(--hair); background:var(--glass2); color:var(--ink);
  font-family:inherit; cursor:pointer; transition:transform .15s var(--spring); }
.mitem:active{ transform:scale(.98); }
.mitem .mi{ font-size:24px; width:32px; text-align:center; }
.mitem b{ display:block; font-size:16px; font-weight:700; letter-spacing:-.01em; }
.mitem small{ display:block; font-size:12px; color:var(--mut); margin-top:1px; }

/* back/home button on tool pages */
.backb{ display:inline-flex; align-items:center; gap:7px; padding:9px 16px; border-radius:999px;
  background:var(--navy); color:#fff; text-decoration:none; font-weight:750; font-size:14px;
  letter-spacing:-.01em; box-shadow:0 3px 12px rgba(18,56,107,.25); white-space:nowrap; }
.backb small{ font-weight:500; font-size:11px; color:rgba(255,255,255,.7); }
.backb:active{ transform:scale(.96); }

/* weekly tailgate reminder banner */
.tgbanner{ display:flex; align-items:center; gap:10px; margin:10px 20px 0; padding:13px 18px;
  border:0; border-radius:14px; background:#c77700; color:#fff; font-family:inherit; font-size:15px;
  font-weight:650; text-align:left; cursor:pointer; box-shadow:0 4px 16px rgba(199,119,0,.35);
  animation:tgpulse 2.4s ease-in-out infinite; }
.tgbanner b{ font-weight:800; }
.tgbanner .go{ margin-left:auto; font-size:12.5px; font-weight:700; color:rgba(255,255,255,.9); white-space:nowrap; }
@keyframes tgpulse{ 0%,100%{ box-shadow:0 4px 16px rgba(199,119,0,.35) } 50%{ box-shadow:0 4px 26px rgba(199,119,0,.6) } }

/* meal-window reminder (deeper orange than the tailgate banner) */
.tgbanner.meal{ background:#c2410c; box-shadow:0 4px 16px rgba(194,65,12,.35); cursor:default; }
