/* CRM Ops phone app. Colours follow the Ops Board: black + gold brand, purple same-day check-in, red urgent
   maintenance (and Bag Run problems, as on the board), yellow inventory, teal maintenance, blue owner stays. */
:root {
  --fg: #111; --muted: #5a5a5a; --bg: #fff; --panel: #f4f2ec; --line: #c9c6bd;
  --gold: #BEAF87; --black: #000;
  --ok: #1a7f37; --ret: #7a4cc2; --bad: #d0342c; --warn: #b35900;
  --same: #6f3cc3; --inv: #f2c200; --mnt: #0b7285; --own: #2f6fd1;
  --tabs-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
body { font: 16px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-text-size-adjust: 100%; font-variant-numeric: tabular-nums; overscroll-behavior-y: contain; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.app { min-height: 100%; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: var(--black); color: #fff; padding: calc(var(--safe-t) + 8px) 12px 8px; }
.top-row { display: flex; align-items: center; gap: 8px; }
.brand { font-family: Georgia, "Times New Roman", serif; letter-spacing: .08em; font-size: 1.05rem; color: var(--gold); border: 2px solid var(--gold); border-radius: 6px; padding: 1px 6px; }
.top-title { flex: 1; min-width: 0; }
.top-kicker { display: block; font-size: .72rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.top h1 { margin: 0; font: 400 1.25rem/1.15 Georgia, "Times New Roman", serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 44px; height: 44px; border-radius: 10px; border: 2px solid #444; background: #111; color: var(--gold); font-size: 1.3rem; }
.chip { min-width: 52px; height: 44px; padding: 0 10px; border-radius: 10px; border: 2px solid var(--gold); background: #000; color: var(--gold); font-weight: 800; letter-spacing: .04em; }
.sync { display: block; width: 100%; margin-top: 6px; padding: 5px 8px; border: 0; border-radius: 8px; background: #1f1f1f; color: #ddd; font-size: .82rem; text-align: left; }
.sync.ok { color: #cfe9d5; } .sync.warn { background: #4a3000; color: #ffd8a8; } .sync.bad { background: #5c1410; color: #ffd0cc; }
.ptr { height: 0; overflow: hidden; text-align: center; color: var(--muted); font-size: .85rem; transition: height .15s; }
.ptr.on { height: 36px; line-height: 36px; }
.main { flex: 1; padding: 10px 12px calc(var(--tabs-h) + var(--safe-b) + 18px); outline: none; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: #000; padding: 4px 2px var(--safe-b); border-top: 2px solid var(--gold); }
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 4px 0; border: 0; border-radius: 8px; background: transparent; color: #bbb; font-size: .68rem; font-weight: 600; }
.tabs .ti { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabs button[aria-current="page"] { color: #000; background: var(--gold); }

.msg { padding: 22px 8px; text-align: center; color: var(--muted); }
.msg.ok { color: var(--ok); font-weight: 700; } .msg.bad { color: var(--bad); font-weight: 700; }
.banner { margin: 0 0 10px; padding: 9px 11px; border-radius: 10px; background: var(--panel); border-left: 6px solid var(--gold); font-size: .92rem; }
.banner.warn { border-left-color: var(--warn); background: #fff2e0; } .banner.bad { border-left-color: var(--bad); background: #fde8e6; }
.banner strong { font-weight: 800; }
h2.sec { margin: 18px 0 6px; font-size: 1.05rem; }

/* Day navigation */
.daynav { display: grid; grid-template-columns: 52px 1fr 52px; gap: 6px; align-items: stretch; margin-bottom: 8px; }
.daynav button { min-height: 48px; border: 2px solid #000; border-radius: 10px; background: #fff; font-size: 1.15rem; font-weight: 700; }
.daynav button:disabled { opacity: .35; }
.daynav .mid { font-size: .95rem; line-height: 1.15; background: #000; color: var(--gold); border-color: var(--gold); }
.daynav .mid small { display: block; color: #fff; font-weight: 400; font-size: .78rem; }

/* Counts */
.counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 8px; }
.count { padding: 7px 4px; border-radius: 10px; background: var(--panel); text-align: center; }
.count strong { display: block; font: 400 1.35rem/1.1 Georgia, serif; }
.count span { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.count .bar { height: 5px; margin: 5px 4px 0; border-radius: 9px; background: #ddd; overflow: hidden; }
.count .bar i { display: block; height: 100%; background: var(--ok); }
.count.dlv .bar i { background: var(--ok); } .count.pku .bar i { background: var(--mnt); } .count.ret .bar i { background: var(--ret); }
.summary { margin: 0 0 8px; font-size: .9rem; color: var(--muted); }
.summary b { color: var(--fg); } .summary .same { color: var(--same); font-weight: 800; }
.runstat { display: inline-block; margin: 0 0 8px; padding: 3px 9px; border-radius: 8px; font-weight: 700; font-size: .88rem; }
.runstat.ok { background: var(--ok); color: #fff; } .runstat.bad { background: var(--bad); color: #fff; }

/* Turnover list (phone version of the board table) */
.area { margin: 14px 0 6px; padding: 4px 8px; border-radius: 6px; background: #000; color: var(--gold); font-weight: 800; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.thead, .trow { display: grid; grid-template-columns: 1fr repeat(4, 46px); gap: 3px; align-items: stretch; }
.thead { position: sticky; top: var(--top-h, 100px); z-index: 5; background: var(--bg); padding: 4px 0; font-size: .56rem; line-height: 1.1; hyphens: manual; overflow-wrap: anywhere; font-weight: 800; text-align: center; color: var(--muted); letter-spacing: .02em; }
.thead span:first-child { text-align: left; padding-left: 4px; }
.trow { margin: 0 0 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.trow:nth-of-type(even) { background: #eaf1fa; }
.trow.own { background: var(--own) !important; color: #fff; border-color: var(--own); }
.trow.same .tunit { box-shadow: inset 6px 0 0 var(--same); padding-left: 11px; }
.tunit { min-width: 0; padding: 5px 6px; border: 0; background: transparent; text-align: left; border-radius: 8px; }
.tunit b { display: block; font-size: 1rem; line-height: 1.2; }
.tunit .lin { display: block; margin-top: 2px; font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow.own .tunit .lin { color: #e5edff; }
.flags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.flag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.flag.same { background: var(--same); color: #fff; } .flag.inv { background: var(--inv); color: #000; }
.flag.mnt { background: var(--mnt); color: #fff; } .flag.urgent { background: var(--bad); color: #fff; }
.flag.own { background: #fff; color: var(--own); } .flag.note { background: #fff3bf; color: #6b4a00; }
.flag.short { background: var(--warn); color: #fff; } .flag.issue { background: var(--bad); color: #fff; } .flag.miss { background: #fff; color: var(--warn); border: 1px solid var(--warn); }
.cell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; border: 2px solid #d0cdc4; border-radius: 8px; background: #fff; color: #000; font-weight: 800; font-size: 1.05rem; padding: 0; }
.cell small { font-size: .6rem; font-weight: 700; line-height: 1.1; }
.cell.on { background: #d3ecd9; border-color: var(--ok); color: #0d4d20; }
.cell.ret.on { background: #e8dcf7; border-color: var(--ret); color: #3d1f70; }
.cell.dlv { background: #d3ecd9; border-color: var(--ok); } .cell.pku { background: #cfe8ec; border-color: var(--mnt); }
.cell.late { background: var(--bad); border-color: var(--bad); color: #fff; } .cell.rdy { color: var(--mnt); }
.cell.ro { border-style: dashed; cursor: default; }
.cell.wait { border-style: dotted; opacity: .75; }
.cell:disabled { opacity: .5; }
.trow.own .cell:not(.on):not(.dlv):not(.pku):not(.late) { background: #e7eefc; }
.detail { grid-column: 1 / -1; margin: 2px 2px 4px; padding: 8px 9px; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--fg); font-size: .9rem; }
.lingrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 0 8px; }
.lingrid div { padding: 4px; border-radius: 6px; background: var(--panel); text-align: center; }
.lingrid b { display: block; font-size: 1.1rem; } .lingrid span { font-size: .66rem; font-weight: 800; color: var(--muted); }
.totals { margin: 10px 0 0; padding: 9px 10px; border-radius: 10px; background: #000; color: var(--gold); font-weight: 700; }
.totals .lingrid div { background: #1d1d1d; } .totals .lingrid span { color: #bbb; } .totals .lingrid b { color: var(--gold); }

/* Generic cards, buttons, panels */
.card { border: 2px solid #cfcabc; border-radius: 12px; padding: 10px 11px; margin: 0 0 8px; background: #fff; }
.card.done { border-color: var(--ok); background: #eef8f0; }
.card.overdue { border-color: var(--bad); background: #fbe1df; }
.card.has-issue { border-color: var(--bad); }
.card.owner { box-shadow: inset 6px 0 0 var(--own); }
.card h3 { margin: 0; font-size: 1.15rem; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px; }
.state { margin: 6px 0; font-size: .95rem; }
.state small { color: var(--muted); }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.go { flex: 1 1 7rem; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 0; border-radius: 10px; color: #fff; background: var(--ok); font-weight: 800; }
.go strong { font-size: 1.1rem; }
.go.pick { background: var(--mnt); } .go.bad { background: var(--bad); } .go.dark { background: #000; color: var(--gold); }
.sub { min-height: 46px; padding: 6px 12px; border: 2px solid #8d8a82; border-radius: 10px; background: #fff; font-weight: 600; }
.go:disabled, .sub:disabled { opacity: .45; }
.panel { margin-top: 8px; padding: 9px; border-radius: 10px; background: var(--panel); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel.bad { background: #fde8e6; } .panel.warn { background: #fff2e0; }
.panel p { margin: 0; flex-basis: 100%; }
.num { width: 5.5em; min-height: 48px; font-size: 1.3rem; text-align: center; border: 2px solid #000; border-radius: 8px; background: #fff; }
.text { flex: 1 1 100%; min-width: 0; min-height: 46px; padding: 8px 10px; border: 2px solid #8d8a82; border-radius: 8px; background: #fff; font-size: 1rem; }
select.text { appearance: auto; }
.pend { margin: 6px 0 0; font-weight: 700; font-size: .9rem; color: var(--warn); }
.pend.refused { color: var(--bad); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: #eee; }
.tag.own { background: var(--own); color: #fff; } .tag.same { background: var(--same); color: #fff; }
.tag.pk { background: var(--ok); color: #fff; } .tag.nopk { background: var(--warn); color: #fff; }
.chipw { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: .75rem; font-weight: 800; color: #fff; background: var(--ok); }
.chipw.warn { background: var(--warn); } .chipw.bad { background: var(--bad); }
.issue { margin: 6px 0; padding: 7px 9px; border-radius: 8px; background: #fbe1df; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.issue strong { color: var(--bad); }
.note { margin: 6px 0; padding: 7px 9px; border-radius: 8px; background: #f4efe0; font-size: .92rem; }
.note.warn { background: #ffe6c7; } .note.warn strong { color: var(--warn); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin: 6px 0 10px; }
.seg button { min-height: 50px; padding: 4px; border: 2px solid #000; border-radius: 10px; background: #fff; font-weight: 800; font-size: .88rem; line-height: 1.15; }
.seg button strong { display: block; font: 400 1.2rem Georgia, serif; }
.seg button[aria-pressed="true"] { background: #000; color: var(--gold); border-color: var(--gold); }
.seg.drop button[aria-pressed="true"].drop { background: var(--ok); color: #fff; border-color: var(--ok); }
.seg.drop button[aria-pressed="true"].pick { background: var(--mnt); color: #fff; border-color: var(--mnt); }
.stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.stat { flex: 1 1 6rem; padding: 6px 9px; border-radius: 10px; background: var(--panel); }
.stat strong { display: block; font: 400 1.35rem/1.1 Georgia, serif; }
.stat span { font-size: .78rem; color: var(--muted); }
.stat.warn strong { color: var(--warn); } .stat.bad strong { color: var(--bad); } .stat.ok strong { color: var(--ok); }
.window { margin: 6px 0; padding: 8px 10px; border-radius: 10px; border-left: 6px solid var(--ok); background: var(--panel); font-size: .92rem; }
.window.warn { border-left-color: var(--warn); } .window.bad { border-left-color: var(--bad); }
.bldg { margin: 14px 0 6px; padding: 6px 10px; border-radius: 8px; background: #000; color: var(--gold); font-size: 1rem; display: flex; justify-content: space-between; }
.bldg small { color: #ddd; font-weight: 400; }

/* Week */
.week { display: grid; gap: 8px; }
.wday { width: 100%; text-align: left; border: 2px solid #9c988d; border-radius: 12px; padding: 9px 10px; background: #fff; }
.wday.today { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold); }
.wday h3 { margin: 0; display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; }
.wday h3 small { color: var(--muted); font-weight: 400; font-size: .82rem; }
.wn { font: 400 1.5rem Georgia, serif; }
.wbar { display: grid; grid-template-columns: 5.5em 1fr auto; align-items: center; gap: 6px; font-size: .82rem; margin-top: 3px; }
.wbar .bar { height: 7px; border-radius: 9px; background: #ddd; overflow: hidden; } .wbar .bar i { display: block; height: 100%; background: var(--ok); }
.wbar.ret .bar i { background: var(--ret); }
.wunits { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: .88rem; }
.wunits li { display: flex; justify-content: space-between; gap: 6px; font-weight: 700; }
.wunits li.own { color: var(--own); }
.wunits .m { white-space: nowrap; } .wunits .p { color: var(--ok); } .wunits .r { color: var(--ret); } .wunits .b { color: var(--mnt); }
.wunits .iv { color: #000; background: var(--inv); border-radius: 999px; padding: 0 5px; font-size: .75rem; margin-left: 3px; }
.wunits .mt { color: #fff; background: var(--mnt); border-radius: 999px; padding: 0 5px; font-size: .75rem; margin-left: 3px; } .wunits .mt.urgent { background: var(--bad); }

/* Inventory + maintenance + work orders */
.list { display: grid; gap: 8px; }
.unitcard { border: 2px solid #cfcabc; border-radius: 12px; padding: 9px 10px; background: #fff; }
.unitcard h3 { margin: 0 0 4px; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.unitcard h3 small { font-weight: 400; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--bad); margin-right: 6px; }
.need { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid #eee; }
.need:first-of-type { border-top: 0; }
.need .t { font-weight: 700; color: var(--bad); } .need.done .t { color: var(--ok); text-decoration: line-through; }
.need small { display: block; color: var(--muted); font-size: .76rem; font-weight: 400; text-decoration: none; }
.tick { min-width: 108px; min-height: 48px; padding: 4px 10px; border: 2px solid #000; border-radius: 10px; background: #fff; font-weight: 800; font-size: .9rem; }
.tick.on { background: var(--ok); color: #fff; border-color: var(--ok); }
.tick.wait { border-style: dashed; }
.packtbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.packtbl th, .packtbl td { border-bottom: 1px solid #e3e0d8; padding: 7px 4px; text-align: left; vertical-align: top; }
.packtbl td.n { text-align: center; font-weight: 800; width: 3em; } .packtbl td.u { font-size: .8rem; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 4px 0 8px; }
.tile { padding: 9px 10px; border: 2px solid #cfcabc; border-radius: 12px; background: #fff; text-align: left; }
.tile strong { display: block; font: 400 1.7rem/1 Georgia, serif; }
.tile span { font-size: .8rem; color: var(--muted); }
.tile.hot strong { color: var(--bad); } .tile.good strong { color: var(--ok); }
.row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px; margin: 0 0 6px; border: 2px solid #ddd9cf; border-radius: 10px; background: #fff; text-align: left; }
.row .grow { flex: 1; min-width: 0; }
.row .grow b { display: block; } .row .grow small { display: block; color: var(--muted); font-size: .8rem; }
.row .n { min-width: 2.1em; padding: 2px 6px; border-radius: 999px; background: #eee; text-align: center; font-weight: 800; font-size: .85rem; }
.row .n.hot { background: var(--bad); color: #fff; } .row .n.chk { background: var(--mnt); color: #fff; } .row .n.ok { background: var(--ok); color: #fff; }
.row.closed { opacity: .65; }
.bhead { margin: 14px 0 6px; padding: 5px 9px; border-radius: 8px; background: #000; color: var(--gold); font-weight: 800; font-size: .9rem; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: #e9e7e0; white-space: nowrap; }
.pill.fixed { background: var(--ok); color: #fff; } .pill.urgent { background: var(--bad); color: #fff; } .pill.check { background: var(--mnt); color: #fff; }
.pill.p1 { background: var(--bad); color: #fff; } .pill.p2 { background: #e8590c; color: #fff; } .pill.p3 { background: #1c7ed6; color: #fff; } .pill.p4 { background: #868e96; color: #fff; }
.pill.verified { background: var(--ok); color: #fff; }
.back { min-height: 44px; padding: 6px 12px; border: 2px solid #000; border-radius: 10px; background: #fff; font-weight: 700; margin-bottom: 8px; }
.facts { display: grid; gap: 6px; margin: 8px 0; }
.facts div { padding: 7px 9px; border-radius: 8px; background: var(--panel); }
.facts dt { font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; } .facts dd { margin: 0; white-space: pre-wrap; }
.photos { display: flex; flex-wrap: wrap; gap: 6px; }
.linkbtn { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 12px; margin: 6px 0; border-radius: 10px; background: #000; color: var(--gold); font-weight: 800; text-decoration: none; text-align: center; }
.linkbtn.light { background: #fff; color: #000; border: 2px solid #000; }
.checklist h4 { margin: 10px 0 2px; font-size: .9rem; } .checklist ul { margin: 0; padding-left: 1.2rem; }

/* Sheets (dialogs), toast, sign in */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { width: 100%; max-width: 32rem; max-height: 88vh; overflow: auto; padding: 16px 16px calc(16px + var(--safe-b)); border-radius: 16px 16px 0 0; background: #fff; }
.sheet-card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.sheet-card p { margin: 6px 0; }
.sheet-card .acts { margin-top: 12px; }
.field { display: grid; gap: 4px; margin: 10px 0; }
.field label { font-weight: 700; font-size: .9rem; }
.field input { min-height: 50px; padding: 8px 12px; border: 2px solid #000; border-radius: 10px; font-size: 1.15rem; }
.field input.ini { text-transform: uppercase; letter-spacing: .1em; font-weight: 800; max-width: 9rem; }
.field input.pin { letter-spacing: .4em; font-weight: 800; text-align: center; max-width: 14rem; }
.err { color: var(--bad); font-weight: 700; }
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 12px); z-index: 40; padding: 11px 13px; border-radius: 12px; background: #111; color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.toast.bad { background: var(--bad); }
.gate { max-width: 26rem; margin: 6vh auto 0; padding: 18px; border: 2px solid #000; border-radius: 16px; text-align: center; }
.gate .brand { display: inline-block; font-size: 1.6rem; padding: 2px 10px; background: #000; margin-bottom: 8px; }
.gate .field { justify-items: center; }
.small { font-size: .8rem; color: var(--muted); }
@media (min-width: 700px) { .main { max-width: 760px; margin: 0 auto; width: 100%; } .tiles { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Maintenance checklists */
.ckday { border-color: var(--mnt); }
.ckday h3 { margin-bottom: 6px; }
.row .who { min-width: 4.6em; padding: 4px 6px; border-radius: 8px; background: #000; color: var(--gold); font-weight: 800; font-size: .85rem; text-align: center; }
.ckh { margin: 8px 0 2px; font-size: 1.05rem; }
.ckarea { margin: 14px 0 6px; padding: 5px 9px; border-radius: 8px; background: var(--mnt); color: #fff; font-size: .9rem; }
.cklist { display: grid; gap: 6px; }
.ckitem { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 52px; padding: 10px; border: 2px solid #cfcabc; border-radius: 10px; background: #fff; text-align: left; font-size: .98rem; line-height: 1.3; }
.ckitem .box { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #000; border-radius: 7px; font-weight: 900; }
.ckitem.on { border-color: var(--ok); background: #eef8f0; }
.ckitem.on .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.ckitem.wait { border-style: dashed; }
.ckitem:disabled { color: inherit; opacity: .8; }
.cksubmit, .ckphoto { margin-top: 14px; }
.ckphoto .photos { margin-bottom: 8px; }
.cksubmit .cknote { display: block; box-sizing: border-box; resize: vertical; line-height: 1.4; width: 100%; min-height: 9em; margin: 6px 0; padding: 8px 10px; border: 2px solid #000; border-radius: 10px; font-size: 1rem; }
.tick.big { width: 100%; min-height: 54px; font-size: 1rem; background: #000; color: var(--gold); border-color: #000; }
.tick.big:disabled { opacity: .45; }

/* CRM 🔑 entry codes */
.keywrap { margin: 6px 0; }
.keychip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--gold); background: #000; color: var(--gold); font-weight: 800; font-size: .9rem; letter-spacing: .03em; }
.codes { margin-top: 6px; padding: 9px 11px; border-radius: 10px; background: #fffbea; border: 1px solid var(--gold); font-size: .95rem; line-height: 1.4; overflow-wrap: anywhere; }
.codewarn { margin-top: 6px; color: var(--warn); font-weight: 700; font-size: .85rem; }

.hostline { margin: 0 0 8px; font-size: .85rem; color: var(--muted); }
.hostline.bad { color: var(--bad); font-weight: 700; }

/* Dirty bags ready: lime strip, same colour as the TV board (CRM 2026-10-30) */
.bagready { margin: 0 0 10px; padding: 9px 10px; border-radius: 10px; background: #82c91e; color: #1b1b1b; display: flex; flex-direction: column; gap: 6px; }
.bagready .bry-h { font-weight: 800; letter-spacing: .02em; }
.bagready .bry-u { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; width: 100%; text-align: left; background: #fff; color: #1b1b1b; border: 0; border-radius: 8px; padding: 7px 10px; font: inherit; cursor: pointer; }
.bagready .bry-u strong { font-weight: 800; }
.bagready .bry-u small { font-size: .82rem; }
.bagready .bry-u.old { box-shadow: inset 0 0 0 3px #1b1b1b; }

.ckitem small.tm { display: block; color: var(--muted); font-size: .8em; font-weight: 400; margin-top: 2px; }

/* ===== v1.10.0 (CRM 2026-11-20): tighter layout so more units fit on a phone screen ===== */
.note.mini { padding: 5px 9px; font-size: .8rem; color: var(--muted); background: var(--panel); }
.bagready.mini { flex-direction: row; align-items: center; gap: 8px; width: 100%; border: 0; text-align: left; padding: 8px 10px; font: inherit; cursor: pointer; }
.bagready.mini strong { white-space: nowrap; font-weight: 800; }
.bagready.mini span { flex: 1; min-width: 0; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bagready.mini .go-arrow { font-size: 1.4rem; line-height: 1; }
.bagready.mini.old { box-shadow: inset 0 0 0 3px #1b1b1b; }
/* Today */
.daynav { margin-bottom: 6px; }
.daynav button { min-height: 44px; }
.hostline { margin: 0 0 6px; font-size: .78rem; }
.counts { gap: 5px; margin: 2px 0 6px; }
.count { padding: 5px 3px; }
.count strong { font-size: 1.15rem; }
.count span { font-size: .64rem; }
.cell small { font-size: .66rem; }
/* Bag Run */
.stats { gap: 5px; margin: 2px 0 6px; }
.stat { padding: 4px 8px; display: flex; align-items: baseline; gap: 6px; }
.stat strong { display: inline; font-size: 1.1rem; }
.window { padding: 6px 9px; font-size: .84rem; }
.card { padding: 8px 10px; }
.card .state { margin: 4px 0; }
.counts-row { display: grid; grid-template-columns: 74px repeat(4, 1fr); gap: 6px; align-items: stretch; margin-top: 6px; }
.counts-row .cr-label { display: flex; flex-direction: column; justify-content: center; font-weight: 800; font-size: .86rem; line-height: 1.1; color: var(--ok); }
.counts-row.pick .cr-label { color: var(--mnt); }
.counts-row .cr-label small { font-weight: 600; color: var(--muted); font-size: .72rem; }
.counts-row .go { min-height: 54px; font-size: 1.45rem; flex: none; }
.counts-row .go.more { font-size: 1.05rem; background: #fff; color: var(--ok); box-shadow: inset 0 0 0 2px var(--ok); }
.counts-row.pick .go.more { color: var(--mnt); box-shadow: inset 0 0 0 2px var(--mnt); }
.acts:empty { display: none; }
.sub.small { min-height: 38px; padding: 4px 10px; font-size: .85rem; border-width: 1.5px; }
/* Tab badges */
.tabs button { position: relative; }
.tabs .badge { position: absolute; top: 3px; left: 50%; margin-left: 6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--ok); color: #fff; font-size: .7rem; font-weight: 800; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px #000; }
.tabs .badge.bad { background: var(--bad); }
.tabs .badge.ok { background: #82c91e; color: #1b1b1b; }
/* Fix: the "📝 Note" tag picked up the big .note box style and stretched the tags beside it. */
.flags { align-items: center; }
.flag.note { margin: 0; padding: 1px 7px; border-radius: 999px; font-size: .68rem; line-height: inherit; }
/* Maintenance: the four summary tiles in one row. */
.tiles { grid-template-columns: repeat(4, 1fr) !important; gap: 5px !important; }
.tile { padding: 6px 4px !important; text-align: center; min-height: 0 !important; }
.tile strong { font-size: 1.25rem !important; }
.tile span { display: block; font-size: .66rem !important; line-height: 1.15; }
