:root{
  --ground:#f6f8f5; --card:#ffffff; --line:#e2e8e3; --line2:#cfd9d1; --ink:#10231a; --ink2:#2c3d34; --muted:#4b5d53; --faint:#5b6b62;
  --green:#1f9a48; --green-d:#15803d; --green-t:#e8f5ec; --red:#b42318; --red-t:#fdecea; --amber:#8a5a00; --amber-t:#fff4d6;
  --r:14px; --font:Inter,system-ui,-apple-system,"Segoe UI",sans-serif; --display:Poppins,var(--font);
}
*{box-sizing:border-box}
html,body{margin:0;background:#e9eee9;color:var(--ink);font-family:var(--font);font-size:15px;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--green-d)}
.shell{max-width:480px;min-height:100vh;margin:0 auto;background:var(--ground);display:flex;flex-direction:column;position:relative}
main{flex:1;padding:24px 20px 96px;display:flex;flex-direction:column;gap:18px}
h1,h2,h3{margin:0;font-family:var(--display);line-height:1.25}
h1{font-size:24px;font-weight:700} h2{font-size:17px;font-weight:600} h3{font-size:15px;font-weight:600}
p{margin:0;line-height:1.5}
.muted{color:var(--muted)} .small{font-size:13px} .tiny{font-size:12px}
.row{display:flex;align-items:center;gap:10px} .between{justify-content:space-between} .wrap{flex-wrap:wrap}
.stack{display:flex;flex-direction:column;gap:10px} .stack-l{display:flex;flex-direction:column;gap:16px}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:14px}
.card.accent{border:1.5px solid var(--green)}
.logo{display:flex;align-items:center;gap:10px}
.logo b{width:40px;height:40px;border-radius:12px;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;font-family:var(--display);font-size:22px}
.logo span{font-family:var(--display);font-weight:700;font-size:22px;color:var(--green-d)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 18px;border-radius:14px;border:0;background:var(--green);color:#fff;font-weight:600;font-size:15px;cursor:pointer;text-decoration:none}
.btn:hover{background:var(--green-d)} .btn:disabled{opacity:.55;cursor:default}
.btn.block{width:100%} .btn.sm{min-height:40px;padding:0 14px;font-size:14px;border-radius:12px}
.btn.ghost{background:#fff;color:var(--ink);border:1.5px solid var(--line2)} .btn.ghost:hover{background:#f1f5f2}
.btn.danger{background:var(--red)} .btn.danger:hover{background:#912018}
.btn.link{background:none;color:var(--green-d);min-height:44px;padding:0 6px}
.seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;background:#eef2ee;border-radius:12px;padding:4px}
.seg button{min-height:40px;border:0;border-radius:9px;background:transparent;font-weight:500;font-size:14px;color:var(--muted);cursor:pointer}
.seg button[aria-pressed="true"]{background:#fff;color:var(--ink);font-weight:600;box-shadow:0 1px 2px rgba(16,35,26,.12)}
.tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}
.tabs button{flex:none;min-height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:#fff;font-size:13.5px;font-weight:600;color:var(--muted);cursor:pointer}
.tabs button[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:#fff}
label.f{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:var(--ink2)}
.input,.f input,.f select,.f textarea{width:100%;min-height:48px;border:1.5px solid var(--line2);border-radius:12px;padding:0 14px;background:#fff;font-size:16px;font-weight:500}
.f textarea{padding:10px 14px;min-height:80px;resize:vertical}
.input:focus,.f input:focus,.f textarea:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 3px rgba(31,154,72,.15)}
.tel{display:flex;border:1.5px solid var(--line2);border-radius:12px;overflow:hidden;background:#fff}
.tel:focus-within{border-color:var(--green);box-shadow:0 0 0 3px rgba(31,154,72,.15)}
.tel span{padding:0 14px;display:flex;align-items:center;background:#f1f6f2;font-weight:600}
.tel input{border:0!important;box-shadow:none!important;flex:1;min-height:46px;padding:0 14px;font-size:16px;font-weight:500;background:#fff}
.code{letter-spacing:8px;text-align:center;font-size:24px!important;font-weight:700!important}
.err{background:var(--red-t);color:var(--red);border-radius:12px;padding:10px 12px;font-size:14px;font-weight:500}
.note{background:var(--amber-t);color:var(--amber);border-radius:12px;padding:10px 12px;font-size:13.5px;line-height:1.45}
.ok-note{background:var(--green-t);color:var(--green-d);border-radius:12px;padding:10px 12px;font-size:13.5px;line-height:1.45}
.or{display:flex;align-items:center;gap:12px;color:var(--faint);font-size:13px}.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}
.strip{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px}
.strip i{height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.tile{display:flex;flex-direction:column;align-items:center;gap:5px;padding:12px 4px 10px;border-radius:16px;text-decoration:none;text-align:center;border:0;cursor:pointer}
.tile b{font-size:12.5px;font-weight:600;line-height:1.15}
.tile small{font-size:10.5px;font-weight:600;opacity:.85}
.ic{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:none}
.list-item{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;text-decoration:none;color:inherit}
.list-item .grow{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.list-item .grow span:first-child{font-weight:600;font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px;white-space:nowrap}
.pill.pending{background:var(--amber-t);color:var(--amber)} .pill.active{background:var(--green-t);color:var(--green-d)}
.pill.rejected,.pill.suspended{background:var(--red-t);color:var(--red)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{font-size:13px;font-weight:600;padding:8px 12px;border-radius:10px;background:#fff;border:1px solid var(--line);color:var(--ink);text-decoration:none}
.chip.off{opacity:.5;text-decoration:line-through}
.tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tool{display:flex;flex-direction:column;gap:6px;align-items:flex-start;padding:12px;border-radius:14px;text-decoration:none;color:var(--ink);min-height:76px}
.tool b{font-size:14px} .tool small{font-size:11.5px;font-weight:600}
.check{display:flex;align-items:center;gap:12px;padding:12px 14px;background:#fff;border:1px solid var(--line);border-radius:14px;cursor:pointer}
.check:has(input:checked){border:2px solid var(--green);padding:11px 13px}
.check input{width:20px;height:20px;accent-color:var(--green);flex:none}
.check .grow{flex:1;display:flex;flex-direction:column;gap:1px} .check .grow b{font-size:14.5px} .check .grow span{font-size:12px;color:var(--faint)}
.toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;background:#fff;border:1px solid var(--line);border-radius:14px}
.switch{width:52px;height:30px;border-radius:15px;border:0;background:#cfd9d1;position:relative;cursor:pointer;flex:none}
.switch::after{content:"";position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:12px;background:#fff;transition:left .15s}
.switch[aria-checked="true"]{background:var(--green)} .switch[aria-checked="true"]::after{left:25px}
.topbar{display:flex;align-items:center;gap:6px;margin:-8px -8px 0}
.icon-btn{width:44px;height:44px;border:0;background:none;border-radius:12px;display:flex;align-items:center;justify-content:center;color:var(--ink);cursor:pointer;text-decoration:none}
.icon-btn:hover{background:#eef2ee}
.switcher{display:flex;align-items:center;gap:10px;min-height:52px;padding:6px 14px 6px 6px;border:1px solid var(--line);border-radius:14px;background:#fff;cursor:pointer;text-align:left;width:100%}
.switcher .grow{flex:1;display:flex;flex-direction:column}
.empty{text-align:center;padding:28px 16px;color:var(--muted);background:#fff;border:1px dashed var(--line2);border-radius:16px;display:flex;flex-direction:column;gap:8px;align-items:center}
nav.bottom{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;height:72px;background:#fff;border-top:1px solid var(--line);display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);z-index:5}
nav.bottom a{text-decoration:none;color:var(--faint);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:11.5px;font-weight:600}
nav.bottom a[aria-current="page"]{color:var(--green-d);font-weight:700}
.sheet-bg{position:fixed;inset:0;background:rgba(16,35,26,.45);z-index:20;display:flex;align-items:flex-end;justify-content:center}
.sheet{width:100%;max-width:480px;background:#fff;border-radius:24px 24px 0 0;padding:16px 20px 24px;display:flex;flex-direction:column;gap:14px;max-height:90vh;overflow:auto}
.sheet .grab{width:40px;height:4px;border-radius:2px;background:#d6dfd7;align-self:center}
.sheet .btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.toast{position:fixed;left:50%;bottom:88px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:12px 16px;border-radius:12px;font-size:14px;font-weight:500;z-index:30;max-width:92%;box-shadow:0 8px 24px rgba(0,0,0,.2)}
table.t{width:100%;border-collapse:collapse;font-size:13px} .t td,.t th{padding:8px 6px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.scroll{overflow-x:auto}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;font-size:14px} .kv dt{color:var(--faint)} .kv dd{margin:0;font-weight:500;word-break:break-word}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
:focus-visible{outline:3px solid rgba(31,154,72,.45);outline-offset:2px}

[hidden]{display:none!important}

/* ---------- owner area on a computer or tablet ---------- */
.shell.wide{max-width:none}
.shell.wide nav.bottom{display:none}
.desk{display:flex;min-height:100vh}
.side{width:252px;flex:none;box-sizing:border-box;background:#fff;border-right:1px solid var(--line);padding:16px 12px;display:flex;flex-direction:column;gap:2px;position:sticky;top:0;height:100vh;overflow-y:auto}
.side .brand{display:flex;align-items:center;gap:10px;padding:4px 8px 14px}
.side .brand .logo-box{width:44px;height:44px;border-radius:12px;overflow:hidden;flex:none;display:flex;align-items:center;justify-content:center;color:#fff;font-family:var(--display);font-weight:700}
.side a.mi{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:10px;color:var(--ink2);font-size:14px;font-weight:500;text-decoration:none}
.side a.mi:hover{background:#f1f5f2}
.side a.mi[aria-current="page"]{background:var(--green-t);color:var(--green-d);font-weight:700}
.side .badge{margin-left:auto;font-size:11.5px;font-weight:700;color:#fff;background:#e8590c;border-radius:999px;padding:1px 7px}
.side .dot{margin-left:auto;width:8px;height:8px;border-radius:4px;background:#d97706}
.side .sep{height:1px;background:var(--line);margin:8px 4px}
.desk-main{flex:1;min-width:0;padding:24px 28px 40px;display:flex;flex-direction:column;gap:18px;max-width:1280px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;display:flex;gap:14px;align-items:center}
.kpi .kic{width:46px;height:46px;border-radius:12px;color:#fff;display:flex;align-items:center;justify-content:center;flex:none}
.kpi b{font-family:var(--display);font-size:24px}
.drow{display:flex;flex-wrap:wrap;gap:14px}
.drow > section{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:10px;box-sizing:border-box}
table.dt{width:100%;border-collapse:collapse;font-size:13.5px;min-width:760px}
.dt th{padding:12px 16px;font-weight:600;font-size:12.5px;color:var(--faint);text-align:left;border-bottom:1px solid var(--line)}
.dt td{padding:12px 16px;border-bottom:1px solid #eef2ee}
.dt tr:last-child td{border-bottom:0}
.dt a{color:inherit;font-weight:700;text-decoration:none}
.wide .toast{bottom:24px}

/* ===== Step 5: queue screen, kiosk tablet, Now serving TV ===== */
.qgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;align-items:start}
.chip[aria-pressed]{cursor:pointer}
.s8mark{display:inline-flex;align-items:center;gap:2px;font:700 18px/1 var(--display);color:#14532d;vertical-align:middle}
.s8mark>b{background:#14532d;color:#fff;border-radius:6px;padding:2px 5px}
.s8mark .r,.s8mark .dot{font-style:normal}.s8mark .r{color:#c62828}.s8mark .dot{position:relative}
.s8mark .dot::after{content:'';position:absolute;left:50%;top:-.05em;width:.24em;height:.24em;margin-left:-.12em;border-radius:50%;background:#c62828}
.s8mark .inf{display:inline-block;transform:rotate(90deg);color:#c62828;margin-left:1px}
.shell.full{max-width:none}
.shell.full>main{padding:20px 24px 24px}
.kiosk{display:flex;flex-direction:column;gap:16px;min-height:calc(100vh - 44px);max-width:1200px;width:100%;margin:0 auto}
.kiosk .tabs button{min-height:52px;font-size:17px;padding:0 20px}
.ktiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px;flex:1;align-content:start}
.ktile{position:relative;min-height:120px;border-radius:18px;border:1px solid var(--line);background:#fff;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:8px;padding:16px;text-align:left;cursor:pointer;font:inherit}
.ktile b{font-size:19px;line-height:1.25}.ktile span{font-size:17px;color:var(--muted);font-weight:600}
.ktile i{position:absolute;top:10px;right:10px;font-style:normal;color:#fff;min-width:34px;height:34px;border-radius:17px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:17px}
.kbar{position:sticky;bottom:0;display:flex;gap:10px;align-items:center;background:var(--ground);padding:10px 0}
.pw{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;color:var(--muted);margin-top:auto;padding-top:8px}
.shell.full:has(.tv){background:#0f1d16}
.tv{color:#fff;display:flex;flex-direction:column;gap:20px;min-height:calc(100vh - 44px)}
.tv .btn.ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.35)}
.tv .pw{color:rgba(255,255,255,.65)} .tv .pw .s8mark{color:#fff} .tv .pw .s8mark>b{background:#fff;color:#14532d}
.tvcols{display:grid;grid-template-columns:1fr 1.4fr;gap:20px;flex:1}
.tvcols section{background:rgba(255,255,255,.06);border-radius:24px;padding:20px}
.tvcols section.ready{background:var(--brand,#1f9a48)}
.tvcols h2{font-size:clamp(22px,3vw,40px);text-transform:uppercase;letter-spacing:1px;margin-bottom:16px}
.tvnums{display:flex;flex-wrap:wrap;gap:14px}
.tvnums div{display:flex;flex-direction:column;align-items:center;background:rgba(255,255,255,.14);border-radius:18px;padding:10px 18px;min-width:120px}
.tvnums b{font:700 clamp(48px,7vw,110px)/1 var(--display)} .tvnums span{font-size:clamp(16px,1.8vw,26px)}
.tvnums.prep b{font-size:clamp(36px,4.5vw,70px);opacity:.85}
.tvnums div.new{animation:tvflash 1s ease-in-out 4}
.tvnums p{font-size:40px;opacity:.5;margin:0}
@keyframes tvflash{50%{background:#fff;color:#0f1d16}}
@media (prefers-reduced-motion:reduce){.tvnums div.new{animation:none;outline:4px solid #fff}}
@media (max-width:700px){.tvcols{grid-template-columns:1fr}}

/* ===== Step 7: head office income and SMS ===== */
.incgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.tbl{width:100%;border-collapse:collapse;font-size:13.5px}
.tbl th{text-align:left;font-weight:600;color:var(--muted);font-size:12px;padding:8px 6px;border-bottom:1px solid var(--line2);white-space:nowrap}
.tbl td{padding:8px 6px;border-bottom:1px solid var(--line);vertical-align:top}
.tbl .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.dotc{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.hqwide{display:flex;flex-direction:column;gap:18px;width:100%;max-width:1180px;margin:0 auto}
