/* Nieves Site: same look as the business dashboard (site-office boards, safety-yellow accent). */
:root {
  color-scheme: light;
  --bg: #F3F4F1; --panel: #FFFFFF; --ink: #1C2228; --muted: #5C6670; --line: #D8DCD6;
  --accent: #E5A21A; --accent-ink: #1C2228; --blue: #1F4E79; --track: #E6E9E4;
  --good: #2E7D4F; --bad: #B3362C; --shade: rgba(20, 24, 28, .45);
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #12161A; --panel: #1A2026; --ink: #E6E9EB; --muted: #9BA5AE; --line: #2B333B;
  --accent: #F0B33A; --accent-ink: #12161A; --blue: #79AEE0; --track: #262E36;
  --good: #5CC08A; --bad: #F07A6F; --shade: rgba(0, 0, 0, .6); color-scheme: dark } }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
img { max-width: 100%; }
.wrap { max-width: 60rem; margin-inline: auto; padding-block: 16px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: 2rem; line-height: 1.05; } h2 { font-size: 1.4rem; } h3 { font-size: 1.15rem; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); } .note { font-size: .85rem; } .num { font-variant-numeric: tabular-nums; } .nowrap { white-space: nowrap; }
button { font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 9px 14px; font-weight: 600; }
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); }
.btn.link { border: 0; background: none; padding: 4px 0; color: var(--blue); }
.btn.big { font-family: var(--display); font-size: 1.7rem; padding: 18px 34px; border-radius: 12px; min-width: min(100%, 16rem); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.scan { align-items: center; text-align: center; padding: 22px 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 12px; }
.stat .v { font-family: var(--display); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.v.bad { color: var(--bad); } .v.good { color: var(--good); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabbtn { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.tabbtn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--track); color: var(--muted); white-space: nowrap; }
.chip.ok { background: transparent; color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.chip.late { background: var(--accent); color: var(--accent-ink); }
.chip.warn { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.chip.step { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.row-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ledger-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th.r, td.r { text-align: right; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--track); }
tfoot td { font-weight: 600; border-bottom: 0; }
.who-row { display: flex; align-items: center; gap: 10px; min-width: 9rem; }
.av { width: 2.3rem; height: 2.3rem; border-radius: 50%; object-fit: cover; flex: none; background: var(--track); display: inline-block; }
.empty { padding: 26px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.banner { border: 1px solid var(--accent); background: var(--panel); border-radius: var(--r); padding: 12px 14px; }
.attn { border-color: var(--bad); }
.flags { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.weeknav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 12px; }
.tile { all: unset; box-sizing: border-box; cursor: pointer; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.tile:hover { border-color: var(--muted); } .tile:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .flabel { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field input, .field select { font: inherit; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-width: 0; width: 100%; }
.peso { position: relative; } .peso::before { content: "₱"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.peso input { padding-left: 26px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 10px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.err { color: var(--bad); font-size: .88rem; min-height: 1.1em; margin: 0; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.actions .spacer { flex: 1; }
.shade { position: fixed; inset: 0; background: var(--shade); display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); z-index: 20; }
.dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; width: min(100%, 30rem); max-height: 100%; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair figure { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pair img, .pair .ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--bg); }
.pair .ph { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pair figcaption { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.who { font-family: var(--display); font-size: 1.8rem; font-weight: 600; line-height: 1.1; }
.big-sm { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.faces { display: flex; gap: 8px; flex-wrap: wrap; }
.faces img { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.shot { width: 100%; max-height: 45vh; object-fit: contain; border-radius: 8px; background: var(--bg); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); gap: 10px 16px; margin: 0; }
.kv dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.kv dd { margin: 2px 0 0; }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.auth { max-width: 24rem; margin: 6vh auto 0; width: 100%; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-weight: 600; z-index: 30; max-width: calc(100% - 32px); text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
select.proj { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); max-width: 100%; }
@media (max-width: 520px) { .hide-sm { display: none; } h1 { font-size: 1.7rem; } }
@media (prefers-reduced-motion: no-preference) { .btn { transition: border-color .15s; } }
