/* AVAO — BWoF Manager · dark metallic theme */

:root {
  --ink: #ecedef;
  --muted: #9a9ba6;
  --faint: #6e6f7a;
  --bg: #060607;
  --card: rgba(17, 17, 21, 0.72);
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.06);
  --orange: #ff7a18;
  --orange2: #ff3d00;
  --green: #46c97e;
  --green-bg: rgba(60, 200, 120, 0.13);
  --red: #ff8089;
  --red-strong: #ff5562;
  --red-bg: rgba(255, 70, 80, 0.12);
  --amber: #ffb84d;
  --amber-bg: rgba(255, 170, 40, 0.12);
  --blue: #a9b2ff;
  --blue-bg: rgba(120, 130, 255, 0.13);
  --purple: #8d7bf5;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(110% 80% at 50% 0%, #141417 0%, #0a0a0c 55%, #040405 100%) fixed;
  color: var(--ink);
  min-height: 100vh;
}

#app { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; }

/* ambient chrome blobs behind every screen */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient .blob { opacity: 0.28; filter: none; animation-duration: 38s; }
.ambient::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 110%, rgba(0,0,0,.55), transparent 60%);
}

/* ============================================================
   LANDING — chrome AVAO letters, glass sign-in card
   ============================================================ */

.landing {
  position: fixed; inset: 0; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 10%, #141416 0%, #08080a 55%, #000 100%);
}

/* drifting liquid-metal blobs */
.blob {
  position: absolute; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0%, #d9d9de 12%, #8c8c95 30%, #3c3c44 55%, #15151a 78%, #000 100%);
  filter: blur(1px) saturate(0.9);
  opacity: 0.85;
  animation: drift 26s ease-in-out infinite alternate;
}
.blob.b1 { width: 420px; height: 420px; top: -140px; right: -90px; animation-duration: 31s; }
.blob.b2 { width: 300px; height: 300px; bottom: -80px; left: -70px; animation-duration: 24s; animation-delay: -8s; }
.blob.b3 { width: 150px; height: 150px; bottom: 18%; right: 12%; animation-duration: 19s; animation-delay: -4s; opacity: .65; }
.blob.b4 { width: 90px; height: 90px; top: 22%; left: 8%; animation-duration: 16s; animation-delay: -11s; opacity: .55; }
.blob::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 68% 70%, rgba(255,255,255,.35) 0%, transparent 18%);
}
@keyframes drift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(-34px, 26px) rotate(8deg) scale(1.06); }
  100% { transform: translate(28px, -22px) rotate(-6deg) scale(0.97); }
}

/* chrome lettering (shared by landing + headings) */
.avao {
  position: absolute; inset: 0; top: 7vh;
  display: flex; align-items: flex-start; justify-content: center;
  gap: 1.4vw; user-select: none; pointer-events: none;
}
.avao span {
  font-family: "Michroma", "Chakra Petch", "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: clamp(58px, 12vw, 168px);
  line-height: 1;
  letter-spacing: 0.02em;
  background: linear-gradient(160deg,
    #ffffff 0%, #eef0f2 13%, #dcdde0 26%, #b1b4b8 40%,
    #f4f5f7 52%, #9b9ea2 66%, #d4d6d9 78%, #ffffff 92%);
  background-size: 220% 220%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.7)) drop-shadow(0 2px 0 rgba(255,255,255,.28));
  animation: sheen 9s ease-in-out infinite;
}
.avao span:nth-child(1) { animation-delay: 0s; }
.avao span:nth-child(2) { animation-delay: -2.2s; }
.avao span:nth-child(3) { animation-delay: -4.4s; }
.avao span:nth-child(4) { animation-delay: -6.6s; }
@keyframes sheen {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 100% 100%; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-2.2vh) rotate(1.2deg); }
}

