:root {
  --navy: #1f3a5f; --navy-2: #2c5282; --bg: #f3f5f8; --card: #fff; --line: #dde2ea; --text: #1a202c; --muted: #667085;
  --ok: #1e8e3e; --okc: #5b8c00; --re: #d97706; --rej: #c62828; --can: #6b7280; --pend: #2563eb;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Noto Sans", Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

header#top { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 12px; padding: 8px 14px; flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
#tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
#tabs button { background: transparent; border: 0; color: #cfd9e8; padding: 8px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
#tabs button.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
header .right { display: flex; gap: 8px; align-items: center; margin-left: auto; }
header select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 6px 8px; }
header select option { color: #000; }
button.ghost { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }

main { max-width: 1250px; margin: 0 auto; padding: 16px; }
h2 { margin: 4px 0 14px; font-size: 20px; }
h3 { margin: 22px 0 10px; font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; }

.btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 9px 14px; cursor: pointer; font-weight: 500; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.danger { color: var(--rej); border-color: #f1c0c0; }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=password], input[type=date], input[type=datetime-local], input[type=search], input[type=number], select, textarea {
  border: 1px solid #c9d1dc; border-radius: 8px; padding: 9px 10px; background: #fff; min-width: 0;
}
textarea { width: 100%; min-height: 90px; resize: vertical; }
label.f { display: block; }
label.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
label.f input, label.f select, label.f textarea { width: 100%; }

/* login */
.login { max-width: 420px; margin: 30px auto; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.names button { padding: 14px 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; }
.names button.on { border-color: var(--navy); background: #e8eef7; }
.pin input { font-size: 22px; letter-spacing: 6px; text-align: center; width: 100%; }

/* inspection cards */
.daybar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.daybar .date { font-weight: 700; font-size: 17px; }
.list { display: grid; gap: 10px; }
.insp { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--pend); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; }
.insp:hover { border-color: #b8c3d3; }
.insp .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.insp .d { margin-top: 6px; font-weight: 600; }
.insp .c { margin-top: 6px; font-size: 13px; color: #374151; white-space: pre-wrap; }
.insp.s-cancelled { border-left-color: var(--can); }
.insp.s-Accepted { border-left-color: var(--ok); }
.insp.s-Accepted-with-comments { border-left-color: var(--okc); }
.insp.s-Re-inspection { border-left-color: var(--re); }
.insp.s-Rejected { border-left-color: var(--rej); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2f7; color: #334155; white-space: nowrap; }
.tag.pend { background: #dbeafe; color: #1e40af; }
.tag.cancelled { background: #e5e7eb; color: #374151; }
.tag.Accepted { background: #dcfce7; color: #166534; }
.tag.Accepted-with-comments { background: #ecfccb; color: #3f6212; }
.tag.Re-inspection { background: #fef3c7; color: #92400e; }
.tag.Rejected { background: #fee2e2; color: #991b1b; }
.tag.ncr { background: #7f1d1d; color: #fff; }
.tag.re { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }

/* modal form */
/* simple layout that every phone browser handles the same way: the window starts at the top of the screen and the
   dark backdrop scrolls if the window is long (no bottom-anchored sheet, which some Android browsers hide behind their toolbar) */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,.45); z-index: 50; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 0 40px; box-sizing: border-box; }
.modal.hidden { display: none; }
.sheet { background: #fff; width: auto; max-width: 640px; margin: 0 8px; border-radius: 14px; padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
@media (min-width: 660px) { .modal { padding-top: 6vh; } .sheet { margin: 0 auto; } }
.sheet h3 { margin-top: 0; }
.q { font-weight: 700; margin: 16px 0 8px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.choices button { padding: 14px 10px; border-radius: 10px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; min-height: 52px; }
.choices button.on { border-color: var(--navy); background: #e8eef7; }
.choices button.v-Accepted.on { border-color: var(--ok); background: #dcfce7; }
.choices button.v-Accepted-with-comments.on { border-color: var(--okc); background: #ecfccb; }
.choices button.v-Re-inspection.on { border-color: var(--re); background: #fef3c7; }
.choices button.v-Rejected.on { border-color: var(--rej); background: #fee2e2; }
.choices button.v-held.on { border-color: var(--ok); background: #dcfce7; }
.choices button.v-cancelled.on { border-color: var(--can); background: #e5e7eb; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.timeline { border-left: 3px solid var(--line); margin-left: 6px; padding-left: 12px; }
.timeline .ev { margin-bottom: 10px; font-size: 14px; }
.timeline .ev.cur { font-weight: 600; }

/* tables */
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 7px 9px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: top; }
th { background: #f7f9fc; font-weight: 600; color: #334155; white-space: nowrap; position: sticky; top: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: #f7faff; }
td.desc { min-width: 260px; max-width: 480px; }
tr.total td { font-weight: 700; background: #f7f9fc; }

/* report */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.kpi .v { font-size: 26px; font-weight: 700; }
.kpi .l { font-size: 12.5px; color: var(--muted); }
.bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eef2f7; margin-top: 10px; }
.bar span { display: block; height: 100%; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; }
.toast.err { background: #b91c1c; }

@media (max-width: 640px) {
  main { padding: 12px; }
  header#top { padding: 8px 10px; }
  .brand { font-size: 15px; }
  #tabs { order: 3; flex-basis: 100%; }
}
@media print {
  header#top, .noprint, .modal { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .tablewrap { border: 0; overflow: visible; }
  th { position: static; }
  h3 { break-after: avoid; }
}

/* ---- v2.0 ---- */
.ver { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 0 26px; }
.subtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.subtabs button { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; color: #334155; }
.subtabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.badge:not(:empty) { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: #d97706; color: #fff; font-size: 12px; margin-left: 4px; }
.tag.ncrreq { background: #fde68a; color: #7c2d12; border: 1px solid #f59e0b; }
.tag.fu { background: #e0f2fe; color: #075985; }
.tag.fudone { background: #ecfdf5; color: #065f46; }
.tag.old { background: #fee2e2; color: #991b1b; }
.warnbox { background: #fffbeb; border: 1px solid #f59e0b; color: #7c2d12; border-radius: 8px; padding: 9px 12px; margin-top: 12px; font-size: 14px; }
.fubox { border-radius: 8px; padding: 9px 12px; margin-top: 12px; font-size: 14px; }
.fubox.open { background: #e0f2fe; border: 1px solid #7dd3fc; }
.fubox.closed { background: #ecfdf5; border: 1px solid #6ee7b7; }
.fucard .row.end { margin-top: 8px; }

/* block map */
.blegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #374151; }
.blegend i, .chg i { display: inline-block; width: 14px; height: 14px; border: 1px solid #5d6673; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.bm-panel { margin: 14px 0 6px; }
.bm-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: #1f3a5f; }
.bm-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 6px; }
svg.bm { display: block; font-family: inherit; }
.bm-lab { fill: #eef2f7; }
.bm-lab.side-P { fill: #e8f0fb; } .bm-lab.side-S { fill: #f6efe6; } .bm-lab.side-C { fill: #f1f3f5; }
.bm-labt { font-size: 11.5px; fill: #1f2937; font-weight: 600; }
.bm-no { font-size: 10.5px; font-weight: 700; pointer-events: none; }
.bm-no.v { font-size: 9.5px; }
.bm-hold { font-size: 11.5px; font-weight: 700; fill: #1f3a5f; }
.bm-dir { font-size: 10.5px; fill: #667085; font-weight: 600; }
.bm-gb { font-size: 11px; fill: #667085; }
.bm-t.click { cursor: pointer; }
.bm-t.click:hover rect { stroke: #111; stroke-width: 2; }
.bulkbar { background: #f8fafc; border: 1px dashed #b8c3d3; border-radius: 8px; padding: 8px; }
.bulkbar .stb { border: 1px solid #5d6673; font-weight: 700; }
.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.stages > div { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; color: #98a2b3; }
.stages > div.done { color: #111; border-color: #98a2b3; }
.stages i { display: inline-block; width: 11px; height: 11px; border: 1px solid #5d6673; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.chg { display: inline-block; margin: 2px 8px 2px 0; white-space: nowrap; }
.pgt td.num .delta { color: #15803d; font-weight: 700; font-size: 12px; }
#kInsp .ev { margin-bottom: 5px; }

/* charts */
.charts { display: flex; flex-wrap: wrap; gap: 12px; }
.chart { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ctitle { font-weight: 700; margin-bottom: 4px; }
.clegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #52514e; margin-bottom: 8px; }
.clegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.chart .cg { stroke: #e5e7eb; stroke-width: 1; } .chart .cb { stroke: #9ca3af; stroke-width: 1; }
.chart .ct { font-size: 10.5px; fill: #6b7280; } .chart .cv { font-size: 10.5px; fill: #374151; font-weight: 600; }
.chart .cl { font-size: 12px; fill: #111827; font-weight: 600; } .chart .cr { font-size: 11.5px; fill: #52514e; }

@media print {
  .bm-scroll { overflow: visible; border: 0; padding: 0; }
  svg.bm { max-width: 100%; height: auto; }
  .pb { break-before: page; }
  .ver { display: none; }
  details { display: none; }
}
label.chk { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
label.chk input { margin-top: 3px; flex: none; }
.bm-labt.n { font-size: 9.5px; } .bm-labp { font-size: 9px; font-weight: 500; fill: #475467; }

/* v2.1 burst view */
.burstwrap { background: #fff; border: 1px solid var(--line, #d5dae1); border-radius: 8px; padding: 6px; }
canvas.burst { width: 100%; height: auto; display: block; }
.seg .btn { margin-right: 4px; }
@media print { .burstwrap { border: 0; padding: 0; } }

.tag.corr { background: #fde7d9; color: #8a3b0c; border: 1px solid #f0b48c; }

/* v2.3 NCR register, yard plans */
.ncrdesc { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 14px; line-height: 1.45; }
.ncrform textarea { width: 100%; }
a.tag.dupl { text-decoration: none; cursor: pointer; background: #e0e7ff; color: #3730a3; }
a.tag.dupl:hover { background: #c7d2fe; }
#pOut .click, #nList tr.click { cursor: pointer; }
.btn.small { padding: 4px 10px; font-size: 13px; }

/* v2.4 pre-erection joints, erection */
.pebars { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.pebar { display: grid; grid-template-columns: 42px 1fr 52px; align-items: center; gap: 8px; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.pebar:hover { background: #f1f5f9; }
.pebar .pbt { height: 12px; border: 1px solid #b8c0cc; border-radius: 3px; background: #fff; overflow: hidden; }
.pebar .pbt i { display: block; height: 100%; background: #009650; }
.pebar.done b { color: #009650; }
.pejoints { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pej { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; cursor: pointer; }
.pej.on { background: #e6f6ee; border-color: #009650; }
.pej.no { border-color: #d03b3b; }
.pej.sel { outline: 3px solid #d0006f; }
.pej:disabled { cursor: default; color: inherit; }
.gbchips { display: flex; flex-wrap: wrap; gap: 6px; }
.gbc { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 9px; font-weight: 600; cursor: pointer; }
.gbc.on { background: #7a96eb; color: #fff; border-color: #5a76cb; }
td.nowrap, .nowrap { white-space: nowrap; }
.erlist { display: flex; flex-direction: column; }
.errow { display: grid; grid-template-columns: auto minmax(110px, 160px) 1fr auto; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.errow:not(:has(input)) { grid-template-columns: minmax(110px, 160px) 1fr auto; cursor: default; }
.errow.na { color: var(--muted); }
.errow input { width: 20px; height: 20px; }
.ertag { color: #fff; font-size: 11px; padding: 2px 6px; }
.erbar { position: sticky; top: 0; background: #fff; z-index: 2; padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) { .errow { grid-template-columns: auto 1fr auto; row-gap: 3px; } .errow .ers { grid-column: 2 / 4; grid-row: 2; } .errow .ern { grid-column: 3; grid-row: 1; text-align: right; } .errow:not(:has(input)) { grid-template-columns: 1fr auto; } .errow:not(:has(input)) .ers { grid-column: 1 / 3; } .errow:not(:has(input)) .ern { grid-column: 2; } }
.vchk{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center;padding:4px 0}
.vck{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;font-weight:600}
.itrow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; padding: 7px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.itrow:not(:has(input)) { grid-template-columns: 1fr auto; }
.itrow input { width: 20px; height: 20px; margin-top: 2px; }
.itrow.ok .itd { color: var(--muted); }
.itst { text-align: right; white-space: nowrap; }
.row.wrap { flex-wrap: wrap; }
.tkpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 10px; }
.tkc { display: flex; align-items: center; gap: 6px; padding: 6px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.tkc input { width: 20px; height: 20px; flex-shrink: 0; }
.tkc.warn { color: #9a6a00; }
.tktab { font-size: 12.5px; }
.tktab th.test { background: #e3ebff; } .tktab th.coat { background: #ffe9d8; }
.tktab td.tkok { background: #e3f5e8; color: #14652f; font-weight: 600; text-align: center; }
.tktab td.tkna { color: #888; text-align: center; background: #f3f3f3; }
.tktab td.tkx { color: #bbb; text-align: center; }
.tktab tr.cat td { background: #f6f7f9; font-weight: 700; font-size: 12px; text-transform: uppercase; }
.itpart { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; letter-spacing: .04em; margin: 12px 0 4px; padding: 4px 6px; background: #1f3a68; color: #fff; border-radius: 6px; }
.itpart .muted { color: #cdd8f0; }
.itsec { border-bottom: 1px solid var(--line); }
.itsec > summary { display: flex; align-items: center; gap: 8px; padding: 9px 4px; cursor: pointer; list-style: none; }
.itsec > summary::-webkit-details-marker { display: none; }
.itsec > summary::before { content: '▸'; color: var(--muted); width: 12px; flex-shrink: 0; }
.itsec[open] > summary::before { content: '▾'; }
.itsec > summary input { width: 20px; height: 20px; flex-shrink: 0; }
.itcnt { font-size: 12px; padding: 1px 7px; border-radius: 10px; background: #eef1f6; white-space: nowrap; }
.itcnt.full { background: #dff3e5; color: #14652f; font-weight: 700; }
.itsec .itrow { padding-left: 26px; }
.pebar .pbt { display: flex; }
.pebar .pbt i { flex: none; }
.pebar .pbt u { display: block; height: 100%; background: repeating-linear-gradient(45deg, #e69500 0 4px, #ffd27a 4px 8px); flex: none; }
.pebar.open b { color: #9a6a00; }
.pej.open { background: #fff6dc; border-color: #e69500; }
.infobox { background: #eef4ff; border: 1px solid #c9d8f5; border-radius: 8px; padding: 8px 10px; color: #23406e; }
.phbanner { background: #fff4d6; border-bottom: 1px solid #f0d27a; color: #6b4e00; padding: 8px 14px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.phgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.phgrid.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); font-size: 12px; }
.phcard { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.phcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #eef1f6; display: block; }
.phcard textarea { width: 100%; min-height: 54px; }
.sgrow { display: block; width: 100%; text-align: left; padding: 10px; border: 0; border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; }
.sgrow:hover { background: #f1f5f9; }
.ptcard { cursor: pointer; }
.ptcard.ok { opacity: .75; }
.wrsched input { width: 100%; min-width: 80px; }
.pend-card { border: 2px solid #2a78d6; }

/* FAT list */
.fatwrap { max-height: calc(100vh - 170px); overflow: auto; }
table.fat { border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.fat th, table.fat td { padding: 3px 4px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
table.fat thead th { position: sticky; top: 0; background: #f1f5f9; z-index: 2; }
table.fat tbody th { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; font-weight: 500; white-space: normal; min-width: 130px; max-width: 210px; line-height: 1.25; }
table.fat thead th:first-child { left: 0; z-index: 3; text-align: left; }
table.fat tr.fatg td { text-align: left; background: #e2e8f0; font-weight: 700; color: #334155; border-top: 2px solid #94a3b8; }
table.fat tr.fatsub td, table.fat tr.fatsub th { background: #f1f5f9; }
table.fat tr.fatsub th { padding-left: 14px; border-left: 4px solid #94a3b8; }
table.fat tr.fatsub + tr:not(.fatsub) th, table.fat tr.fatsub + tr:not(.fatsub) td { border-top: 2px solid #94a3b8; }
.fatb { display: inline-block; min-width: 62px; padding: 4px 5px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #1e293b; font: inherit; font-size: 12px; cursor: pointer; line-height: 1.2; }
.fatb .bdgs { display: flex; justify-content: center; gap: 3px; margin-top: 3px; }
.fatb .bdg { background: #fff; color: #0f172a; border: 1px solid #94a3b8; border-radius: 999px; font-size: 13px; line-height: 1; padding: 2px 5px; font-weight: 700; }
.fatb.done { background: #16a34a; border-color: #15803d; color: #fff; }
.fatb.soon { background: #fde047; border-color: #eab308; color: #422006; }
.fatb.late { background: #dc2626; border-color: #b91c1c; color: #fff; }
.fatb.empty { min-width: 30px; color: #94a3b8; border-style: dashed; }
span.fatb { cursor: default; min-width: 0; }
@media (max-width: 600px) { table.fat tbody th { min-width: 105px; max-width: 130px; font-size: 11px; } .fatb { min-width: 56px; padding: 4px 3px; } }

.upbar { position: relative; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.upbar .small { position: relative; z-index: 1; }
.upbar .upfill { position: absolute; left: 0; top: 0; bottom: 0; background: #dbeafe; transition: width .2s; }
