/* Dashboard 5R — gaya dasar. Terang untuk HP/laptop; TV memakai tv.css (gelap). */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e3e6eb;
  --text: #15181d;
  --text-2: #4f5661;
  --muted: #7a818c;
  --brand: #0f2f57;
  --brand-2: #1c4f8f;
  --accent: #2a78d6;
  --good: #0ca30c;
  --good-bg: #e6f6e6;
  --warn: #b77a00;
  --warn-bg: #fff4dc;
  --serious: #c4561f;
  --serious-bg: #fdebe2;
  --crit: #d03b3b;
  --crit-bg: #fbe6e6;
  --neutral-bg: #eef0f3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .98rem; }
small, .muted { color: var(--muted); }
code { background: var(--neutral-bg); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.hidden { display: none !important; }

/* ---------- kerangka ---------- */
.layout { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: #dfe7f3; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1.1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 38px; height: 38px; border-radius: 9px; background: #fff; color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; letter-spacing: -.5px; }
.brand-name { font-weight: 700; color: #fff; font-size: 1rem; }
.brand-sub { font-size: .76rem; color: #9fb3cf; }
.nav { padding: .6rem .5rem; overflow-y: auto; flex: 1; }
.nav-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #7f97b8; padding: .9rem .7rem .3rem; }
.nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 7px; color: #dfe7f3; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.nav .ico { width: 18px; text-align: center; opacity: .9; }
.nav .badge { margin-left: auto; background: var(--crit); color: #fff; border-radius: 10px; font-size: .7rem; padding: 0 .45rem; font-weight: 700; }
.side-foot { padding: .8rem 1rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .8rem; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot button { margin-top: .5rem; width: 100%; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar h1 { margin: 0; font-size: 1.12rem; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 1.4rem 1.5rem 3rem; max-width: 1400px; }

/* ---------- elemen ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.card + .card { margin-top: 1rem; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .8rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { flex: 1; }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: .75rem; }
.mt { margin-top: 1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .5rem .9rem; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.primary:hover { background: var(--brand); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { color: var(--crit); border-color: #f0c4c4; }
.btn.danger:hover { background: var(--crit-bg); }
.btn.sm { padding: .3rem .6rem; font-size: .82rem; }
.btn.lg { padding: .8rem 1.2rem; font-size: 1rem; }
.btn.block { width: 100%; white-space: normal; text-align: center; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.25); color: #fff; }

label { display: block; font-weight: 600; font-size: .82rem; color: var(--text-2); margin-bottom: .25rem; }
input, select, textarea { width: 100%; font: inherit; padding: .55rem .65rem; border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid #b8d3f5; border-color: var(--accent); }
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; flex: none; }
.field { margin-bottom: .8rem; }
.fields { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.hint { font-size: .8rem; color: var(--muted); margin-top: .25rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
tr:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* status: selalu ikon + label, tidak warna saja */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--neutral-bg); color: var(--text-2); }
.pill.good { background: var(--good-bg); color: #0a6f0a; }
.pill.warn { background: var(--warn-bg); color: #8a5a00; }
.pill.serious { background: var(--serious-bg); color: #a3410f; }
.pill.crit { background: var(--crit-bg); color: #b02a2a; }
.pill.info { background: #e4eefb; color: #1c4f8f; }

/* KPI */
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); position: relative; }
.kpi .k-label { font-size: .78rem; font-weight: 600; color: var(--text-2); }
.kpi .k-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.kpi .k-value small { font-size: .9rem; font-weight: 600; }
.kpi .k-sub { font-size: .78rem; color: var(--muted); margin-top: .1rem; }
.kpi .k-flag { margin-top: .45rem; }

/* status zona hari ini */
.zone-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.zone-tile { border: 1px solid var(--border); border-left: 5px solid #c5cad3; border-radius: 8px; padding: .6rem .7rem; background: var(--surface); }
.zone-tile.good { border-left-color: var(--good); }
.zone-tile.warn { border-left-color: #fab219; }
.zone-tile.serious { border-left-color: #ec835a; }
.zone-tile.crit { border-left-color: var(--crit); }
.zone-tile .z-code { font-weight: 800; font-size: .95rem; }
.zone-tile .z-name { font-size: .8rem; color: var(--text-2); }
.zone-tile .z-meta { font-size: .76rem; color: var(--muted); margin: .25rem 0; }

/* daftar temuan ringkas */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .6rem 0; border-bottom: 1px solid var(--border); display: flex; gap: .7rem; align-items: flex-start; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.thumb { width: 54px; height: 54px; border-radius: 6px; object-fit: cover; background: var(--neutral-bg); flex: none; cursor: zoom-in; }

/* grafik */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: #e8eaee; stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; }
.chart .target-line { stroke: #8a929e; stroke-dasharray: 4 4; stroke-width: 1.5; }
.chart .target-label { fill: var(--text-2); font-size: 11px; font-weight: 600; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); margin-bottom: .4rem; }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .35rem; }
.tooltip { position: absolute; pointer-events: none; background: #15181d; color: #fff; padding: .4rem .6rem; border-radius: 6px; font-size: .78rem; white-space: nowrap; z-index: 10; transform: translate(-50%, -110%); box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.tooltip b { font-weight: 700; }
.empty { padding: 1.6rem; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 8px; background: var(--surface-2); }

/* checklist operator */
.std-img { width: 100%; max-height: 340px; object-fit: contain; background: #0b0f14; border-radius: 8px; cursor: zoom-in; }
.cat-block { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: .8rem; background: var(--surface); }
.cat-head { background: var(--brand); color: #fff; padding: .5rem .8rem; font-weight: 700; display: flex; justify-content: space-between; }
.item { padding: .7rem .8rem; border-top: 1px solid var(--border); }
.item:first-of-type { border-top: 0; }
.item-text { font-weight: 500; margin-bottom: .45rem; }
.seg { display: inline-flex; border: 1px solid #cfd4dc; border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: .5rem .95rem; font: inherit; font-weight: 700; cursor: pointer; color: var(--text-2); min-width: 64px; }
.seg button + button { border-left: 1px solid #cfd4dc; }
.seg button.on-OK { background: var(--good); color: #fff; }
.seg button.on-NG { background: var(--crit); color: #fff; }
.seg button.on-NA { background: #6b7380; color: #fff; }
.photo-pick { border: 2px dashed #cfd4dc; border-radius: 10px; padding: .8rem; text-align: center; cursor: pointer; background: var(--surface-2); position: relative; }
.photo-pick img { max-width: 100%; max-height: 220px; border-radius: 6px; display: block; margin: 0 auto .4rem; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.compare figure { margin: 0; }
.compare img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; background: var(--neutral-bg); cursor: zoom-in; }
.compare figcaption { font-size: .78rem; font-weight: 700; color: var(--text-2); margin-top: .3rem; }
.score-pick { display: flex; gap: .3rem; }
.score-pick button { width: 40px; height: 36px; border: 1px solid #cfd4dc; background: #fff; border-radius: 7px; font-weight: 800; cursor: pointer; }
.score-pick button.on { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }

/* tanda tangan */
.sign-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.sign-box { border: 1px solid var(--border); border-radius: 8px; padding: .6rem .8rem; text-align: center; background: #fff; }
.sign-box .role { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.sign-box .sig { height: 70px; display: grid; place-items: center; margin: .3rem 0; }
.sign-box .sig img { max-height: 70px; max-width: 100%; }
.sign-box .sig .nosig { font-size: .78rem; color: var(--muted); font-style: italic; }
.sign-box .nm { font-weight: 700; border-top: 1px solid var(--border); padding-top: .3rem; }
.sign-box .tm { font-size: .74rem; color: var(--muted); }
.sig-thumb { height: 34px; max-width: 110px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 4px; }
canvas.pad { width: 100%; height: 200px; border: 1px dashed #9aa3b0; border-radius: 8px; background: #fff; touch-action: none; }

/* modal & toast */
.modal-back { position: fixed; inset: 0; background: rgba(10, 16, 26, .55); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal { background: #fff; border-radius: 12px; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; padding: 1.2rem 1.3rem; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { width: min(880px, 100%); }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: grid; place-items: center; z-index: 60; cursor: zoom-out; }
.lightbox img { max-width: 95vw; max-height: 92vh; }
#toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: .4rem; align-items: center; }
.toast { background: #15181d; color: #fff; padding: .65rem 1rem; border-radius: 8px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.25); max-width: 90vw; }
.toast.err { background: var(--crit); }
.toast.ok { background: #0a7a0a; }
.secret { font-family: ui-monospace, monospace; background: var(--warn-bg); border: 1px solid #f3d48a; padding: .5rem .7rem; border-radius: 6px; font-size: 1.05rem; user-select: all; }
pre.code { background: #0f1720; color: #d7e2ef; padding: .8rem; border-radius: 8px; overflow: auto; max-height: 320px; font-size: .78rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .55rem .9rem; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--brand-2); border-bottom-color: var(--brand-2); text-decoration: none; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.qr-card { border: 2px solid var(--brand); border-radius: 12px; padding: .9rem; text-align: center; background: #fff; break-inside: avoid; }
.qr-card img { width: 180px; height: 180px; }
.qr-card .qc { font-size: 1.4rem; font-weight: 800; color: var(--brand); }
.qr-card .qn { font-weight: 600; }
.qr-card .qh { font-size: .72rem; color: var(--muted); margin-top: .3rem; }
.print-only { display: none; }

/* login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { background: linear-gradient(150deg, #0f2f57 0%, #1c4f8f 100%); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.login-hero h1 { font-size: 2.2rem; margin-bottom: .6rem; }
.login-hero .five { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: 2rem; max-width: 520px; }
.login-hero .five div { background: rgba(255,255,255,.1); border-radius: 10px; padding: .7rem .4rem; text-align: center; }
.login-hero .five b { display: block; font-size: 1.2rem; }
.login-hero .five span { font-size: .78rem; color: #c7d6ea; }
.login-form { display: grid; place-items: center; padding: 2rem; }
.login-form form { width: min(360px, 100%); }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; z-index: 40; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .menu-btn { display: inline-flex; }
  #clock { display: none; }
  .g2, .g3, .g-main { grid-template-columns: 1fr; }
  .content { padding: 1rem .8rem 4rem; }
  .topbar { padding: .7rem .8rem; }
  .compare { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { padding: 2rem 1.5rem; }
  .login-hero h1 { font-size: 1.6rem; }
  .kpi .k-value { font-size: 1.5rem; }
}

@media print {
  .sidebar, .topbar, .no-print, #toast { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; font-size: 12px; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .print-only { display: block; }
  .compare img { height: 170px; }
  .qr-card { border-width: 2px; }
  a { color: inherit; }
}

.open-banner { background: #fff4dc; color: #6b4700; border-bottom: 1px solid #f3d48a; padding: .45rem 1.5rem; font-size: .82rem; font-weight: 600; }
.open-banner a { margin-left: .5rem; }

/* ---------- papan 5R (meniru Transportation 5R Activity Board) ---------- */
.board { background: #f7f9fc; border: 6px solid #1f4fa0; border-radius: 10px; padding: .6rem .7rem .8rem; box-shadow: var(--shadow); }
.b-head { display: grid; grid-template-columns: 140px 1fr 140px; align-items: center; background: #fff; border-radius: 6px; padding: .35rem .8rem; margin-bottom: .5rem; border: 1px solid #d5ddeb; }
.b-head img { max-height: 42px; max-width: 140px; object-fit: contain; }
.b-head img:last-child { justify-self: end; }
.b-head h1 { margin: 0; text-align: center; color: #1f4fa0; letter-spacing: .14em; font-size: 1.35rem; font-weight: 900; text-transform: uppercase; }
.b-row { display: grid; grid-template-columns: 30px 1fr; gap: .45rem; margin-bottom: .45rem; }
.b-side { border-radius: 5px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .72rem; letter-spacing: .12em; }
.b-side span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.b-cells { display: grid; gap: .45rem; }
.b-tile { display: flex; flex-direction: column; background: #fff; border: 1px solid #d5ddeb; border-radius: 6px; overflow: hidden; color: inherit; min-height: 150px; transition: transform .12s, box-shadow .12s; }
.b-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(31, 79, 160, .18); border-color: #1f4fa0; }
.b-band { color: #fff; font-weight: 800; font-size: .78rem; letter-spacing: .05em; text-align: center; padding: .3rem .2rem; }
.b-zhead { font-weight: 900; font-size: .9rem; text-align: center; padding: .3rem .2rem; letter-spacing: .06em; background: #fbfcfe; border-bottom: 1px solid #e6ebf3; }
.b-paper { flex: 1; padding: .45rem; display: flex; flex-direction: column; gap: .3rem; font-size: .76rem; min-height: 0; }
.b-paper img { width: 100%; height: 118px; object-fit: cover; border-radius: 4px; background: var(--neutral-bg); }
.b-photo { padding: .35rem; }
.b-photo img { height: 130px; }
.b-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); border: 1px dashed #cfd6e2; border-radius: 4px; padding: .5rem; font-size: .74rem; min-height: 80px; }
.b-doc { flex: 1; display: grid; place-items: center; text-align: center; font-size: 1.6rem; }
.b-doc span { font-size: .76rem; font-weight: 600; }
.b-doc small { font-size: .7rem; color: var(--muted); }
.b-nums { display: flex; gap: .3rem; }
.b-nums > div { flex: 1; background: var(--surface-2); border-radius: 4px; padding: .25rem; text-align: center; font-size: .68rem; color: var(--text-2); }
.b-nums b { display: block; font-size: 1.15rem; color: var(--text); font-variant-numeric: tabular-nums; }
.b-nums .bad b { color: var(--crit); }
.b-line { font-size: .72rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-legend { font-size: .68rem; color: var(--muted); }
.b-legend i, .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 .2rem 0 .4rem; vertical-align: middle; }
.b-spark { width: 100%; height: auto; }
.b-award { font-size: .78rem; line-height: 1.5; background: #fff7e8; border-radius: 4px; padding: .3rem .4rem; }
.b-zname { font-weight: 700; border-left: 4px solid; padding-left: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-plate { border: 3px solid; border-radius: 4px; margin: 0 .35rem .35rem; text-align: center; font-weight: 900; font-size: .74rem; line-height: 1.2; padding: .3rem .2rem; background: #fff; letter-spacing: .03em; }
.b-pocket { border-width: 3px; background: #fff; align-items: center; justify-content: center; min-height: 110px; padding: .4rem; }
.b-pf { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border: 1px solid #d5ddeb; border-radius: 4px; overflow: hidden; }
.b-pf div { text-align: center; font-weight: 900; font-size: .9rem; padding: .3rem 0; letter-spacing: .03em; }
.b-pf div + div { border-left: 1px solid #d5ddeb; }
.b-pf b { display: block; font-size: 1.7rem; color: var(--text); font-variant-numeric: tabular-nums; }
.b-pocket small { color: var(--muted); font-size: .68rem; margin-top: .25rem; }
.b-rot { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.b-rot i { height: 12px; border-radius: 2px; opacity: .85; }
.b-center .b-tile { height: 100%; }
.slot-img { width: 100%; max-height: 80vh; object-fit: contain; background: #f3f5f8; border-radius: 6px; cursor: zoom-in; }
.slot-pdf { width: 100%; height: 75vh; border: 1px solid var(--border); border-radius: 6px; }
.kaizen-list { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.kaizen { border: 1px solid var(--border); border-radius: 8px; padding: .6rem; }
.kz-ph { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .5rem 0; }
.kz-ph figure { margin: 0; }
.kz-ph img { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.kz-ph figcaption { font-size: .74rem; font-weight: 700; color: var(--text-2); }
.legend i.sq { width: 12px; height: 12px; border-radius: 3px; }
table.rot th, table.rot td { padding: .25rem .2rem; text-align: center; font-size: .74rem; min-width: 26px; }
table.rot td:first-child, table.rot th:first-child { text-align: left; white-space: nowrap; position: sticky; left: 0; background: #fff; min-width: 120px; }
table.rot td.cell { color: #fff; font-weight: 800; border: 1px solid #fff; }
table.rot th.sun { color: var(--crit); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { text-align: center; font-weight: 700; font-size: .76rem; color: var(--muted); padding: .2rem; }
.cal-cell { min-height: 92px; border: 1px solid var(--border); border-radius: 6px; padding: .25rem; background: #fff; }
.cal-cell.off { background: transparent; border-style: dashed; }
.cal-cell.today { border: 2px solid var(--accent); }
.cal-d { font-weight: 700; font-size: .78rem; color: var(--text-2); }
.cal-ev { display: block; font-size: .68rem; padding: .08rem .3rem; border-radius: 4px; margin-top: 2px; background: var(--neutral-bg); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.good { background: var(--good-bg); color: #0a6f0a; } .cal-ev.info { background: #e4eefb; color: #1c4f8f; }
.cal-ev.serious { background: var(--serious-bg); color: #a3410f; } .cal-ev.crit { background: var(--crit-bg); color: #b02a2a; }
@media (max-width: 1100px) {
  .board { overflow-x: auto; }
  .b-row { min-width: 1000px; }
  .b-head { min-width: 1000px; }
}
@media print {
  .board { border-width: 3px; }
  .b-tile { break-inside: avoid; }
}

table.rotq th, table.rotq td { text-align: center; padding: .35rem .4rem; font-size: .8rem; }
table.rotq td:nth-child(2), table.rotq th:nth-child(2) { text-align: left; white-space: nowrap; }
table.rotq td.cell { color: #fff; font-weight: 800; border: 2px solid #fff; }
table.rotq .cur { outline: 3px solid #15181d; outline-offset: -3px; }

/* ---------- tabel Schedule 5R (meniru sheet "Zona N" Excel) ---------- */
.xs { padding: .7rem; }
.xs + .xs { margin-top: 1rem; }
.xs-head { display: grid; grid-template-columns: 150px 1fr 260px; border: 1px solid #9aa3b0; margin-bottom: -1px; }
.xs-logo { display: grid; place-items: center; padding: .4rem; border-right: 1px solid #9aa3b0; }
.xs-logo img { max-width: 130px; max-height: 50px; }
.xs-title { background: color-mix(in srgb, var(--zc) 80%, white); color: #111; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .25rem; text-align: center; font-weight: 900; font-size: 1.05rem; padding: .5rem; letter-spacing: .02em; }
.xs-title span { font-weight: 800; font-size: .9rem; }
.xs-info { border-collapse: collapse; font-size: .74rem; border-left: 1px solid #9aa3b0; }
.xs-info th, .xs-info td { border: 1px solid #c8ced8; padding: .15rem .35rem; text-align: left; }
.xs-info th { background: #f1f3f6; color: #15181d; text-transform: none; letter-spacing: 0; font-size: .74rem; }
.xs-wrap { overflow-x: auto; border: 1px solid #9aa3b0; }
table.xs-t { border-collapse: collapse; font-size: .7rem; width: max-content; min-width: 100%; }
table.xs-t th, table.xs-t td { border: 1px solid #b9c0cb; padding: 0; text-align: center; height: 22px; }
table.xs-t thead th { background: #9bd36a; color: #15181d; font-weight: 800; text-transform: none; letter-spacing: 0; font-size: .72rem; }
table.xs-t thead th.xs-s { background: #e9eef4; font-weight: 600; font-size: .62rem; width: 17px; min-width: 17px; }
table.xs-t th.xd { min-width: 51px; }
table.xs-t th.sun { color: #c62828; }
table.xs-t th.today { background: #ffd54a; }
table.xs-t .no { width: 26px; min-width: 26px; font-weight: 700; position: sticky; left: 0; background: #fff; z-index: 1; }
table.xs-t .tx { text-align: left; padding: 0 .4rem; min-width: 260px; max-width: 320px; position: sticky; left: 26px; background: #fff; z-index: 1; white-space: normal; }
table.xs-t .pe { padding: 0 .3rem; min-width: 58px; position: sticky; left: 286px; background: #fff; z-index: 1; font-size: .66rem; }
table.xs-t thead .no, table.xs-t thead .tx, table.xs-t thead .pe { background: #9bd36a; z-index: 2; }
table.xs-t tr.grp td { background: #c9ccd1; }
table.xs-t tr.grp td.tx, table.xs-t tr.grp td.no { background: #c9ccd1; font-size: .68rem; }
table.xs-t td.g { background: #b9bdc3; }
table.xs-t td.m { font-weight: 800; font-size: .78rem; background: #fff; }
table.xs-t td.m a { color: inherit; text-decoration: none; display: block; }
table.xs-t td.m.ok { color: #0a7a0a; background: #e4f5e4; }
table.xs-t td.m.ng { color: #fff; background: #d03b3b; }
table.xs-t td.m.na { color: #6b7380; }
table.xs-t td.m.miss { color: #d03b3b; background: #fdecec; }
table.xs-t tr.ft td { background: #fff; height: 26px; }
table.xs-t td.lg { text-align: left; padding: 0 .4rem; position: sticky; left: 0; z-index: 1; font-size: .7rem; }
table.xs-t td.pl { font-weight: 800; position: sticky; left: 286px; z-index: 1; background: #fff; font-size: .7rem; white-space: nowrap; padding: 0 .3rem; }
table.xs-t td.pf { font-size: .62rem; font-weight: 700; white-space: nowrap; overflow: hidden; }
table.xs-t td.pf a { color: #1c4f8f; text-decoration: none; }
table.xs-t td.pf.ok { background: #e4f5e4; color: #0a6f0a; }
table.xs-t td.pf.partial { background: #fff4dc; color: #8a5a00; }
table.xs-t td.pf.miss { background: #fdecec; }
.okc { color: #0a7a0a; } .ngc { color: #d03b3b; }
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  .xs-wrap { overflow: visible; }
  table.xs-t { font-size: 6px; }
  table.xs-t .tx { min-width: 150px; }
  table.xs-t th.xd { min-width: 0; }
}

table.xs-t td.pf img.psig { height: 20px; max-width: 100%; object-fit: contain; display: block; margin: 0 auto; }
table.xs-t td.pf .pname { font-size: .6rem; }
table.xs-t td.pf.todo { background: #fffbe8; }
table.xs-t td.pf small { font-size: .58rem; color: var(--muted); margin-left: .2rem; }
.pbtn { border: 1px dashed #c99a16; background: #fff; color: #8a5a00; border-radius: 4px; font-size: .62rem; font-weight: 700; padding: 0 .3rem; cursor: pointer; }
.pbtn:hover { background: #fff4dc; }
table.xs-t td.m.extra { outline: 2px dashed #8d939b; outline-offset: -3px; }

table.ptab td, table.ptab th { text-align: center; }
table.ptab td.pv { min-width: 84px; height: 34px; }
table.ptab td.pv.ok { background: #e4f5e4; }
table.ptab td.pv img { height: 26px; max-width: 90px; object-fit: contain; }
table.xs-t tr.ft td { height: 34px; }
table.xs-t td.pf img.psig { height: 28px; }

/* foto karyawan */
.ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; background: #dfe6ef; color: #33445a; font-size: .72rem; font-weight: 800; cursor: zoom-in; border: 1px solid #c7d1dd; }
.ava.ini { cursor: default; }
.ava.sm { width: 24px; height: 24px; font-size: .6rem; }
.ava.xs { width: 18px; height: 18px; font-size: .5rem; }
.who-cell { display: inline-flex; align-items: center; gap: .45rem; }
.crew-pill { display: inline-flex; align-items: center; gap: .35rem; padding-left: .2rem; }
.xs-info .who-cell { gap: .3rem; }

/* arsip Schedule 5R & pemilih bulan */
.xs-ar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: #f3f0e6; border: 1px dashed #b9a56b; border-radius: 6px; padding: .35rem .6rem; margin-bottom: .5rem; font-size: .8rem; color: #5b4a17; }
table.xs-t td.pf .pname.ar { font-style: italic; color: #4b5563; }
.mp-m, .mp-y { width: auto; padding: .25rem .4rem; font-weight: 700; }

/* foto pelaksana di kotak Pelaksana · Team tabel Schedule */
.ava.md { width: 30px; height: 30px; font-size: .62rem; }
.xs-head { grid-template-columns: 150px 1fr 300px; }
.xs-info td { padding: .2rem .4rem; vertical-align: middle; }
.xs-info td.xs-tm { font-weight: 800; text-align: center; width: 34px; }

.xs-info th .xs-pj { gap: .45rem; font-weight: 800; line-height: 1.25; }

.ava.lg { width: 96px; height: 96px; font-size: 1.6rem; }

table.rotq td.cell small.rq { display: block; font-size: .62rem; font-weight: 800; color: #fff; text-shadow: 0 0 2px rgba(0,0,0,.6); }

/* kotak SCHEDULE 5R di Papan = gambar tabel jadwal */
.b-paper.b-sched img { height: auto; max-height: 150px; object-fit: contain; object-position: top; background: #fff; border: 1px solid #e1e5ea; }

/* mode layar TV (akun "Layar TV"): tanpa menu samping, tombol kembali ke papan */
body.kiosk .sidebar, body.kiosk .menu-btn, body.kiosk #logout { display: none !important; }
body.kiosk .layout { grid-template-columns: 1fr !important; }
body.kiosk .main { margin-left: 0 !important; width: 100%; }
body.kiosk .content { overflow: hidden; max-width: none !important; padding: 8px 10px !important; margin: 0 !important; }
body.kiosk .topbar { position: sticky; top: 0; z-index: 20; }
body.kiosk #view > .board { max-width: none; }
.kiosk-home { background: #1f4fa0; color: #fff !important; font-weight: 800; border-radius: 8px; padding: .35rem .8rem; margin-right: .8rem; text-decoration: none !important; }
body.kiosk #view > p.muted { display: none; }
body.kiosk a[href^="#/isi"], body.kiosk .no-kiosk { display: none !important; }

/* CHECK SHEET papan: per shift hari ini (PLAN ● dijadwalkan, FINISH ✔ sudah diperiksa staff) */
table.b-pft { width: 100%; border-collapse: collapse; font-size: .78rem; }
table.b-pft th, table.b-pft td { border: 1px solid #e1e5ea; text-align: center; padding: .12rem .2rem; }
table.b-pft tr:first-child th { color: var(--zc); font-weight: 900; letter-spacing: .04em; font-size: .72rem; }
table.b-pft tr th:first-child { color: #4b5563; font-weight: 800; width: 28%; }
table.b-pft tr.cur th:first-child { background: #fff4c2; }
.pc { font-weight: 900; font-size: 1rem; }
.pc.plan { color: var(--zc); } .pc.no { color: #c0c6ce; } .pc.fin { color: #0a8a2a; } .pc.wait { font-size: .85rem; } .pc.miss { color: #d03b3b; }

/* Laporan & progress temuan abnormality (model sheet Excel "Abnormality") */
.ab-head { display: grid; grid-template-columns: 180px 1fr 190px; align-items: stretch; border: 1.5px solid #1f2937; border-bottom: 0; }
.ab-head > * { padding: .5rem .7rem; display: flex; align-items: center; }
.ab-logo img { max-height: 46px; max-width: 160px; }
.ab-head h2 { margin: 0; justify-content: center; text-align: center; font-size: 1.12rem; font-weight: 900; letter-spacing: .02em;
  border-left: 1.5px solid #1f2937; border-right: 1.5px solid #1f2937; }
.ab-org { flex-direction: column; justify-content: center; font-weight: 800; font-size: .82rem; text-align: center; line-height: 1.6; }
table.ab-tab { border-collapse: collapse; width: 100%; font-size: .82rem; }
table.ab-tab th, table.ab-tab td { border: 1px solid #1f2937; padding: .3rem .4rem; vertical-align: top; }
table.ab-tab th { background: #fff; color: #111; font-weight: 800; text-align: center; vertical-align: middle;
  text-transform: none; letter-spacing: 0; font-size: .8rem; padding: .3rem .3rem; }
table.ab-tab td.c { text-align: center; white-space: nowrap; }
table.ab-tab .ab-w { min-width: 150px; width: 19%; }
#fmon { width: auto; min-width: 170px; }
table.ab-tab td:nth-child(4) { min-width: 115px; }
table.ab-tab td.ab-sig { width: 54px; text-align: center; vertical-align: middle; font-size: .72rem; }
table.ab-tab td.ab-sig img { max-width: 58px; max-height: 32px; }
table.ab-tab tr.ab-late td { background: #fff5f5; }
table.ab-tab tr.ab-rej td { color: #9aa1ab; }
table.ab-tab .thumb { margin-top: .25rem; }
.ab-legend { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; margin-top: .55rem; font-size: .8rem; }
.ab-legend span { display: inline-flex; gap: .3rem; align-items: center; }
svg.prog { vertical-align: middle; }
/* kotak LIST PROBLEM papan */
.b-absum { display: flex; justify-content: space-between; gap: .2rem; font-size: .66rem; color: #4b5563; margin-bottom: .2rem; }
.b-absum b { font-size: .95rem; color: #1f2937; } .b-absum .bad b { color: #d03b3b; }
table.b-abn { width: 100%; border-collapse: collapse; font-size: .6rem; table-layout: fixed; }
table.b-abn th, table.b-abn td { border: 1px solid #cfd6df; padding: .08rem .15rem; text-align: center; }
table.b-abn th { font-weight: 800; background: #f4f6f9; text-transform: none; letter-spacing: 0; font-size: .6rem; color: #1f2937; padding: .1rem .15rem; }
table.b-abn th:nth-child(1), table.b-abn td:nth-child(1) { width: 25%; } table.b-abn th:nth-child(2), table.b-abn td:nth-child(2) { width: 15%; }
table.b-abn th:nth-child(4), table.b-abn td:nth-child(4) { width: 15%; }
table.b-abn td.k { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.b-abn tr.late td { background: #fff1f1; }
@media print { .ab-sheet { box-shadow: none; border: 0; padding: 0; } table.ab-tab { font-size: 9pt; } }
