:root {
  --pri: #0f4c81; --pri-d: #0a3760; --acc: #ffb300; --bg: #f4f6f9; --card: #fff;
  --txt: #1d2733; --muted: #6b7785; --line: #e2e7ee; --ok: #1e8e3e; --warn: #c77700; --bad: #c62828;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--txt);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
a { color: var(--pri); }
button, input, select, textarea { font: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; padding: 40px 16px; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.row { display: flex; gap: 8px; align-items: center; } .row.fw { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.right { margin-left: auto; } .mt { margin-top: 12px; } .mb { margin-bottom: 12px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--pri); color: #fff;
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.top h1 { font-size: 17px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top button { background: transparent; border: 0; color: #fff; font-size: 15px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.top button:active { background: rgba(255,255,255,.15); }
.net { font-size: 12px; padding: 2px 8px; border-radius: 20px; background: rgba(255,255,255,.18); }
.net.off { background: var(--bad); }

.wrap { padding: 12px; max-width: 1100px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; }
.card h3 { margin: 0 0 8px; font-size: 15px; }

/* buttons */
.btn { border: 1px solid var(--line); background: #fff; color: var(--txt); padding: 9px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn.pri { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { background: #fff; border-color: var(--bad); color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; padding: 13px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: default; }

/* forms */
label.f { display: block; margin-bottom: 10px; }
label.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; padding: 10px; border: 1px solid #cdd5df; border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pri); outline-offset: -1px; border-color: var(--pri); }

/* login */
.login { max-width: 360px; margin: 8vh auto; padding: 0 16px; }
.login .logo { text-align: center; margin-bottom: 18px; }
.login .logo img { width: 72px; border-radius: 16px; }

/* centre list */
.centre { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.centre .nm { font-weight: 600; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 20px; background: #eef1f5; color: var(--muted); white-space: nowrap; }
.badge.ok { background: #e6f4ea; color: var(--ok); } .badge.warn { background: #fff4e0; color: var(--warn); }
.badge.bad { background: #fdecea; color: var(--bad); } .badge.pri { background: #e3edf7; color: var(--pri); }

/* entry screen */
.searchbar { position: sticky; top: 52px; z-index: 10; background: var(--bg); padding: 8px 12px; }
.hk { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin: 0 12px 8px; }
.hk.absent { background: #fafafa; opacity: .75; }
.hk.changed { border-color: var(--acc); box-shadow: inset 3px 0 0 var(--acc); }
.hk .nm { font-weight: 600; }
.ed { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.ed .lbl { flex: 1; font-size: 13px; min-width: 0; }
.ed .lbl .pn { font-size: 15px; }
.ed .lbl .last { color: var(--bad); font-size: 12px; }
.qty { display: flex; align-items: center; }
.qty button { width: 40px; height: 40px; border: 1px solid #cdd5df; background: #f7f9fb; font-size: 20px; cursor: pointer; }
.qty button:first-child { border-radius: 8px 0 0 8px; } .qty button:last-child { border-radius: 0 8px 8px 0; }
.qty input { width: 64px; height: 40px; text-align: center; border-radius: 0; border-left: 0; border-right: 0; font-size: 17px; font-weight: 600; padding: 0; }
.comp .lbl { color: var(--warn); }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; user-select: none; }
.footer { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom)); z-index: 15; }
.tot { display: flex; gap: 14px; font-size: 13px; margin-bottom: 8px; }
.tot b { font-size: 16px; }

/* admin layout */
.layout { display: flex; min-height: calc(100vh - 52px); }
.side { width: 210px; background: #fff; border-right: 1px solid var(--line); padding: 8px 0; flex-shrink: 0; }
.side a { display: block; padding: 9px 16px; color: var(--txt); text-decoration: none; }
.side a.on { background: #e3edf7; color: var(--pri); font-weight: 600; box-shadow: inset 3px 0 0 var(--pri); }
.side .grp { font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 12px 16px 4px; letter-spacing: .04em; }
.main { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .layout { display: block; }
  .side { width: auto; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0; }
  .side a { white-space: nowrap; padding: 10px 12px; }
  .side a.on { box-shadow: inset 0 -3px 0 var(--pri); }
  .side .grp { display: none; }
}

/* tables */
.tbl-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f7f9fb; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
td .btn { margin: 0 4px 4px 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.toolbar input, .toolbar select { width: auto; min-width: 140px; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: #fff; padding: 7px 12px; border-radius: 20px; cursor: pointer; }
.tabs button.on { background: var(--pri); color: #fff; border-color: var(--pri); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; cursor: pointer; }
.stat .v { font-size: 24px; font-weight: 700; } .stat .k { font-size: 12px; color: var(--muted); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 14px 14px 0 0; padding: 16px; }
@media (min-width: 600px) { .modal-bg { align-items: center; } .modal { border-radius: 14px; } }
.modal h2 { margin: 0 0 12px; font-size: 18px; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; position: sticky; bottom: -16px; background: #fff; padding: 10px 0; }
.checklist { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.checklist label { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f0f2f5; }

#toast { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
#toast div { background: #263238; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; max-width: 90vw; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
#toast div.bad { background: var(--bad); } #toast div.ok { background: var(--ok); }
.empty { padding: 30px; text-align: center; color: var(--muted); }
pre.res { background: #f7f9fb; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px; white-space: pre-wrap; max-height: 300px; overflow: auto; }
.row.fw > input, .row.fw > select { width: auto; }
.modal:has(table) { max-width: 780px; }
/* daily matrix */
table.matrix th.grp { text-align: center; border-left: 2px solid var(--line); color: var(--pri); font-size: 14px; }
table.matrix th.grp.comp { color: var(--warn); }
table.matrix th.sub { font-weight: 500; }
table.matrix th.sub:nth-child(odd), table.matrix td.num:nth-child(even) { border-left: 2px solid var(--line); }
table.matrix .stick { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 140px; }
table.matrix thead .stick { background: #f7f9fb; z-index: 3; }
table.matrix tr.total td { font-weight: 700; background: #f7f9fb; }
table.matrix tr.total td.stick { background: #f7f9fb; }
table.matrix tr.agrp td { background: #e8f0fe; font-weight: 700; border-top: 2px solid var(--pri); }
table.matrix tr.agrp td.stick { background: #e8f0fe; color: var(--pri); }
.up, td.up { color: var(--ok); font-weight: 700; }
.down, td.down { color: var(--bad); font-weight: 700; }
td.up { background: #e6f4ea; } td.down { background: #fdecea; }
.pp { display: inline-block; margin-right: 10px; white-space: nowrap; }
.ed .lbl .agc { font-size: 12px; color: var(--pri); font-weight: 600; }

/* hawkers page: two-line rows */
.hk2 td { vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
.hk2 .l1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hk2 .l1 .mob { color: var(--muted); font-size: 13px; }
.hk2 .l2 { font-size: 13px; color: #44505c; margin-top: 2px; }
.hk2 .l2 .sep { margin: 0 6px; color: var(--muted); }
.hk2 .acts { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.hk2 .acts button { padding: 4px 9px; font-size: 13px; }
@media (max-width: 700px) {
  .hk2 thead { display: none; }
  .hk2 tr, .hk2 td { display: block; width: auto; }
  .hk2 td { padding-left: 12px; padding-right: 12px; border: 0; }
  .hk2 td + td { padding-top: 0; }
  .hk2 tr { border-bottom: 1px solid var(--line); }
  .hk2 .acts { justify-content: flex-start; }
}

/* daily entries page */
.de-stats .stat { cursor: default; }
.de-stats .stat[onclick], .de-stats .stat.ok, .de-stats .stat.warn { cursor: pointer; }
.de-stats .stat.ok .v { color: var(--ok, #1e8e3e); } .de-stats .stat.warn .v { color: var(--warn); } .de-stats .stat.bad .v { color: var(--bad, #c62828); }
.de-stats .dl { font-size: 14px; font-weight: 600; }
.de-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.de-bar .fld { display: flex; align-items: center; gap: 6px; } .de-bar .fld span { font-size: 12px; color: var(--muted); }
.de-bar input[type=search] { flex: 1; min-width: 180px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--pri); color: #fff; }
.legend { margin: 4px 0 8px; }
table.matrix .ent { min-width: 190px; }
table.matrix .ent .bdg { margin: 3px 0; display: flex; gap: 4px; flex-wrap: wrap; }
table.matrix .ent .acts { display: flex; gap: 4px; margin-top: 4px; }
table.matrix .ent .acts .btn { padding: 3px 9px; font-size: 12px; text-decoration: none; }
@media (max-width: 700px) {
  .de-stats { grid-template-columns: repeat(2, 1fr); }
  .de-bar .fld { flex: 1 1 45%; } .de-bar .fld input { flex: 1; min-width: 0; }
  .de-bar input[type=search] { flex-basis: 100%; }
  table.matrix .stick { min-width: 110px; max-width: 130px; }
}
.de-bar .toggle { display: inline-flex; align-items: center; gap: 6px; width: auto; white-space: nowrap; }
.de-bar .toggle input { width: auto; min-width: 0; margin: 0; }
/* hawker type tag: D = Delivery, S = Stall, M = Mixed */
.htype { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 4px;
  font-size: 11px; font-weight: 700; color: #fff; vertical-align: middle; margin-left: 4px; flex: none; }
.htype.tD { background: #1565c0; } .htype.tS { background: #e65100; } .htype.tM { background: #6a1b9a; }

/* live updates */
.livepill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 12px; margin-right: 6px; white-space: nowrap; }
.livepill.off { display: none; }
.livepill.live { background: #e6f4ea; color: #1e8e3e; }
.livepill.reconnecting { background: #fff4e0; color: #b26a00; }
@keyframes htflash { 0% { background: #fff3b0; } 100% { background: transparent; } }
table.matrix tr.flash td { animation: htflash 4s ease-out; }

/* grouped tables (e.g. drop alerts centre-wise) */
.tbl-wrap tr.grp td { background: #e8f0fe; border-top: 2px solid var(--pri); }

table.matrix .hkc { border-right: 2px solid var(--line); font-weight: 600; color: #44505c; }

/* hawker-wise Save on the entry screen */
.hk .hsave { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 4px; min-height: 0; }
.hk .hsave .btn { padding: 6px 18px; }
.hk .saved-ok { font-size: 12px; color: #1e8e3e; font-weight: 600; }
/* activity: bell, pop-ups, panel */
.btn.bell { font-size: 15px; padding: 5px 10px; }
.btn.bell.has { background: #e8f0fe; color: var(--pri); border-color: var(--pri); font-weight: 700; }
.btn.bell.red { background: var(--bad); color: #fff; border-color: var(--bad); font-weight: 700; }
#livetoast { position: fixed; top: 124px; right: 14px; z-index: 210; display: flex; flex-direction: column; gap: 8px; width: 360px; max-width: calc(100vw - 28px); pointer-events: none; }
#livetoast .lt { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--ok); border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); font-size: 13px; animation: ltin .25s ease-out; }
#livetoast .lt.drop { border-left-color: var(--bad); }
#livetoast .lt-h { margin-bottom: 4px; } #livetoast .lt-k { float: right; font-size: 11px; color: var(--muted); }
@keyframes ltin { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal.act-modal { max-width: 820px; width: 100%; }
.act .toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.act .toolbar select { width: auto; min-width: 0; }
.act .toggle { display: inline-flex; align-items: center; gap: 6px; width: auto; } .act .toggle input { width: auto; min-width: 0; margin: 0; }
.act-list { max-height: 65vh; overflow: auto; }
.act-ev { border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 8px; margin-bottom: 6px; background: #fff; }
.act-ev.drop { border-left-color: var(--bad); }
.act-h { padding: 8px 10px; cursor: pointer; }
.act-l1 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .act-l2 { margin-top: 3px; color: #44505c; }
.act-body { padding: 0 10px 8px; }
table.act-t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.act-t th, table.act-t td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.act-t .num { text-align: right; }
.up { color: #1e8e3e; } .down { color: var(--bad); }
table.matrix tr.inprog td:not(.stick) { font-style: italic; }
table.matrix tr.inprog td.stick b::after { content: ' · in progress'; font-weight: 600; font-size: 11px; color: #b26a00; }
.modal .acts { flex-wrap: wrap; }
@keyframes hkflash { 0% { box-shadow: 0 0 0 4px #fbc02d; } 100% { box-shadow: none; } }
.hk.flash { animation: hkflash 2.5s ease-out; }

/* ---------- finance (agent) ---------- */
.bigsearch { width: 100%; padding: 10px; border: 2px solid var(--pri); border-radius: 10px; font-size: 16px; }
.hk.frow { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.hk.frow.nosetup { box-shadow: inset 3px 0 0 var(--acc); }
.mini { font-size: 12px; color: var(--muted); } .mini.r { text-align: right; font-weight: 400; }
.due { font-weight: 800; color: var(--bad); text-align: right; white-space: nowrap; }
.chev { color: var(--muted); font-size: 18px; }
.ftag { font-size: 10.5px; padding: 0 5px; border-radius: 6px; background: #e3edf7; color: var(--pri); font-weight: 600; margin-left: 4px; }
table.rt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.rt th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.rt td { padding: 8px 10px; border-bottom: 1px solid #eef1f5; vertical-align: top; }
table.rt tr:last-child td { border-bottom: 0; }
table.rt td.pr { font-variant-numeric: tabular-nums; }
.fsetup { padding-bottom: 80px; }
.fsetup .sec, .fsec { font: 700 12px system-ui; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 14px 12px 6px; }
.pt { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin: 0 12px; }
.srow { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-bottom: 1px solid #eef1f5; font-size: 14px; flex-wrap: wrap; }
.srow:last-child { border-bottom: 0; }
.srow .grow small { display: block; color: var(--muted); font-size: 11.5px; }
.srow.chg { background: #fff8e1; }
.srow input[type=date] { width: auto; }
.inp { width: 70px !important; min-width: 0 !important; height: 36px; border: 1px solid #cdd5df; border-radius: 8px; text-align: right; font-size: 16px; font-weight: 700; padding: 0 6px; }
.inp.wide { width: 110px !important; }
.srow .seg button { padding: 7px 9px; }
.fbar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 8px; z-index: 15; }
.fbar .btn { flex: 1; }
/* admin rates grid */
.rgrid { width: 100%; border-collapse: collapse; font-size: 13px; }
.rgrid th { font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.rgrid td { padding: 6px 4px; border-bottom: 1px solid #eef1f5; text-align: center; white-space: nowrap; }
.rgrid td:first-child, .rgrid th:first-child { text-align: left; padding-left: 8px; }
.rgrid input { width: 58px !important; min-width: 0 !important; height: 30px; text-align: right; padding: 0 5px; font-size: 13px; }
.rgrid select { width: auto; min-width: 0; height: 30px; padding: 0 4px; font-size: 12.5px; }
.rgrid .sun { background: #fff6e5; }
.rgrid .seg button { padding: 5px 8px; font-size: 12px; }
.notice { background: #fff4e5; border: 1px solid #f5c26b; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 6px; display: flex; gap: 8px; align-items: flex-start; }
.notice.read { background: #f7f9fb; border-color: var(--line); color: var(--muted); }

/* agent daily screen */
.fday { padding-bottom: 96px; }
.fday .hd { display: flex; align-items: center; gap: 8px; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 12px; }
.fsec.row { display: flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; }
.fsec.row > .grow { text-transform: uppercase; letter-spacing: .04em; }
.rdate { width: auto !important; min-width: 0 !important; height: 30px; padding: 0 6px; font-size: 12.5px; }
.fday .qh { display: grid; grid-template-columns: 1fr 112px 112px; gap: 6px; padding: 6px 10px 0; font-size: 11.5px; color: var(--muted); }
.fday .qh span:not(:first-child) { text-align: center; }
.fday .pr { display: grid; grid-template-columns: 1fr 112px 112px; gap: 6px; align-items: center; padding: 7px 10px; border-bottom: 1px solid #eef1f5; }
.fday .pr:last-child { border-bottom: 0; }
.fday .pr .p b { font-size: 15px; }
.fday .pr .last { font-size: 11.5px; color: var(--muted); }
.qty.sm button { width: 32px; height: 34px; font-size: 17px; }
.qty.sm input { width: 46px !important; min-width: 0 !important; height: 34px; font-size: 16px; }
.payin { width: 100px !important; min-width: 0 !important; height: 38px; border: 1px solid #cdd5df; border-radius: 8px; text-align: right; font-size: 18px; font-weight: 700; padding: 0 8px; }
table.sheet { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.sheet td { padding: 6px 10px; border-bottom: 1px solid #eef1f5; }
table.sheet td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.sheet tr.t td { font-weight: 700; background: #f7f9fb; }
table.sheet tr.big td { font-size: 16px; font-weight: 800; background: #e8f0fe; color: var(--pri); border-bottom: 0; }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 12px; }
.fbar.col { flex-direction: column; gap: 6px; }
.ftot { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.due.zero { color: var(--ok); }
.pgrp { border-bottom: 1px solid var(--line); }
.pgrp:last-child { border-bottom: 0; }
.pgh { padding: 8px 10px 0; font-size: 15px; }
.pgrp .srow { border-bottom: 0; padding-top: 6px; padding-bottom: 6px; }
@media (min-width: 700px) { .fbar { max-width: 700px; margin: 0 auto; } }

.fbar .btn.nav { flex: 0 0 48px; font-size: 22px; padding: 0; }

.addp { padding: 8px 10px; border-top: 1px solid #eef1f5; }

.supcard { margin: 0 12px 8px; padding: 8px 10px; }
.suprow { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 15px; }
.suprow input[type=checkbox], .srow.sup input[type=checkbox] { width: 22px; height: 22px; min-width: 0; }
.srow.sup { cursor: pointer; }

.chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 9px; border-radius: 14px; background: #e3edf7; color: var(--pri); font-weight: 600; font-size: 13px; }
.chip a { color: var(--bad); text-decoration: none; }

.supline { display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; padding: 8px 10px; font-size: 14.5px; }
.supline input[type=checkbox] { width: 22px; height: 22px; min-width: 0; }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.pgrid label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.pgrid .inp { width: 100% !important; }
.modal .acts button.hide { display: none; }
.plist { max-height: 50vh; overflow-y: auto; margin-top: 8px; }

.rgrid tr.prow td { border-bottom: 0; padding-bottom: 2px; }
.rgrid tr.crow td { padding-top: 2px; }
.rgrid tr.crow input { background: #f6f9fc; }

.tdline { align-items: flex-start; }
.tdrow { padding: 8px 0; border-bottom: 1px solid #eef1f5; }
.tdrow:last-child { border-bottom: 0; }
.tdrow .row { align-items: center; margin-bottom: 4px; }
.tdrow .inp { width: 72px !important; }

.fbimg { max-width: 120px; max-height: 120px; border-radius: 8px; margin-top: 8px; border: 1px solid var(--line); }
.fbcard { margin-bottom: 8px; }
.fbmsg { white-space: pre-wrap; margin-top: 6px; font-size: 14px; }
.fbreply { margin-top: 8px; padding: 8px; background: #eef6ee; border-radius: 8px; font-size: 14px; white-space: pre-wrap; }
.card.fbnew { border-left: 4px solid var(--acc); }
