/* Arizona Pontoon Time Clock. Colors, fonts and components copied from the Estimate Builder (ap-estimates) styles.css. */
@font-face { font-family: Montserrat; font-weight: 400; src: url(/fonts/montserrat-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Montserrat; font-weight: 600; src: url(/fonts/montserrat-latin-600-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Montserrat; font-weight: 700; src: url(/fonts/montserrat-latin-700-normal.woff2) format("woff2"); font-display: swap; }
:root { --navy: #1C4587; --gold: #FBBC04; --goldfill: #FFD966; --gray: #EFEFEF; --red: #D00000; --ink: #111; --muted: #595959; --line: #BFBFBF; --green: #1E7B34; --cyan: #00B8F8; }
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--ink); font: 15px/1.4 Montserrat, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--navy); }
.top { background: var(--navy); padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.logo { height: 30px; width: auto; max-width: 58vw; display: block; }
.topr { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.appname { color: #F1C232; font-size: 10.5px; font-weight: 700; letter-spacing: .8px; }
.who { color: #fff; font-size: 11px; font-weight: 600; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 3px 9px; white-space: nowrap; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
.who:empty { display: none; }
.tabs { display: flex; background: var(--gray); position: sticky; top: 0; z-index: 5; border-bottom: 2px solid var(--navy); overflow-x: auto; }
.tabs:empty { display: none; }
.tabs a { flex: 1; text-align: center; white-space: nowrap; text-decoration: none; padding: 12px 8px; font: 600 13px Montserrat, Arial; color: var(--navy); }
.tabs a.on { background: var(--navy); color: var(--gold); }
main { padding: 12px 12px 60px; max-width: 760px; margin: 0 auto; }
body.wide main { max-width: 1180px; }
.bar { background: var(--navy); color: var(--gold); font-weight: 700; font-size: 12.5px; letter-spacing: .5px; text-align: center; padding: 6px 8px; margin: 18px 0 10px; text-transform: uppercase; }
main > .bar:first-child { margin-top: 4px; }
.row { display: flex; align-items: center; } .wrap { flex-wrap: wrap; } .gap { gap: 8px; } .grow { flex: 1; } .between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.fld { display: flex; flex-direction: column; gap: 3px; flex: 1 1 100%; min-width: 0; margin: 4px 0; }
.fld.sm { flex: 1 1 140px; }
.fld span { font-size: 11.5px; font-weight: 700; color: var(--navy); }
.fld input, .fld select, .fld textarea, .inp { font: 16px Montserrat, Arial; padding: 9px 10px; border: 1px solid var(--line); border-bottom: 2px solid var(--navy); border-radius: 4px; background: #fff; width: 100%; color: var(--ink); }
.fld textarea { min-height: 70px; resize: vertical; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--navy); font-weight: 600; }
.chk input { width: 20px; height: 20px; accent-color: var(--navy); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font: 700 14px Montserrat, Arial; border-radius: 6px; text-decoration: none; cursor: pointer; text-align: center; }
.btn.primary { background: var(--navy); color: #fff; } .btn.gold { background: var(--goldfill); border-color: var(--gold); color: var(--ink); }
.btn.sm { min-height: 36px; padding: 5px 10px; font-size: 13px; } .btn.danger { color: var(--red); border-color: var(--red); } .btn.dangerfill { background: var(--red); border-color: var(--red); color: #fff; }
.btn.big { min-height: 64px; font-size: 18px; width: 100%; border-radius: 10px; }
.btn.link { border: 0; background: none; padding: 4px 0; min-height: 30px; text-decoration: underline; font-weight: 600; font-size: 13px; }
.btn[disabled] { opacity: .45; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); font-size: 12.5px; } .small { font-size: 12px; } .center { text-align: center; } .red { color: var(--red); } .right { text-align: right; }
.chip { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; background: var(--gray); color: var(--muted); white-space: nowrap; }
.chip-open { background: #DCE6F7; color: var(--navy); } .chip-prog { background: var(--goldfill); color: var(--ink); } .chip-done { background: #D7F0DD; color: var(--green); }
.chip-edited { background: #FFF3CD; color: #7A5B00; } .chip-oh { background: var(--gray); color: var(--muted); } .chip-sample { background: #FFE0E0; color: var(--red); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; background: #222; color: #fff; padding: 10px 14px; border-radius: 6px; font-size: 14px; z-index: 80; max-width: 90vw; }
[hidden] { display: none !important; }
.warn { background: #FFF3CD; border-left: 4px solid var(--gold); padding: 8px 10px; font-size: 13px; margin: 6px 0; }
.card { border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 4px; padding: 10px 12px; margin: 8px 0; }
.card.click { cursor: pointer; }
.card-h { font-weight: 700; } .card-sub { color: var(--muted); font-size: 13px; }

/* crew status */
.status { background: var(--navy); color: #fff; border-radius: 10px; padding: 16px; margin: 6px 0 10px; border-left: 8px solid var(--gold); }
.status.off { background: var(--gray); color: var(--navy); border-left-color: var(--line); }
.status .lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; color: var(--gold); text-transform: uppercase; }
.status.off .lbl { color: var(--muted); }
.status .job { font-size: 22px; font-weight: 700; line-height: 1.2; margin: 4px 0 2px; overflow-wrap: anywhere; }
.status .sub { font-size: 13px; opacity: .9; }
.status .timer { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--goldfill); margin-top: 6px; letter-spacing: 1px; }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px; }
.tot { background: var(--goldfill); border-bottom: 2px solid var(--gold); padding: 8px 10px; border-radius: 4px; }
.tot b { display: block; font-size: 22px; } .tot span { font-size: 11.5px; font-weight: 700; color: var(--navy); text-transform: uppercase; }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.names .btn { min-height: 70px; font-size: 17px; }
.pick { display: flex; flex-direction: column; gap: 6px; }
.pick button { text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 4px; background: #fff; padding: 10px 12px; font: 600 15px Montserrat, Arial; color: var(--ink); cursor: pointer; }
.pick button.oh { border-left-color: var(--gold); }
.pick button small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.pick button.cur { background: #EEF3FB; }

/* work order / items */
.wo-big { font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.wo-num { color: var(--navy); font-weight: 700; font-size: 13px; letter-spacing: .5px; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #E3E3E3; font-size: 16px; }
.items li input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--navy); flex: 0 0 auto; }
.items li.done span { text-decoration: line-through; color: var(--muted); }
.edit-items li { gap: 6px; padding: 6px 0; }
.edit-items li .inp { flex: 1; padding: 7px 8px; font-size: 15px; }
.ib { width: 36px; height: 36px; border-radius: 6px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font: 700 16px/1 Montserrat, Arial; cursor: pointer; flex: 0 0 auto; }
.ib.x { color: var(--red); border-color: var(--red); }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { background: var(--navy); color: #fff; padding: 7px 8px; text-align: left; font-weight: 700; white-space: nowrap; }
.tbl td { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.tbl td.n, .tbl th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr.sum td { background: var(--goldfill); font-weight: 700; }
.tbl tr.sub td { background: #F7F9FD; color: var(--muted); font-size: 12.5px; }
.tbl tr.daysum td { background: var(--gray); font-weight: 700; color: var(--navy); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.kpi { border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 4px; padding: 8px 10px; }
.kpi b { display: block; font-size: 22px; color: var(--ink); } .kpi span { font-size: 11.5px; color: var(--navy); font-weight: 700; text-transform: uppercase; }
.kpi.gold { background: var(--goldfill); border-top-color: var(--gold); }
.barg { height: 10px; background: var(--gray); border-radius: 5px; overflow: hidden; min-width: 80px; }
.barg i { display: block; height: 100%; background: var(--navy); }
.seg { display: inline-flex; border: 1.5px solid var(--navy); border-radius: 6px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: #fff; color: var(--navy); font: 700 13px Montserrat, Arial; padding: 8px 12px; cursor: pointer; } .seg button.on { background: var(--navy); color: #fff; }

/* floor board */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.bcard { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.bcard .bh { background: var(--navy); color: #fff; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.bcard .bh .dot { width: 10px; height: 10px; border-radius: 50%; background: #5BD97A; display: inline-block; margin-right: 6px; }
.bcard.off .bh { background: var(--gray); color: var(--muted); }
.bcard .bb { padding: 10px 12px; }
.bcard .bjob { font-weight: 700; font-size: 16px; }
.bcard .btime { font-size: 24px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }

/* bottom sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(10, 25, 55, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 12px; } }
.sheet-h { font-weight: 700; color: var(--navy); font-size: 18px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pinpad button { min-height: 58px; font: 700 22px Montserrat, Arial; border: 1.5px solid var(--navy); border-radius: 8px; background: #fff; color: var(--navy); }
.pindots { text-align: center; font-size: 30px; letter-spacing: 10px; color: var(--navy); min-height: 42px; }

/* scanner */
.scanbox { position: relative; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 62vh; margin: 0 auto; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanbox .aim { position: absolute; inset: 18%; border: 4px solid var(--gold); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }

/* ---------- print sheets (8.5 x 11) ---------- */
.printbar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 10px; background: var(--gray); border-bottom: 2px solid var(--navy); position: sticky; top: 0; z-index: 5; }
body.printing { background: #8a8f99; }
body.printing main { max-width: none; padding: 16px 0 40px; }
.page { width: 8.5in; height: 11in; padding: 0.425in 0.4in; margin: 0 auto 20px; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); display: flex; flex-direction: column; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ph { background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0.16in 0.22in; border-bottom: 0.07in solid var(--gold); }
.ph img { height: 0.5in; width: auto; }
.ph .phr { text-align: right; }
.ph .phr .t { color: var(--gold); font-weight: 700; font-size: 11pt; letter-spacing: 1.5px; }
.ph .phr .n { color: #fff; font-weight: 700; font-size: 22pt; line-height: 1.1; }
.ptop { display: flex; gap: 0.25in; margin-top: 0.2in; align-items: stretch; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plabel { color: var(--navy); font-weight: 700; font-size: 9.5pt; letter-spacing: 1px; text-transform: uppercase; }
.pcust { font-weight: 700; font-size: 34pt; line-height: 1.05; color: #000; margin: 0.02in 0 0.12in; overflow-wrap: anywhere; }
.pcust.long { font-size: 26pt; } .pcust.xlong { font-size: 20pt; }
.pboat { font-weight: 600; font-size: 15pt; color: #000; margin: 0.02in 0 0.1in; }
.pmeta { display: grid; grid-template-columns: auto 1fr; gap: 0.03in 0.15in; font-size: 11pt; margin-top: auto; border-top: 1.5px solid var(--navy); padding-top: 0.08in; }
.pmeta b { color: var(--navy); }
.pqr { width: 3.15in; flex: 0 0 auto; border: 3px solid var(--navy); border-radius: 6px; display: flex; flex-direction: column; align-items: center; padding: 0.08in 0.08in 0; }
.pqr svg { width: 2.75in; height: 2.75in; display: block; }
.pqr .scan { background: var(--navy); color: var(--gold); font-weight: 700; font-size: 11pt; text-align: center; padding: 0.07in; letter-spacing: .5px; align-self: stretch; margin: 0.05in -0.08in 0; line-height: 1.2; }
.pqr .code { font-size: 8pt; color: var(--muted); margin-top: 0.02in; }
.pbar { background: var(--navy); color: var(--gold); font-weight: 700; font-size: 12pt; letter-spacing: 1px; padding: 0.06in 0.15in; margin: 0.2in 0 0.04in; display: flex; justify-content: space-between; }
.pbar span:last-child { color: #fff; font-weight: 600; font-size: 10pt; }
.plist { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; overflow: hidden; }
.plist li { display: flex; align-items: center; gap: 0.16in; border-bottom: 1px solid #9AA6BD; padding: 0.075in 0.05in; font-size: 15pt; font-weight: 600; line-height: 1.2; break-inside: avoid; }
.plist li .bx { width: 0.3in; height: 0.3in; border: 2.5px solid #000; border-radius: 3px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 16pt; line-height: 1; }
.plist li .num { color: var(--navy); font-weight: 700; width: 0.3in; flex: 0 0 auto; text-align: right; }
.plist.m li { font-size: 12.5pt; padding: 0.05in 0.05in; } .plist.m li .bx { width: 0.24in; height: 0.24in; }
.plist.s { columns: 2; column-gap: 0.25in; } .plist.s li { font-size: 11pt; padding: 0.035in 0.03in; } .plist.s li .bx { width: 0.2in; height: 0.2in; border-width: 2px; }
.plist li.blank { height: 0.42in; }
.pcont { font-weight: 700; font-size: 16pt; margin-top: 0.12in; }
.pnotes { border: 1.5px solid var(--navy); border-radius: 4px; padding: 0.06in 0.1in; font-size: 10.5pt; margin-top: 0.1in; }
.pfoot { margin-top: 0.1in; display: flex; justify-content: space-between; font-size: 8.5pt; color: var(--navy); font-weight: 600; border-top: 2px solid var(--navy); padding-top: 0.05in; }
/* overhead poster */
.poster { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.poster .plabel { font-size: 14pt; }
.poster .pname { font-weight: 700; font-size: 44pt; line-height: 1.05; margin: 0.08in 0 0.2in; }
.poster .pqr { width: 5.6in; padding: 0.15in 0.15in 0; }
.poster .pqr svg { width: 5.2in; height: 5.2in; }
.poster .pqr .scan { font-size: 18pt; padding: 0.12in; margin: 0.1in -0.15in 0; }
.poster .how { font-size: 12.5pt; margin-top: 0.2in; color: #000; max-width: 6.5in; }
@page { size: letter portrait; margin: 0.4in; }
@media print {
  html, body, body.printing { background: #fff; }
  .top, .tabs, .printbar, .toast, .sheet-bg, .noprint { display: none !important; }
  body.printing main { padding: 0; }
  .page { width: auto; height: 10.15in; padding: 0; margin: 0; box-shadow: none; page-break-after: always; break-after: page; }
  .page:last-child { page-break-after: auto; break-after: auto; }
}
