/* The Business app (ui/company-ui.js) inside the phone: your company, its till, every company in Buea. */
.co { --up: #16a34a; --down: #dc2626; font-family: var(--ui); }
.co .up { color: var(--up); } .co .down { color: var(--down); }
.co button { font-family: var(--ui); cursor: pointer; }
.co-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; background: #e6eaf0; border-radius: 999px; padding: 3px; margin-bottom: 12px; }
.co-tabs button { position: relative; border: 0; border-radius: 999px; background: none; padding: 8px 2px; font: 800 11.5px var(--ui); color: var(--muted); white-space: nowrap; }
.co-dot { position: absolute; top: 5px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
.co-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.co-card { background: #fff; border-radius: 18px; padding: 13px 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.co-hero, .co-port { background: linear-gradient(135deg, #172554, #1e3a8a 60%, #1d4ed8); color: #fff; border-radius: 20px; padding: 15px 16px; margin-bottom: 12px; box-shadow: 0 8px 22px rgba(30,58,138,.3); }
.co-hero span { font: 700 11.5px var(--ui); opacity: .8; } .co-hero b { display: block; font: 800 21px var(--ui); letter-spacing: -.3px; margin: 3px 0 5px; }
.co-hero p { font: 600 12.5px/1.45 var(--ui); opacity: .88; margin: 0; }
.co-need b { display: block; font: 800 13.5px var(--ui); color: var(--ink); } .co-need span { display: block; font: 600 11.5px/1.4 var(--ui); color: var(--muted); margin-top: 5px; }
.co-last { font: 600 12.5px/1.4 var(--ui); color: var(--ink); }
.co-h { color: var(--muted); font: 800 11px var(--ui); text-transform: uppercase; letter-spacing: .05em; margin: 14px 2px 8px; }
.co-type { display: grid; grid-template-columns: 42px minmax(0, 1fr) 12px; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; margin-bottom: 8px; border: 0; border-radius: 16px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.co-type > em { font-style: normal; font-size: 20px; color: var(--muted); }
.co-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: #eef2ff; flex: none; }
.co-ic.big { width: 52px; height: 52px; border-radius: 15px; font-size: 28px; }
.co-nm { min-width: 0; } .co-nm strong { display: block; font: 800 14px var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-nm em { display: block; font: 600 11.5px var(--ui); color: var(--muted); font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-nums { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; } .co-nums i { font: 600 11px var(--ui); font-style: normal; color: var(--muted); } .co-nums b { color: var(--ink); font-weight: 800; }
.co-note { font: 600 11.5px/1.45 var(--ui); color: var(--muted); margin: 8px 2px; }
.co-top { display: flex; align-items: center; gap: 12px; margin: 2px 0 10px; } .co-top strong { display: block; font: 800 17px var(--ui); } .co-top em { display: block; font: 600 12px var(--ui); color: var(--muted); font-style: normal; }
.co-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; }
.co-facts span { display: block; font: 600 10.5px var(--ui); color: var(--muted); } .co-facts b { display: block; font: 800 15px var(--ui); } .co-facts em { display: block; font: 600 10px/1.3 var(--ui); color: var(--muted); font-style: normal; }
.co-sheet { background: #fff; border-radius: 18px; padding: 14px; margin: 6px 0 12px; box-shadow: 0 4px 18px rgba(0,0,0,.1); }
.co-st { display: block; font: 800 15px var(--ui); margin-bottom: 8px; }
.co-lbl { display: block; font: 800 12px var(--ui); color: var(--ink); margin: 4px 2px 6px; } .co-lbl small { font-weight: 600; color: var(--muted); }
.co-in { display: flex; align-items: center; gap: 8px; background: #f2f4f7; border-radius: 14px; padding: 2px 14px; margin-bottom: 8px; }
.co-in input { flex: 1; min-width: 0; border: 0; background: none; font: 800 18px var(--ui); color: var(--ink); padding: 10px 0; outline: none; } .co-in span { font: 800 13px var(--ui); color: var(--muted); }
.co-chips { display: flex; gap: 6px; margin: 2px 0 8px; } .co-chips button { flex: 1; border: 0; border-radius: 999px; background: #eef2f6; padding: 9px 0; font: 800 12px var(--ui); color: var(--ink); }
.co-est { display: flex; justify-content: space-between; gap: 8px; font: 600 12px var(--ui); color: var(--muted); margin: 4px 2px; } .co-est b { color: var(--ink); text-align: right; }
.co-warn { font: 700 11.5px var(--ui); color: var(--down); margin: 4px 2px; }
.co-sheet .primary { margin: 10px 0 0; }
.co-cancel { display: block; width: 100%; border: 0; background: none; color: var(--muted); font: 700 13px var(--ui); padding: 10px 0 2px; }
.co-ph { display: flex; align-items: center; gap: 11px; } .co-ph .co-ic { background: rgba(255,255,255,.16); }
.co-ph strong { display: block; font: 800 17px var(--ui); word-break: break-word; } .co-ph em { display: block; font: 600 12px var(--ui); opacity: .8; font-style: normal; }
.co-pill { display: inline-block; font: 800 11.5px var(--ui); font-style: normal; border-radius: 999px; padding: 5px 10px; margin: 10px 0 8px; background: rgba(255,255,255,.16); }
.co-pill.ok { background: rgba(134,239,172,.22); color: #bbf7d0; } .co-pill.done { background: rgba(255,255,255,.18); } .co-pill.bad { background: #fee2e2; color: #b91c1c; }
.co-pill.sm { margin: 0; padding: 3px 8px; font-size: 10.5px; }
.co-l { display: block; font: 600 11.5px/1.4 var(--ui); opacity: .82; }
.co-till { display: block; font: 800 28px var(--ui); letter-spacing: -.5px; margin: 1px 0 4px; } .co-till small { font: 700 13px var(--ui); opacity: .75; }
.co-row { display: flex; justify-content: space-between; align-items: baseline; } .co-row b { font: 800 14px var(--ui); } .co-row span { font: 700 12px var(--ui); color: var(--muted); }
.co-bar { display: block; height: 6px; border-radius: 3px; background: #e5e7eb; margin: 8px 0; overflow: hidden; } .co-bar i { display: block; height: 100%; background: #3b82f6; border-radius: 3px; }
.co-bar.ok i { background: #22c55e; } .co-bar.mid i { background: #f59e0b; } .co-bar.bad i { background: #ef4444; }
.co-cond { font: 800 14px var(--ui) !important; } .co-cond.ok { color: #15803d !important; } .co-cond.mid { color: #b45309 !important; } .co-cond.bad { color: #b91c1c !important; }
.co-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .co-split span { display: block; font: 600 10.5px var(--ui); color: var(--muted); } .co-split b { display: block; font: 800 13.5px var(--ui); }
.co-btn { display: block; width: 100%; border: 0; border-radius: 999px; background: #1e293b; color: #fff; font: 800 13px var(--ui); padding: 11px; margin-top: 4px; } .co-btn:disabled { opacity: .4; }
.co-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.co-act button { border: 0; border-radius: 999px; padding: 13px 6px; font: 800 14px var(--ui); color: #fff; } .co-in-b { background: #1d4ed8; } .co-out-b { background: #22b573; } .co-act button:disabled { opacity: .35; }
.co-led > div { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 9px 12px; margin-bottom: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.co-led span { flex: 1; min-width: 0; } .co-led b { display: block; font: 700 12.5px/1.3 var(--ui); color: var(--ink); } .co-led em { display: block; font: 600 10.5px var(--ui); color: var(--muted); font-style: normal; }
.co-led i { font: 800 13px var(--ui); font-style: normal; white-space: nowrap; }
.co-close { display: block; width: 100%; border: 2px solid #fecaca; border-radius: 999px; background: #fff; color: #b91c1c; font: 800 13px var(--ui); padding: 11px; margin: 14px 0 4px; }
.co-close.armed { background: #dc2626; border-color: #dc2626; color: #fff; }
.co-li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 9px 12px; margin-bottom: 7px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.co-li .co-nm { flex: 1; } .co-rank { width: 18px; font: 800 12px var(--ui); color: var(--muted); text-align: center; flex: none; }
.co-li .co-ic { width: 36px; height: 36px; border-radius: 11px; font-size: 19px; }
/* phases 2 and 3: staff, jobs, rankings, shops */
.co-stars { color: #f59e0b; font-weight: 800; white-space: nowrap; } .co-port .co-stars { color: #fcd34d; }
.co-sub { margin: -2px 0 8px; } .co-sub span { font: 700 11.5px var(--ui) !important; }
.co-split + .co-split { margin-top: 8px; }
.co-rep { display: flex; gap: 8px; align-items: baseline; margin-top: 10px; font: 600 11.5px/1.4 var(--ui); color: var(--muted); } .co-rep .co-stars { font-size: 14px; }
.co-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .co-badges i { font: 800 11px var(--ui); font-style: normal; background: #fef3c7; color: #92400e; border-radius: 999px; padding: 4px 9px; }
.co-act.sm { margin: 10px 0 6px; } .co-act.sm button { padding: 10px 6px; font-size: 12.5px; }
.co-on { background: #16a34a; } .co-off { background: #e6eaf0; color: var(--ink) !important; }
.co-person { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid #eef1f5; }
.co-person .co-nm { flex: 1; } .co-av { width: 28px; text-align: center; font-size: 16px; flex: none; }
.co-mini { border: 0; border-radius: 999px; background: #1d4ed8; color: #fff; font: 800 12px var(--ui); padding: 8px 12px; white-space: nowrap; flex: none; }
.co-mini.ghost { background: #eef2f6; color: var(--ink); } .co-mini.armed { background: #dc2626; color: #fff; } .co-mini:disabled { opacity: .4; }
.co-h.sm { margin: 10px 0 2px; font-size: 10.5px; }
.co-sheet.in { box-shadow: none; background: #f6f8fb; margin: 10px 0 4px; }
.co-li.me { box-shadow: inset 0 0 0 2px #93c5fd, 0 1px 3px rgba(0,0,0,.06); }
.co-li > b { font: 800 13px var(--ui); white-space: nowrap; }
.co-col { flex-direction: column; align-items: stretch; gap: 6px; }
.co-lrow { display: flex; align-items: center; gap: 10px; } .co-lrow .co-nm { flex: 1; } .co-lrow.end { justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.co-rt { text-align: right; flex: none; } .co-rt em { display: block; font: 600 10px var(--ui); color: var(--muted); font-style: normal; } .co-rt .co-stars { font-size: 12.5px; }
.co-pill.hire { background: #dcfce7; color: #15803d; }
.co-mine { font: 800 12px var(--ui); font-style: normal; color: #15803d; padding: 8px 4px; }
.co-rate { display: flex; margin-right: auto; } .co-rate button { border: 0; background: none; font-size: 21px; line-height: 1; padding: 4px 2px; color: #d1d5db; } .co-rate button.on { color: #f59e0b; }
.co-filter { display: flex; gap: 6px; margin: 12px 0 2px; } .co-filter button { flex: 1; border: 0; border-radius: 999px; background: #eef2f6; padding: 8px 0; font: 800 12.5px var(--ui); color: var(--ink); }
.co-filter button.on { background: #1e293b; color: #fff; }
.co-shops > b { font: 800 14px var(--ui); } .co-shops .co-note { margin: 4px 0 6px; }
.co-shop { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #eef1f5; } .co-shop > span:first-child { width: 26px; text-align: center; font-size: 18px; }
.co-shop b { display: block; font: 800 12.5px var(--ui); } .co-shop em { display: block; font: 600 10.5px var(--ui); color: var(--muted); font-style: normal; }
.co-live { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; } .co-live.on { background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }
/* step A: the building in town */
.co-build { box-shadow: inset 0 0 0 2px #c4b5fd, 0 1px 3px rgba(0,0,0,.06); } .co-build > b { display: block; font: 800 14px var(--ui); color: var(--ink); }
.co-btn.go { background: #7c3aed; }
/* step B: working at the building (ui/company-work.js) - the bar at the top and the task above the bottom bar, like a job shift's */
#coWorkHud { display: none; position: fixed; left: 50%; top: calc(62px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 29; width: min(440px, calc(100vw - 24px));
  box-sizing: border-box; padding: 9px 12px; border-radius: 16px; background: rgba(46, 16, 101, .9); color: #fff; font-family: var(--ui, system-ui);
  grid-template-columns: auto 1fr; gap: 10px; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
#coWorkHud.on { display: grid; } #coWorkHud > b { font-size: 24px; }
#coWorkHud strong { display: block; font: 800 14px var(--ui, system-ui); } #coWorkHud span { display: block; font: 600 12px var(--ui, system-ui); color: #ddd6fe; }
#coWorkHud .sh-bar { display: block; height: 5px; margin-top: 6px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; }
#coWorkHud .sh-bar u { display: block; height: 100%; background: #a78bfa; transition: width .5s linear; }
#coTask { display: none; position: fixed; left: 50%; bottom: calc(222px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 31; width: min(420px, calc(100vw - 24px));
  box-sizing: border-box; padding: 12px; border-radius: 18px; background: #f5f3ff; color: #2e1065; border: 2px solid #7c3aed; font-family: var(--ui, system-ui);
  grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; box-shadow: 0 10px 28px rgba(0,0,0,.3); }
#coTask.on { display: grid; animation: tcIn .18s ease-out; } #coTask > b { font-size: 30px; }
#coTask strong { display: block; font: 800 15px var(--ui, system-ui); } #coTask span { font: 700 12px var(--ui, system-ui); color: #6d28d9; }
#coTask button { border: 0; border-radius: 12px; padding: 11px 16px; background: #7c3aed; color: #fff; font: 800 14px var(--ui, system-ui); } #coTask button:disabled { opacity: .6; }
/* step C: ordering at a company's counter (ui/company-shop.js) - a sheet from the bottom */
#coShop { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(8,14,24,.5); align-items: flex-end; justify-content: center; font-family: var(--ui, system-ui); }
#coShop.open { display: flex; }
#coShop button { font-family: var(--ui, system-ui); cursor: pointer; }
.cs-box { width: min(480px, 100vw); max-height: 84vh; overflow: auto; box-sizing: border-box; background: #f4f6fa; border-radius: 22px 22px 0 0; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); }
.cs-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .cs-hd > span { font-size: 28px; } .cs-hd > div { flex: 1; min-width: 0; }
.cs-hd strong { display: block; font: 800 17px var(--ui, system-ui); color: #0f1d33; } .cs-hd em { display: block; font: 600 12px var(--ui, system-ui); color: #5d6a80; font-style: normal; }
.cs-hd button { border: 0; border-radius: 50%; width: 36px; height: 36px; background: #e6eaf0; font: 800 15px var(--ui, system-ui); }
.cs-note { font: 600 12.5px/1.45 var(--ui, system-ui); color: #5d6a80; margin: 4px 2px 10px; }
.cs-item { display: grid; grid-template-columns: 40px 1fr 14px; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 16px; background: #fff; padding: 10px 12px; margin-bottom: 7px; text-align: left; box-shadow: 0 1px 3px rgba(0,0,0,.06); color: #0f1d33; }
.cs-item > span:first-child { font-size: 24px; text-align: center; } .cs-item strong { display: block; font: 800 14px var(--ui, system-ui); } .cs-item em { display: block; font: 700 12px var(--ui, system-ui); color: #15803d; font-style: normal; }
.cs-item i { font-style: normal; color: #5d6a80; font-size: 18px; }
.cs-pick, .cs-wait, .cs-done, .cs-closed { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.cs-pick > span, .cs-wait > b, .cs-done > b, .cs-closed > b { font-size: 28px; } .cs-pick strong, .cs-wait strong, .cs-done strong, .cs-closed strong { display: block; font: 800 14.5px var(--ui, system-ui); color: #0f1d33; }
.cs-pick em, .cs-wait span, .cs-done span, .cs-closed span { display: block; font: 600 12px/1.4 var(--ui, system-ui); color: #5d6a80; font-style: normal; }
.cs-wait, .cs-done, .cs-closed { flex-wrap: wrap; } .cs-wait > strong, .cs-done > strong, .cs-closed > strong { flex: 1; } .cs-wait > span, .cs-done > span, .cs-closed > span { flex-basis: 100%; }
.cs-lbl { font: 800 12px var(--ui, system-ui); color: #0f1d33; margin: 10px 2px 6px; }
.cs-chips, .cs-places { display: flex; flex-wrap: wrap; gap: 6px; } .cs-places { max-height: 34vh; overflow: auto; }
.cs-chips button, .cs-places button { border: 0; border-radius: 999px; background: #fff; padding: 8px 12px; font: 700 12.5px var(--ui, system-ui); color: #0f1d33; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.cs-chips button.on, .cs-places button.on { background: #7c3aed; color: #fff; }
.cs-paints { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; } .cs-paints button { aspect-ratio: 1; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cs-paints button.on { border-color: #7c3aed; transform: scale(1.12); }
.cs-in { width: 100%; box-sizing: border-box; border: 0; border-radius: 12px; background: #fff; padding: 12px; font: 800 20px var(--ui, system-ui); letter-spacing: .12em; text-transform: uppercase; }
.cs-btn { display: block; width: 100%; border: 0; border-radius: 999px; padding: 13px; margin-top: 10px; font: 800 15px var(--ui, system-ui); color: #fff; background: #7c3aed; } .cs-btn:disabled { opacity: .5; }
.cs-btn.ghost { background: transparent; color: #5d6a80; margin-top: 4px; }
.cs-rate { display: flex; justify-content: center; gap: 4px; } .cs-rate button { border: 0; background: none; font-size: 36px; color: #f59e0b; padding: 4px; }
/* step D: the owner runs the shop */
.co-chips.wrap { flex-wrap: wrap; } .co-chips.wrap button { flex: 0 0 auto; padding: 8px 12px; }
.co-chips button.on { background: #7c3aed; color: #fff; }
.co-in.sm input { font-size: 15px; font-weight: 700; }
.co-signs { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; } .co-signs button { aspect-ratio: 1; border: 3px solid #fff; border-radius: 10px; background: #eef2ff; font-size: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.2); padding: 0; }
.co-signs button.on { border-color: #7c3aed; transform: scale(1.1); }
.co-pill.promo { background: #fef3c7; color: #92400e; }
body:has(#phoneBack.open) #coWorkHud, body:has(#phoneBack.open) #coTask, body.map-open #coWorkHud, body.map-open #coTask { display: none; } /* (the phone or the map on top) */