.chrome {
  background: linear-gradient(150deg,
    #ffffff 0%, #e4e5e8 22%, #b3b6ba 42%, #f4f5f7 58%, #cdcfd2 76%, #ffffff 96%);
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: sheen 11s ease-in-out infinite;
}

.landing-tag {
  position: absolute; left: 0; right: 0; bottom: 26px; text-align: center;
  color: #6e6e78; font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
}

/* glass auth card */
.auth {
  position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%);
  width: min(620px, 92vw);
  max-height: 86vh; overflow-y: auto;
  background: rgba(10, 10, 12, 0.66);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 24px;
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  box-shadow: 0 40px 90px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 44px 56px 48px;
  color: #e8e8ea;
}
.auth-tabs { display: flex; justify-content: center; gap: 42px; margin-bottom: 34px; position: relative; }
.auth-tab {
  background: none; border: 0; cursor: pointer;
  font-size: 34px; font-weight: 700; color: #3c3c42; padding: 0 2px 12px;
  font-family: inherit; transition: color .25s;
  border-bottom: 3px solid transparent;
}
.auth-tab.active { color: #fff; border-bottom: 3px solid #ff5a1f; }
.auth-close {
  position: absolute; right: -22px; top: -6px;
  background: none; border: 0; color: #4a4a52; font-size: 26px; cursor: pointer;
}
.auth-close:hover { color: #9a9aa4; }
.auth label { display: block; margin: 0 0 18px; }
.auth .flabel { display: block; font-size: 13px; color: #8d8d96; margin: 0 0 7px 4px; }
.auth input[type=email], .auth input[type=password], .auth input[type=text] {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px; color: #f2f2f4; font-size: 16px; font-family: inherit;
  outline: none;
}
.auth input::placeholder { color: #6e6e78; }
.auth input:focus { border-color: rgba(255,122,24,.55) !important; }
.pw-wrap { position: relative; }
.pw-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: #8d8d96; cursor: pointer; font-size: 17px;
}
.auth-cta {
  width: 100%; margin: 10px 0 26px; padding: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 46%),
    linear-gradient(135deg, #ff7a18, #ff3d00);
  border: 1px solid rgba(255,255,255,.16) !important;
  color: #fff; border: 0; border-radius: 12px;
  font-size: 17px; font-weight: 600; cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 28px rgba(255, 80, 20, .3);
  transition: transform .15s, box-shadow .15s;
}
.auth-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(255, 80, 20, .4); }
.socials { display: flex; justify-content: center; gap: 18px; }
.social {
  width: 96px; height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #d9d9df; transition: background .2s, border-color .2s, color .2s;
}
.social:hover { background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.07)); border-color: rgba(255,255,255,.22); color: #fff; }
.auth-hint { text-align: center; color: #6e6e78; font-size: 12.5px; margin-top: 22px; }
.auth-guest { display: block; margin: 12px auto 0; background: none; border: 0; color: #9a9aa4; font-size: 13px; cursor: pointer; font-family: inherit; padding: 6px; }
.auth-guest:hover { color: #fff; }

/* ============================================================
   APP SCREENS — dark glass, chrome accents
   ============================================================ */

/* inline icons */
.ic { vertical-align: -3px; flex: none; }
.note .ic { margin-right: 8px; vertical-align: -3.5px; }
h2 .ic { stroke: #cfd0d6; margin-right: 7px; vertical-align: -1.5px; }
.chip .ic { vertical-align: -2.5px; margin-right: 6px; stroke: var(--orange); }
.backbtn .ic { vertical-align: -2.5px; }
.bigtick .ic { stroke: var(--green); }
.ne-meta .ic { vertical-align: -2px; margin-right: 4px; }
.btn .ic { margin-right: 7px; }

.screen { width: min(560px, 94vw); margin: 26px auto 60px; }
.screen.wide { width: min(880px, 96vw); }

.topbar { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 12px; color: var(--faint); font-size: 14px; }
.backbtn { background: none; border: 0; color: var(--muted); font-size: 14.5px; cursor: pointer; padding: 4px 6px; font-family: inherit; transition: color .15s; }
.backbtn:hover { color: #fff; }
.brandmark { font-size: 14px; color: var(--faint); }
.brandmark b {
  font-family: "Michroma", "Chakra Petch", sans-serif;
  letter-spacing: .14em; font-weight: 400;
  background: linear-gradient(150deg, #fff 0%, #cdcfd2 45%, #f4f5f7 70%, #b3b6ba 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.clock { font-variant-numeric: tabular-nums; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 28px 30px 30px;
}
.card + .card { margin-top: 16px; }
.kicker { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; font-weight: 600; opacity: .85; }
h2 {
  margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.005em;
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  background: linear-gradient(150deg, #ffffff 0%, #e3e4e7 35%, #b9bcc0 60%, #f4f5f7 85%);
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 11s ease-in-out infinite;
}
h3 { margin: 24px 0 10px; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.sub { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }

.field { display: block; margin: 0 0 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }

/* onboarding logo upload */
.logo-drop {
  border: 1.5px dashed rgba(255,255,255,.2); border-radius: 12px;
  background: rgba(255,255,255,.03); min-height: 100px; margin: 4px 0 10px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; padding: 12px;
}
.logo-drop:hover { background: rgba(255,255,255,.06); }
.logo-drop img { max-height: 84px; max-width: 78%; object-fit: contain; }
.logo-hint { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.logo-hint .ic { stroke: var(--muted); }
/* uploaded site logo on the admin dashboard */
.site-logo { max-height: 42px; max-width: 190px; object-fit: contain; display: block; margin: 0 0 12px; }

/* onboarding: per-system inspection-period chips */
.sys-row { border-bottom: 1px solid var(--line-soft); }
.sys-row:last-of-type { border-bottom: 0; }
.sys-row .tog-row { border-bottom: 0; }
.period-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 2px 12px; }
.period-chip {
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted);
  border-radius: 99px; padding: 6px 14px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.period-chip:hover { color: #fff; }
.period-chip.on { background: rgba(255,122,24,.16); color: var(--orange); border-color: rgba(255,122,24,.45); }
.flabel { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 13px 14px; font-size: 15.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,.05); color: var(--ink);
  outline: none; transition: border-color .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: rgba(255,122,24,.55); background: rgba(255,255,255,.08); }
input:disabled { color: var(--muted); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: #16161a; color: var(--ink); }
textarea { resize: vertical; min-height: 72px; }

.btn {
  display: block; width: 100%; padding: 14px; margin-top: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 46%),
    linear-gradient(135deg, var(--orange), var(--orange2));
  color: #fff; border: 1px solid rgba(255,255,255,.16); border-radius: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer; font-family: inherit;
  box-shadow: 0 10px 26px rgba(255, 80, 20, .26), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .15s, box-shadow .15s, background .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 30px rgba(255, 80, 20, .36), inset 0 1px 0 rgba(255,255,255,.28); }
.btn.ghost, .btn.subtle {
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  color: var(--ink);
  border: 1px solid var(--line); font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 6px 18px rgba(0,0,0,.3);
}
.btn.ghost:hover, .btn.subtle:hover { background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06)); transform: none; filter: none; border-color: rgba(255,255,255,.2); }
.btn.danger {
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 46%),
    linear-gradient(135deg, #e0414e, #b91f2e);
  box-shadow: 0 10px 26px rgba(220, 50, 60, .25), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn.danger:hover { box-shadow: 0 14px 30px rgba(220, 50, 60, .35), inset 0 1px 0 rgba(255,255,255,.22); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }

.note { border-radius: 11px; padding: 12px 15px; font-size: 13.5px; margin: 14px 0; border: 1px solid transparent; }
.note.amber { background: var(--amber-bg); color: var(--amber); border-color: rgba(255,170,40,.18); }
.note.red { background: var(--red-bg); color: var(--red); border-color: rgba(255,70,80,.2); }
.note.blue { background: var(--blue-bg); color: var(--blue); border-color: rgba(120,130,255,.18); }
.note.green { background: var(--green-bg); color: var(--green); border-color: rgba(60,200,120,.18); }

/* role selector */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
/* if there's an odd number of tiles, centre the lone last one at the same width */
.role-grid > .role-tile:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }
.role-tile {
  text-align: left; padding: 20px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
  cursor: pointer; font-family: inherit;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.role-tile:hover {
  border-color: rgba(255,122,24,.5); background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
  transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 34px rgba(0,0,0,.45);
}
.role-tile .rt-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(255,255,255,.2), rgba(255,255,255,.04) 60%, rgba(255,255,255,.1));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px rgba(0,0,0,.35);
  color: #e2e3e8;
}
.role-tile .rt-name { font-weight: 700; font-size: 16px; margin: 12px 0 3px; color: #fff; }
.role-tile .rt-desc { font-size: 13px; color: var(--muted); }
.chip {
  display: inline-block; background: rgba(255,255,255,.06); border: 1px solid var(--line-soft);
  border-radius: 99px; padding: 5px 13px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px;
}

/* overall compliance score ring */
.score-card {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  padding: 16px 18px; margin: 16px 0 6px;
}
.score-ringbox { flex: none; width: 92px; height: 92px; }
.score-ring { width: 92px; height: 92px; display: block; }
.score-ring .sr-num { fill: #fff; font-size: 30px; font-weight: 800; font-family: "Segoe UI", system-ui, sans-serif; }
.score-ring .sr-pct { fill: var(--muted); font-size: 15px; font-weight: 700; }
.score-info { flex: 1; min-width: 0; }
.score-title { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.score-info .pill { display: inline-block; }
.score-sub { font-size: 12.5px; color: var(--muted); margin-top: 9px; }

/* calendar (addendum colour coding, dark-tuned) */
.cal { margin: 14px 0 6px; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-head span { text-align: center; font-size: 11px; color: var(--faint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-tile {
  aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
  background: rgba(255,255,255,.05); color: var(--muted);
  transition: transform .12s, filter .12s;
}
.cal-tile:not(.blank):not(.weekend):hover { transform: scale(1.07); filter: brightness(1.15); }
.cal-tile.blank { background: transparent; cursor: default; }
.cal-tile.completed { background: linear-gradient(160deg, #2db368, #1c8a4c); color: #fff; box-shadow: 0 4px 14px rgba(40,170,100,.25); }
.cal-tile.na { background: var(--red-bg); color: var(--red); border-color: var(--red-strong); }
.cal-tile.missed { background: linear-gradient(160deg, #e0414e, #b92836); color: #fff; box-shadow: 0 4px 14px rgba(220,60,70,.25); }
.cal-tile.weekend { background: rgba(255,255,255,.025); color: #4d4e58; cursor: default; }
.cal-tile.future { background: rgba(255,255,255,.03); color: #4d4e58; }
.cal-tile.today { background: linear-gradient(160deg, #8d7bf5, #6a55e8); color: #fff; box-shadow: 0 0 0 3px rgba(141,123,245,.3), 0 4px 16px rgba(120,100,240,.35); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 13px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend i { width: 11px; height: 11px; border-radius: 3.5px; display: inline-block; }
.lg-done { background: #2db368; }
.lg-na { background: var(--red-bg); border: 1.5px solid var(--red-strong); }
.lg-missed { background: #d8434f; }
.lg-today { background: var(--purple); }
.lg-weekend { background: rgba(255,255,255,.08); }

/* signature pad */
.sigbox { position: relative; border: 1.5px dashed rgba(255,255,255,.18); border-radius: 11px; background: rgba(255,255,255,.04); }
canvas.sig { width: 100%; height: 140px; display: block; touch-action: none; }
.sig-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--faint); pointer-events: none; font-size: 14px; }
.sig-clear {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: 7px;
  font-size: 12px; padding: 4px 10px; cursor: pointer; color: var(--muted); font-family: inherit;
}
.sig-clear:hover { color: #fff; }

/* checklist */
.chk-group { margin-top: 18px; }
.chk-item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.chk-item:last-child { border-bottom: 0; }
.chk-code { font-size: 11px; color: var(--faint); width: 46px; flex: none; padding-top: 3px; }
.chk-text { flex: 1; font-size: 14.5px; }
.chk-btns { display: flex; gap: 6px; flex: none; }
.pfn {
  min-width: 40px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
  cursor: pointer; font-size: 12.5px; font-weight: 700; font-family: inherit; color: var(--muted);
  transition: all .15s;
}
.pfn .ic { vertical-align: -2.5px; }
.pfn:hover { background: rgba(255,255,255,.09); color: #fff; }
.pfn.on-pass { background: var(--green-bg); color: var(--green); border-color: rgba(70,201,126,.55); }
.pfn.on-fail { background: var(--red-bg); color: var(--red); border-color: rgba(255,85,98,.55); }
.pfn.on-na   { background: var(--red-bg); color: var(--red); border-color: rgba(255,85,98,.55); font-weight: 800; }

.na-reason-row { width: 100%; display: flex; gap: 8px; margin-top: 9px; }
.na-reason-row input { flex: 1; padding: 9px 11px; font-size: 13.5px; border-color: rgba(255,85,98,.4); }
.na-reason-row .minibtn { flex: none; color: var(--red); border-color: rgba(255,85,98,.4); }

.progress { height: 7px; background: rgba(255,255,255,.07); border-radius: 99px; margin: 14px 0 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange2)); border-radius: 99px; transition: width .25s; }
.prog-label { font-size: 12.5px; color: var(--muted); }

/* stats row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stat {
  background: rgba(255,255,255,.045); border: 1px solid var(--line-soft);
  border-radius: 13px; padding: 15px 10px; text-align: center;
}
.stat-v { font-size: 27px; font-weight: 800; color: #fff; }
.stat-l { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.stat.green .stat-v { color: var(--green); }
.stat.red .stat-v { color: var(--red); }
.stat.amber .stat-v { color: var(--amber); }
.stat.purple .stat-v { color: var(--purple); }

/* lists & tables */
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line-soft); }
.row:last-child { border-bottom: 0; }
.row .r-main { flex: 1; }
.row .r-title { font-weight: 600; font-size: 14.5px; color: #fff; }
.row .r-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pill { font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.pill.green { background: var(--green-bg); color: var(--green); border-color: rgba(70,201,126,.25); }
.pill.red { background: var(--red-bg); color: var(--red); border-color: rgba(255,85,98,.25); }
.pill.amber { background: var(--amber-bg); color: var(--amber); border-color: rgba(255,170,40,.25); }
.pill.grey { background: rgba(255,255,255,.06); color: var(--muted); border-color: var(--line-soft); }
.pill.purple { background: rgba(141,123,245,.14); color: var(--purple); border-color: rgba(141,123,245,.3); }
.pill.blue { background: var(--blue-bg); color: var(--blue); border-color: rgba(120,130,255,.28); }

/* operator hub — fleet site cards */
.fleet-site { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; background: rgba(255,255,255,.03); }
.fleet-site.active { border-color: rgba(255,122,24,.45); background: rgba(255,122,24,.06); }
.fleet-site .ie-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fleet-site .ie-title { font-weight: 600; font-size: 14.5px; color: #fff; }
.fleet-site .ie-title .ic { vertical-align: -2px; stroke: var(--orange); margin-right: 2px; }
.fs-bits { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 9px 0 2px; }
.fs-meta { font-size: 12.5px; color: var(--muted); }

/* operator hub — sidebar layout (/admin/dashboard) */
.hub { display: flex; gap: 16px; align-items: flex-start; }
.hub-sidebar {
  width: 210px; flex: none; position: sticky; top: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 14px; display: flex; flex-direction: column; min-height: 360px;
}
.hub-nav { display: flex; flex-direction: column; gap: 4px; }
.hub-nav-label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); padding: 4px 10px 8px; }
.hub-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 12px; border: 0; background: none; border-radius: 10px;
  color: var(--muted); font-family: inherit; font-size: 14px; cursor: pointer; transition: all .15s;
}
.hub-nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.hub-nav button.active { background: rgba(255,122,24,.14); color: var(--orange); font-weight: 600; }
.hub-side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.hub-side-foot .ic { vertical-align: -2px; margin-right: 4px; }
.hub-side-foot .hsf-id { color: var(--orange); font-weight: 600; margin: 3px 0 10px; font-variant-numeric: tabular-nums; }
.hub-main { flex: 1; min-width: 0; }

/* operator data table */
.dtable { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.dtable th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 600; }
.dtable td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; font-size: 13.5px; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable tr.row-active td { background: rgba(255,122,24,.05); }
.dtable .dt-site { font-weight: 600; color: #fff; }
.dtable .num { font-variant-numeric: tabular-nums; }
.ov-chip {
  display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0;
  padding: 5px 9px; border-radius: 7px; border: 1px solid rgba(255,85,98,.4);
  background: var(--red-bg); color: var(--red); font-size: 11.5px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all .15s;
}
.ov-chip:hover { background: rgba(255,85,98,.18); }
.ov-chip .ic { stroke: var(--red); }

/* flashing "daily check outstanding" reminder */
.flash-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--amber-bg); border: 1px solid rgba(255,170,40,.38); color: var(--amber);
  border-radius: 11px; padding: 12px 15px; margin: 14px 0; font-size: 13.5px;
  animation: flashPulse 2.2s ease-in-out infinite;
}
.flash-banner.overdue {
  background: var(--red-bg); border-color: rgba(255,85,98,.5); color: var(--red);
  animation: flashPulseRed 1.3s ease-in-out infinite;
}
.flash-banner .ic { flex: none; }
.flash-banner .fb-text { flex: 1; min-width: 170px; font-weight: 600; }
.flash-banner .fb-btn {
  flex: none; border: 1px solid currentColor; background: transparent; color: inherit;
  border-radius: 8px; padding: 7px 13px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.flash-banner .fb-btn:hover { background: rgba(255,255,255,.1); }
@keyframes flashPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,170,40,0); }
  50%      { box-shadow: 0 0 0 7px rgba(255,170,40,.10); }
}
@keyframes flashPulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,85,98,0); opacity: 1; }
  50%      { box-shadow: 0 0 0 8px rgba(255,85,98,.14); opacity: .93; }
}
@media (prefers-reduced-motion: reduce) { .flash-banner { animation: none; } }

/* modal */
.modal-back {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 20px;
}
.modal-card {
  width: min(520px, 94vw); max-height: 90vh; overflow-y: auto;
  background: rgba(18,18,22,.96); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 40px 90px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 26px 28px 28px;
}
.modal-card h2 { font-size: 22px; }

@media (max-width: 760px) {
  .hub { flex-direction: column; }
  .hub-sidebar { width: 100%; position: static; min-height: 0; }
  .hub-nav { flex-direction: row; flex-wrap: wrap; }
  .hub-nav button { width: auto; }
  .hub-side-foot { display: none; }
  .dtable th:nth-child(2), .dtable td:nth-child(2) { display: none; }
}

.kv { width: 100%; border-collapse: collapse; margin: 14px 0; }
.kv td { padding: 10px 4px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv td:first-child { color: var(--muted); width: 38%; }
.kv td:last-child { text-align: right; font-weight: 600; color: #fff; }

/* confirmation tick */
.bigtick {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--green-bg); border: 1px solid rgba(70,201,126,.35);
  color: var(--green); font-size: 34px;
  display: flex; align-items: center; justify-content: center; margin: 18px auto 14px;
  box-shadow: 0 0 40px rgba(60,200,120,.18);
}
.center { text-align: center; }
h2.center { margin-left: auto; margin-right: auto; }

/* toggles */
.tog-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line-soft); }
.tog-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: rgba(255,255,255,.12); border-radius: 99px; cursor: pointer; transition: background .2s; }
.switch i::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: left .2s; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.switch input:checked + i { background: linear-gradient(135deg, var(--orange), var(--orange2)); }
.switch input:checked + i::after { left: 23px; }

/* admin tab bar */
.tabbar {
  display: flex; gap: 4px;
  background: rgba(14, 14, 18, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.55);
  padding: 7px; margin-top: 16px; position: sticky; bottom: 12px;
}
.tabbar button { flex: 1; padding: 10px 4px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 11.5px; color: var(--muted); transition: all .15s; }
.tabbar button:hover { color: #fff; }
.tabbar button.active { background: rgba(255,122,24,.14); color: var(--orange); font-weight: 700; }
.tabbar button .ti { display: block; margin-bottom: 3px; line-height: 1; }

/* photo thumbs */
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.thumb-add {
  width: 64px; height: 64px; border-radius: 10px; border: 1.5px dashed rgba(255,255,255,.2);
  background: rgba(255,255,255,.04); color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.thumb-add:hover { background: rgba(255,255,255,.08); color: #fff; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: rgba(24, 24, 30, 0.92); color: #fff;
  border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 12px 20px; border-radius: 12px;
  font-size: 14px; opacity: 0; transition: all .3s; z-index: 99; max-width: 86vw;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.green { background: rgba(25, 95, 55, 0.92); border-color: rgba(70,201,126,.3); }
.toast.red { background: rgba(140, 30, 40, 0.92); border-color: rgba(255,85,98,.3); }

/* N/A log entries */
.na-entry { border: 1px solid rgba(255,85,98,.3); background: rgba(255,70,80,.06); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.na-entry .ne-date { font-weight: 700; font-size: 14px; color: var(--red); }
.na-entry .ne-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.na-entry .ne-actions { margin-top: 10px; display: flex; gap: 8px; }
.minibtn {
  font-size: 12px; padding: 6px 13px; border-radius: 8px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  cursor: pointer; font-family: inherit; color: var(--ink);
  transition: all .15s;
}
.minibtn:hover { border-color: rgba(255,122,24,.55); background: rgba(255,255,255,.09); }
.minibtn.warn { color: var(--red); border-color: rgba(255,85,98,.35); }

/* issue log entries */
.issue-entry { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; background: rgba(255,255,255,.03); }
.issue-entry.open { border-color: rgba(255,170,40,.3); background: rgba(255,170,40,.06); }
.issue-entry.resolved { border-color: rgba(70,201,126,.3); background: rgba(60,200,120,.06); }
.issue-entry .ie-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.issue-entry .ie-title { font-weight: 600; font-size: 14.5px; color: #fff; }
.issue-entry .ie-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.issue-entry .ie-resolved { font-size: 12.5px; color: var(--green); margin-top: 9px; }
.issue-entry .ie-resolved .ic { vertical-align: -2px; margin-right: 4px; }
.issue-entry .ne-actions { margin-top: 10px; }

@media print {
  body { background: #fff; }
  .topbar, .tabbar, .btn, .backbtn, .ambient, .noprint { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ddd; background: #fff; color: #111; }
}

@media (max-width: 640px) {
  .auth { padding: 32px 24px 36px; }
  .auth-tab { font-size: 26px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .chk-btns { width: 100%; justify-content: flex-end; }
}
