/* Warna mengikuti logo GMK: biru #2F318B, merah #FF1808. */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #1b2335;
  --muted: #64708a;
  --border: #e1e5ee;
  --primary: #2f318b;
  --primary-hover: #25276f;
  --primary-soft: #eceefb;
  --primary-text: #ffffff;
  --accent: #e5170a;
  --success-bg: #e6f4ea; --success: #1e7b3a;
  --error-bg: #fdecee;   --error: #b42332;
  --warn-bg: #fff4e0;    --warn: #9a5b00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 28, 60, .05), 0 1px 3px rgba(20, 28, 60, .06);
  --shadow-lg: 0 8px 24px rgba(20, 28, 60, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141c; --surface: #1a1f2b; --surface-2: #151a24; --text: #e6ebf2; --muted: #96a2b6; --border: #2b3343;
    --primary: #8c90f0; --primary-hover: #a5a8f5; --primary-soft: #23264a; --primary-text: #10122a; --accent: #ff6a5c;
    --success-bg: #173322; --success: #7fd69a;
    --error-bg: #3a1a1f;   --error: #ff8f9b;
    --warn-bg: #3a2c12;    --warn: #ffc76b;
    --shadow: none; --shadow-lg: 0 8px 24px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.45; }
a { color: var(--primary); }
h1 { font-size: 1.5rem; margin: .25rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; font-weight: normal; }
.center { text-align: center; }

/* Lebar halaman: hampir selebar layar, dibatasi di layar sangat lebar agar baris teks tetap terbaca. */
:root { --page-max: 1680px; }
.container { max-width: var(--page-max); margin: 0 auto; padding: 16px 24px; }

.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 800; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.brand span, .login-card h1 span { color: var(--primary); }
.topnav { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; }
.topnav a { text-decoration: none; font-weight: 600; }
.logout { display: flex; align-items: center; gap: 8px; margin: 0; }
.who { font-size: .85rem; color: var(--muted); }

.btn { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-ghost { background: transparent; }
.btn-small { padding: 4px 10px; font-size: .85rem; }
.btn-block { width: 100%; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--bg); border: 1px solid var(--border); color: var(--muted); vertical-align: middle; }
.badge-new { background: var(--success-bg); color: var(--success); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge-danger { background: var(--error-bg); color: var(--error); border-color: transparent; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.panel.narrow { max-width: 520px; margin: 40px auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.login-card { max-width: 380px; margin: 10vh auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.login-card h1 { margin-bottom: 0; }
.tabs { display: flex; gap: 4px; margin: 14px 0; border-bottom: 1px solid var(--border); }
.tabs a { padding: 8px 12px; text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs { flex-wrap: wrap; }
.tabs a { white-space: nowrap; }
.tabs-sub { border-bottom: 0; margin: 8px 0; flex-wrap: wrap; }
.tabs-sub a { font-size: 0.9em; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; margin-bottom: 0; }
.tabs-sub a.active { border-color: var(--primary); }
.sep { border: none; border-top: 1px solid var(--border); margin: 18px 0 10px; }
.code-input { font-size: 1.4rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.narrow-form { max-width: 520px; }
a.who { text-decoration: none; }
a.who:hover { color: var(--primary); }

.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.form input, .form select, .form textarea, .filters input, .filters select {
  font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 100%;
}
.form label.check { flex-direction: row; align-items: center; gap: 8px; }
.form label.check input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.span-2 { grid-column: span 2; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input { flex: 1 1 140px; width: auto; }
.inline-form .check { margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input { flex: 2 1 200px; width: auto; }
.filters select { flex: 1 1 140px; width: auto; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.row-muted td { opacity: .6; }
.edit-row td { background: var(--bg); }

.grid-dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; margin: 0; }
.grid-dl dt { color: var(--muted); }
.grid-dl dd { margin: 0; }

.group-title { color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--text); }
.card:hover { border-color: var(--primary); }
.card-disabled { opacity: .55; }
.card-title { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.card-desc { color: var(--muted); font-size: .85rem; margin-top: 4px; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .grid-dl { grid-template-columns: 1fr; }
  .grid-dl dt { margin-top: 6px; }
  .who { display: none; }
}

/* ---------- Emergency Call ---------- */
.panel-title { margin: 0 0 12px; font-size: 1rem; }
.form-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); }
.form-actions .btn { min-width: 180px; }
.btn:disabled { opacity: .6; cursor: wait; }
.history { grid-column: span 2; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: .85rem; margin-bottom: 12px; }
.history ul { margin: 4px 0 0; padding-left: 18px; }
.history-title { font-weight: 700; }
.history-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.parts-table input { width: 100%; }
.parts-table .qty { max-width: 90px; }
.parts-table td, .parts-table th { padding: 4px 6px; }
#parts-box { margin-top: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.photo-item { display: flex; flex-direction: column; gap: 4px; }
.photo-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.photo-link { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border: 1px dashed var(--border); border-radius: 8px; font-size: .85rem; text-align: center; padding: 8px; }
.alert ul { margin: 4px 0; padding-left: 20px; }
.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-bottom: 16px; }
.actions { display: flex; gap: 8px; }
.prewrap { white-space: pre-wrap; margin-top: 0; }
.report h2 { font-size: 1rem; margin: 1.1rem 0 .4rem; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid var(--text); padding-bottom: 10px; margin-bottom: 14px; }
.report-company { font-weight: 800; letter-spacing: .03em; }
.report-title { color: var(--muted); font-weight: 700; font-size: .9rem; }
.report-code { font-size: 1.3rem; font-weight: 800; }
.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 32px 0 12px; }
.sign-line { border-top: 1px solid var(--text); margin-top: 56px; padding-top: 4px; text-align: center; min-height: 1.4em; }

@media (max-width: 640px) {
  .history { grid-column: span 1; }
  .parts-table thead { display: none; }
  .parts-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--border); }
  .parts-table td { border: none; }
  .parts-table td:first-child { grid-column: span 2; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #444; --border: #999; }
  body { background: #fff; font-size: 11pt; }
  .no-print, .alert { display: none !important; }
  .container { max-width: none; padding: 0; }
  .panel { border: none; padding: 0; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-item, .table tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- Laporan Service ---------- */
.temuan-table td, .temuan-table th { padding: 4px 6px; }
.temuan-table input, .temuan-table select { width: 100%; font: inherit; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.temuan-table .qty { max-width: 80px; }
.temuan-table input[readonly] { background: var(--bg); color: var(--muted); }
.temuan-table tr.is-nonpart .part-only > * { visibility: hidden; }
.temuan-table tr.is-empty .part-only > * { opacity: .4; }
#open-temuan { grid-column: auto; margin-bottom: 12px; }
#open-temuan .table { font-size: .82rem; background: transparent; }
@media (max-width: 640px) {
  .temuan-table thead { display: none; }
  .temuan-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .temuan-table td { border: none; }
  .temuan-table tr.is-nonpart .part-only { display: none; }
  .temuan-table td:nth-child(2), .temuan-table td:nth-child(6) { grid-column: span 2; }
}

/* ---------- Temuan & Berita Acara ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.stat-num { font-size: 1.5rem; font-weight: 800; }
.text-danger { color: var(--error); font-weight: 700; }
.clip-wide { max-width: 360px; }
.pick-table td { vertical-align: middle; }
.pick-table input[type="checkbox"] { width: 20px; height: 20px; }
.pick-table tr.picked td { background: var(--success-bg); }
.pick-table label { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 600; }
@media print {
  .report .badge { border: 1px solid #999; }
}

/* ---------- Dashboard, jadwal, monitoring ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-2 > .panel { margin-bottom: 16px; min-width: 0; }
.stat-link { text-decoration: none; color: var(--text); }
.stat-link:hover { border-color: var(--primary); }
.progress { width: 100%; height: 8px; margin: 6px 0 2px; accent-color: var(--primary); }
.chart svg { width: 100%; height: auto; display: block; }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-bar { fill: var(--primary); }
.chart-bar-zero { fill: var(--border); }
.chart-bar-active { fill: #f97316; }
.chart-value { font-size: 18px; fill: var(--text); font-weight: 700; }
.chart-label { font-size: 16px; fill: var(--muted); }
/* Judul kolom yang bisa diurutkan (table[data-sortable]) */
.th-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.th-sort:hover { color: var(--primary); }
.th-sort:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }
.th-sort::after { content: '\2195'; font-size: .8em; opacity: .35; }
th[aria-sort="ascending"] .th-sort::after { content: '\2191'; opacity: 1; }
th[aria-sort="descending"] .th-sort::after { content: '\2193'; opacity: 1; }
/* Grafik batang berkelompok (partials/bar-chart-group) */
.chart-s-app { fill: var(--primary); background: var(--primary); }
.chart-s-form { fill: #0d9488; background: #0d9488; }
.chart-s-target { fill: #c7cbe0; background: #c7cbe0; }
@media (prefers-color-scheme: dark) { .chart-s-target { fill: #4a4e78; background: #4a4e78; } }
.chart-value-sm { font-size: 13px; }
.chart-band { fill: var(--primary-soft); }
.chart-hit { fill: transparent; }
/* Rincian lift per bulan (Beranda portal): kolom grafik bisa diklik, kolom terpilih disorot. */
.is-pickable .chart-col { cursor: pointer; }
.is-pickable .chart-col:hover .chart-hit { fill: var(--primary-soft); fill-opacity: .6; }
.chart-col.is-picked .chart-hit { fill: var(--primary-soft); fill-opacity: 1; }
.month-detail-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.month-picks { display: flex; flex-wrap: wrap; gap: 4px; }
.month-pick { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.month-pick:hover { border-color: var(--primary); color: var(--primary); }
.month-pick-year { font-weight: 700; }
.month-pick[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.month-title { margin: 12px 0 4px; font-size: 1.05rem; }
.month-panel h4 { margin: 12px 0 4px; font-size: .95rem; }
.month-sub { margin: 10px 0 4px; font-size: .85rem; }
.unit-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.unit-chips li { padding: 4px 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.count-pill { display: inline-block; min-width: 2.2em; text-align: center; padding: 0 6px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .8rem; }
.chart-label-active { fill: var(--text); font-weight: 700; }
.chart-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 4px; font-size: .8rem; color: var(--muted); }
.chart-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 16px; }
.cal-head { font-size: .75rem; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; }
.cal-day { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; min-height: 76px; padding: 4px; overflow: hidden; }
.cal-empty { background: transparent; border-color: transparent; }
.cal-sunday { background: var(--bg); }
.cal-today { border-color: var(--primary); border-width: 2px; }
.cal-num { font-size: .75rem; font-weight: 700; color: var(--muted); }
.cal-item { font-size: .7rem; line-height: 1.25; padding: 1px 4px; margin-top: 2px; border-radius: 4px; background: var(--bg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item.badge-new { background: var(--success-bg); color: var(--success); }
.cal-item.badge-warn { background: var(--warn-bg); color: var(--warn); }
.cal-item.badge-danger { background: var(--error-bg); color: var(--error); }
.project-table td:nth-child(6) { min-width: 320px; }
.project-year { margin-top: 2px; }
.project-print-title { text-align: center; margin: 4px 0 12px; }
.project-print-title h2 { margin: 0 0 2px; font-size: 1.1rem; letter-spacing: .04em; }
.pe-print { max-width: 900px; margin: 0 auto; }
.pe-cat { margin-bottom: 18px; }
.pe-cat-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 14px 0 6px; padding: 6px 10px; background: var(--primary); color: #fff; font-size: .95rem; letter-spacing: .03em; border-radius: 4px; }
.pe-cat-title small { font-weight: 500; font-size: .78rem; opacity: .9; }
.pe-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .9rem; }
.pe-table .pe-c-no { width: 44px; }
.pe-table .pe-c-per { width: 120px; }
.pe-table .pe-c-act { width: 90px; }
.pe-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 5px 8px; border-bottom: 1.5px solid var(--text); }
.pe-table td { padding: 5px 8px; vertical-align: top; }
.pe-table th:nth-child(4), .pe-table td:nth-child(4) { text-align: right; }
.pe-item { border-bottom: 1px solid var(--border); }
.pe-head td { padding-top: 8px; }
.pe-detail td { padding-top: 0; padding-bottom: 8px; }
.pe-year { display: grid; grid-template-columns: 92px 1fr; gap: 0 10px; padding: 3px 0; font-size: .84rem; }
.pe-year + .pe-year { border-top: 1px dotted var(--border); }
.pe-year-label small { display: block; color: var(--muted); font-size: .72rem; }
.pe-year ol { margin: 0; padding-left: 1.4em; columns: 2 220px; column-gap: 22px; }
.pe-year li { margin: 0 0 1px; break-inside: avoid; }
.project-print-foot { margin-top: 10px; }
@media print {
  .pe-print { max-width: none; }
  .pe-table { font-size: 9.5pt; }
  .pe-table thead { display: table-header-group; }
  .pe-year { font-size: 8.8pt; break-inside: avoid; }
  .pe-head { break-after: avoid; }
  .pe-cat-title { break-after: avoid; background: #2f318b !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .project-print-title h2 { font-size: 13pt; }
}
@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
  .cal-day { min-height: 54px; }
  .cal-item { font-size: .6rem; }
}
@media print {
  .calendar { gap: 2px; }
  .cal-day { min-height: 60px; }
}
.stat-text { font-weight: 700; margin-top: 6px; }
.check-columns { columns: 3 220px; column-gap: 16px; }
.check-columns label.check { break-inside: avoid; margin-bottom: 6px; font-weight: normal; }

/* =====================================================================
   Tampilan v2: identitas GMK, header, footer, ikon, tabel, login, kop
   (aturan di sini sengaja menimpa aturan dasar di atas)
   ===================================================================== */
body { display: flex; flex-direction: column; min-height: 100vh; font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
main.container { flex: 1 0 auto; width: 100%; padding-top: 20px; padding-bottom: 28px; }
h1 { font-size: 1.55rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; }
a { text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 20; gap: 20px; padding: 0 20px; min-height: 60px; box-shadow: var(--shadow); border-bottom: 1px solid var(--border); }
.topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--primary) 0 70%, var(--accent) 70%); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; white-space: nowrap; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand-text strong { color: var(--primary); font-weight: 800; margin-right: 2px; }
.topnav { gap: 2px; align-items: center; }
.topnav > a, .nav-menu > summary { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .93rem; text-decoration: none; cursor: pointer; }
.topnav > a:hover, .nav-menu > summary:hover { background: var(--surface-2); color: var(--text); }
.topnav > a.active, .nav-menu.active > summary { background: var(--primary-soft); color: var(--primary); }
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; gap: 4px; white-space: nowrap; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); margin-left: 4px; }
.nav-menu-list { position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px; display: flex; flex-direction: column; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 30; }
.nav-menu-list a { padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--text); font-weight: 500; }
.nav-menu-list a:hover { background: var(--surface-2); }
.nav-menu-list a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.logout { gap: 10px; }
.who { display: inline-flex; align-items: center; gap: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-text); }
.btn-ghost:hover { background: var(--surface-2); }

/* Panel, kartu, statistik */
.panel, .table-wrap, .stat, .card { box-shadow: var(--shadow); }
.panel-title { display: flex; align-items: center; gap: 8px; }
.stat { position: relative; padding: 14px 16px; }
.stat-num { font-size: 1.7rem; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .muted.small { margin-top: 2px; }
.stat-link { transition: border-color .15s, box-shadow .15s, transform .15s; }
.stat-link:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.stat-icon { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat-icon .icon { width: 18px; height: 18px; }
.stat-icon.is-warn { background: var(--warn-bg); color: var(--warn); }
.stat-icon.is-danger { background: var(--error-bg); color: var(--error); }
.card { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

/* Tab halaman gedung */
.tabs { gap: 2px; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; }
.tabs a:hover { color: var(--text); }
.tabs-sub a.active { background: var(--primary-soft); color: var(--primary); }

/* Tabel */
.table th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.table tbody tr:hover td { background: var(--surface-2); }
.table td { font-variant-numeric: tabular-nums; }
.badge { font-weight: 600; }

/* Halaman judul gedung */
.page-title { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.page-title .icon { width: 28px; height: 28px; color: var(--primary); }

/* Footer */
.site-footer { margin-top: auto; background: var(--surface); border-top: 1px solid var(--border); }
.footer-inner { max-width: var(--page-max); margin: 0 auto; padding: 18px 24px; display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; font-size: .88rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; object-fit: contain; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); }
.footer-contact li { display: inline-flex; align-items: center; gap: 6px; }
.footer-copy { width: 100%; padding-top: 10px; border-top: 1px solid var(--border); }

/* Login */
.no-topbar main.container { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.no-topbar main.container > .alert { width: 100%; max-width: 420px; }
.login-card { width: 100%; max-width: 420px; margin: 6vh auto; padding: 28px; box-shadow: var(--shadow-lg); border-top: 4px solid var(--primary); }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.login-brand img { width: 64px; height: 64px; object-fit: contain; }
.login-brand h1 { margin: 0; font-size: 1.45rem; color: var(--primary); }
.login-company { font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }

/* Error / kosong */
.panel.narrow { text-align: center; padding: 32px 24px; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }

/* Kop dokumen cetak */
.report-head { border-bottom: 3px solid var(--primary); }
.report-company { display: flex; align-items: center; gap: 10px; color: var(--primary); }
.report-company small { display: block; font-weight: 500; font-size: .75rem; letter-spacing: 0; color: var(--muted); }
.kop-logo { width: 44px; height: 44px; object-fit: contain; }

/* Tombol yang sedang memproses */
.btn.is-busy { opacity: .7; cursor: progress; pointer-events: none; }

/* HP: menu bisa digeser, tabel jadi kartu */
@media screen and (max-width: 760px) {
  .topbar { padding: 8px 12px; gap: 8px 12px; }
  .brand-text { display: none; }
  .topnav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .nav-menu-list { position: fixed; left: 12px; right: 12px; top: auto; }
  .topnav > a, .nav-menu > summary { padding: 7px 6px; font-size: .86rem; }
  .logout { margin-left: auto; }
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .table-cards tr:last-child { border-bottom: none; }
  .table-cards td { border: none; padding: 3px 0 3px 38%; position: relative; min-height: 1.6em; }
  .table-cards td::before { content: attr(data-label); position: absolute; left: 0; top: 5px; width: 35%; color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
  .table-cards td:not([data-label])::before, .table-cards td[data-label=""]::before { display: none; }
  .table-cards td:not([data-label]), .table-cards td[data-label=""], .table-cards td[colspan] { padding-left: 0; }
  .table-cards tbody tr:hover td { background: none; }
}

@media print {
  body { display: block; }
  .site-footer, .topbar { display: none !important; }
  .panel, .table-wrap, .stat, .card { box-shadow: none; }
  .report-head { border-bottom-color: #2f318b; }
  .report-company { color: #2f318b; }
}

@media screen and (min-width: 761px) { .nav-menu:last-of-type .nav-menu-list { left: auto; right: 0; } }
.filters .filter-customer { flex: 2 1 220px; }

/* ===== Dashboard utama (tata letak mengikuti OPREC lama) ===== */
.ov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ov-card { position: relative; display: block; border-radius: 12px; padding: 20px 22px; color: #fff; text-decoration: none; box-shadow: 0 4px 12px rgba(0, 0, 0, .1); transition: box-shadow .15s, transform .15s; }
.ov-card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .18); transform: translateY(-1px); }
.ov-blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.ov-pink { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.ov-cyan { background: linear-gradient(135deg, #3d9cf0 0%, #00c6e0 100%); }
.ov-card .ov-icon { width: 36px; height: 36px; opacity: .9; margin-bottom: 8px; }
.ov-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .92; }
.ov-value { font-size: 2.5rem; font-weight: 800; line-height: 1.15; margin: 6px 0 2px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 4px rgba(0, 0, 0, .18); }
.ov-sub { font-size: .8rem; opacity: .88; }
.ov-panel { border-radius: 12px; padding: 20px; }
.ov-title { margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--border); color: var(--primary); font-size: 1rem; }

.donut { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
.donut svg { width: 200px; max-width: 60%; height: auto; }
.donut-seg { fill: none; stroke-width: 34; }
.donut-num { font-size: 30px; font-weight: 800; fill: var(--text); }
.donut-cap { font-size: 13px; fill: var(--muted); }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.donut-legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.cov-0 { stroke: #667eea; background: #667eea; }
.cov-1 { stroke: #f093fb; background: #f093fb; }
.cov-2 { stroke: #4facfe; background: #4facfe; }
.cov-3 { stroke: #fa709a; background: #fa709a; }
.cov-4 { stroke: #f2c94c; background: #f2c94c; }
.cov-5 { stroke: #43c59e; background: #43c59e; }

.trend-grid { stroke: var(--border); stroke-width: 1; }
.trend-line { fill: none; stroke: #ff7a59; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.trend-dot { fill: #ff7a59; stroke: var(--surface); stroke-width: 1.5; }
.trend-value { font-size: 15px; font-weight: 700; fill: #c2410c; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }

.finding-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.finding-kpi { --tone: var(--primary); display: block; padding: 14px 16px; border: 1px solid var(--border); border-left: 4px solid var(--tone); border-radius: 10px; background: var(--surface-2); color: var(--text); text-decoration: none; }
a.finding-kpi:hover { border-color: var(--tone); }
.finding-label { display: block; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.finding-value { display: block; margin: 4px 0 2px; font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.finding-note { color: var(--muted); font-size: .72rem; }
.tone-primary { --tone: var(--primary); }
.tone-good { --tone: #16a34a; }
.tone-watch { --tone: #f59e0b; }
.tone-risk { --tone: #dc2626; }
.track { display: block; width: 100%; height: 8px; margin-top: 8px; }
.track-bg { fill: var(--border); }
.track-fill { fill: var(--tone); }
.track-aging { fill: #e8590c; }
.finding-layout { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.7fr); gap: 16px; margin-bottom: 8px; }
.finding-panel { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.finding-panel h3 { margin: 0 0 12px; font-size: .95rem; color: var(--primary); }
.aging-row + .aging-row { margin-top: 12px; }
.aging-head { display: flex; justify-content: space-between; font-size: .88rem; }
.table-scroll { overflow-x: auto; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.yield-badge { display: inline-block; min-width: 52px; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; text-align: center; color: #fff; background: var(--tone); }

.activity-list { display: grid; gap: 10px; }
.activity-item { display: block; padding: 12px 14px; border-left: 4px solid #667eea; border-radius: 6px; background: var(--surface-2); color: var(--text); text-decoration: none; }
.activity-item:hover { background: var(--primary-soft); }
.activity-time { color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.activity-cov { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 12px; background: #667eea; color: #fff; font-size: .7rem; font-weight: 700; }
@media (max-width: 760px) {
  .finding-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finding-layout { grid-template-columns: 1fr; }
}

/* Versi cetak Project Experience: halaman A4 tegak (named page; tanpa <style> inline karena CSP) */
@page pe { size: A4 portrait; margin: 12mm 12mm 14mm; }
@media print { .pe-print { page: pe; } }

/* Dashboard: Temuan Part Belum Ditindaklanjuti */
.open-monitor { margin: 16px 0 10px; }
.open-monitor-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.open-monitor-head h3 { margin: 0; }
.open-monitor-head .btn .icon { width: 16px; height: 16px; vertical-align: -3px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--text); font-size: .75rem; font-weight: 700; }
.open-filters { margin-bottom: 6px; }
.open-filters input { flex: 2 1 240px; }
.open-table { min-width: 760px; }
.open-table tbody[hidden] { display: none; }
.prio { display: inline-block; min-width: 64px; padding: 3px 8px; border-radius: 999px; text-align: center; font-size: .72rem; font-weight: 800; }
.prio-critical { color: #991b1b; background: #fee2e2; }
.prio-high { color: #9a3412; background: #ffedd5; }
.prio-medium { color: #854d0e; background: #fef9c3; }
.prio-recent { color: #1e40af; background: #dbeafe; }
.open-detail td { background: var(--surface-2); }
.open-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0; font-size: .85rem; }
.open-detail-grid dt { font-weight: 700; }
.open-detail-grid dd { margin: 2px 0 0; color: var(--muted); }
@media (max-width: 760px) { .open-detail-grid { grid-template-columns: 1fr; } }

/* Preview cetak Temuan Part: A4 mendatar */
@page tp { size: A4 landscape; margin: 12mm; }
@media print { .tp-print { page: tp; } .tp-table { font-size: 9pt; } .tp-table thead { display: table-header-group; } .tp-table tr { break-inside: avoid; } }
.tp-table td:nth-child(-n+2), .tp-table td:nth-child(7), .tp-table td:nth-child(8), .open-table td:nth-child(2), .open-table td:nth-child(6) { white-space: nowrap; }

/* ===== Gaya halaman mengikuti OPREC lama (panel, KPI, toolbar, tabel, badge urgensi) ===== */
.o-panel { margin-bottom: 16px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 30px rgba(15, 23, 42, .07); }
.o-title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--primary); font-size: 1.55rem; }
.o-title .icon { width: 26px; height: 26px; color: #0ea5a4; flex: none; }
.o-sub { margin: 0; color: var(--muted); font-size: .9rem; }
.o-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 18px; }
.o-kpi { padding: 14px 15px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); color: var(--text); text-decoration: none; }
a.o-kpi { transition: border-color .15s, box-shadow .15s; }
a.o-kpi:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.o-kpi-label { color: var(--muted); font-size: .75rem; font-weight: 800; }
.o-kpi-value { margin-top: 7px; font-size: 1.75rem; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.o-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(auto-fit, minmax(180px, 230px)); gap: 12px; align-items: center; }
.o-toolbar input, .o-toolbar select { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text); font: inherit; }
.o-meta { margin: 0 0 10px; color: var(--muted); font-size: .82rem; }
.o-table-wrap { max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: 11px; }
.o-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.o-table th, .o-table td { padding: 12px 11px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.o-table th { position: sticky; top: 0; z-index: 1; color: var(--primary); background: var(--surface-2); font-weight: 800; font-size: .74rem; text-transform: uppercase; letter-spacing: .02em; }
.o-table tbody tr:hover { background: var(--primary-soft); }
.o-table tbody tr:last-child td { border-bottom: 0; }
.o-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.o-strong { font-weight: 700; }
.o-empty { padding: 26px; text-align: center; color: var(--muted); }
.o-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.t-critical { --t: #dc2626; --tb: #fee2e2; --tt: #991b1b; }
.t-orange { --t: #ea580c; --tb: #ffedd5; --tt: #9a3412; }
.t-yellow { --t: #ca8a04; --tb: #fef9c3; --tt: #854d0e; }
.t-safe { --t: #16a34a; --tb: #dcfce7; --tt: #166534; }
.t-info { --t: #2563eb; --tb: #dbeafe; --tt: #1e40af; }
.t-muted { --t: #64748b; --tb: #f1f5f9; --tt: #475569; }
.o-badge[class*="t-"] { background: var(--tb); color: var(--tt); }
.o-kpi[class*="t-"] .o-kpi-value { color: var(--t); }
.o-track { display: block; width: 100%; max-width: 140px; height: 6px; margin-top: 6px; }
.o-track .bg { fill: var(--border); }
.o-track .fill { fill: var(--t); }
.o-highlight { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; border-left: 6px solid var(--t); }
.o-kicker { margin-bottom: 6px; color: var(--t); font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.o-highlight h2 { margin: 0 0 8px; color: var(--tt); font-size: 1.3rem; overflow-wrap: anywhere; }
.o-highlight-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .82rem; }
.o-highlight-meta .icon { width: 14px; height: 14px; vertical-align: -2px; }
.o-big { min-width: 110px; text-align: center; }
.o-big strong { display: block; color: var(--t); font-size: 2.2rem; line-height: 1; font-weight: 900; }
.o-big span { color: var(--muted); font-size: .75rem; font-weight: 700; }
@media (prefers-color-scheme: dark) {
  .o-badge[class*="t-"] { background: color-mix(in srgb, var(--t) 22%, transparent); color: color-mix(in srgb, var(--t) 70%, white); }
  .o-highlight h2 { color: var(--text); }
}
@media (max-width: 640px) {
  .o-panel { padding: 16px; }
  .o-highlight { grid-template-columns: 1fr; }
  .o-toolbar { grid-template-columns: 1fr; }
}
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { color: var(--primary); text-decoration: underline; }

/* Tab, judul bagian, grafik garis/batang mendatar (gaya OPREC lama) */
.o-tabs { display: flex; gap: 4px; margin: 20px 0 16px; border-bottom: 2px solid var(--border); flex-wrap: wrap; }
.o-tabs a { padding: 10px 16px; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 700; text-decoration: none; }
.o-tabs a:hover { color: var(--primary); background: var(--primary-soft); }
.o-tabs a.active { color: #fff; background: #3b82f6; }
.o-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.o-section-head h2 { margin: 0; color: var(--primary); font-size: 1.05rem; }
.o-section-head p { margin: 0; color: var(--muted); font-size: .8rem; }
.nowrap { white-space: nowrap; }
.line-chart svg, .hbar-chart svg { width: 100%; height: auto; display: block; }
.lc-title { font-size: 13px; font-weight: 700; fill: var(--text); }
.lc-axis { font-size: 12px; fill: var(--muted); }
.lc-axis-title { font-size: 12px; font-style: italic; fill: var(--muted); }
.lc-line { fill: none; stroke: var(--c); stroke-width: 3; stroke-linejoin: round; }
.lc-dot { fill: var(--c); stroke: var(--surface); stroke-width: 1.5; }
.lc-value { font-size: 12px; font-weight: 700; fill: var(--text); }
.lc-legend { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: .8rem; }
.lc-key { display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--c); border-radius: 2px; }
.lc-s0 { --c: #3366cc; } .lc-s1 { --c: #dc3912; } .lc-s2 { --c: #ff9900; } .lc-s3 { --c: #109618; }
.lc-s4 { --c: #990099; } .lc-s5 { --c: #0099c6; } .lc-s6 { --c: #dd4477; } .lc-s7 { --c: #66aa00; }
.hb-bar { fill: #0ea5a4; }

/* Frekuensi gangguan */
.fq-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.2fr); gap: 10px; margin-top: 18px; }
.fq-filters label { display: grid; gap: 4px; color: #3b82f6; font-size: .72rem; font-weight: 700; }
.fq-filters select, .fq-filters input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 400; }
.fq-kpi { border-left: 4px solid var(--tone); }
.fq-kpi[data-tone="primary"] { --tone: #0b3d91; }
.fq-kpi[data-tone="orange"] { --tone: #f97316; }
.fq-kpi[data-tone="red"] { --tone: #dc2626; }
.fq-kpi[data-tone="teal"] { --tone: #0ea5a4; }
.fq-kpi small { color: var(--muted); font-size: .72rem; }
.fq-list { display: grid; gap: 10px; }
.fq-customer, .fq-unit { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.fq-customer > summary, .fq-unit > summary { list-style: none; cursor: pointer; }
.fq-customer > summary::-webkit-details-marker, .fq-unit > summary::-webkit-details-marker { display: none; }
.fq-customer-head { display: grid; grid-template-columns: minmax(0, 1fr) 115px 115px 104px; gap: 14px; align-items: center; padding: 16px; border-radius: 12px; background: var(--surface-2); }
.fq-customer[open] > .fq-customer-head { border-radius: 12px 12px 0 0; margin-bottom: 12px; }
.fq-customer-head .fq-id strong { font-size: 1.05rem; color: var(--primary); }
.fq-id { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.fq-id small { color: var(--muted); }
.fq-metric { display: grid; text-align: center; }
.fq-metric small { color: var(--muted); font-size: .7rem; }
.fq-metric strong { font-size: 1.15rem; }
.fq-units { display: grid; gap: 10px; padding: 0 12px 12px; }
/* Kolom tetap supaya semua kartu unit sejajar (seperti OPREC lama). */
.fq-unit-main { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1.1fr) repeat(3, 100px) 140px 76px; gap: 12px; align-items: center; padding: 14px 14px 10px; }
.fq-unit-main .fq-metric, .fq-customer-head .fq-metric { text-align: left; }
.fq-unit-main .fq-id strong { color: var(--primary); font-size: 1rem; }
.fq-unit-main > .o-badge { justify-self: stretch; text-align: left; }
.fq-toggle { justify-content: center; }
.fq-rank { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .8rem; font-weight: 800; }
.fq-last { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.fq-freq { grid-column: 1 / -1; display: block; }
.fq-freq .o-track { max-width: none; height: 8px; margin-top: 2px; }
.fq-track .fill { fill: url(#fq-grad); }
.sr-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.fq-freq-note { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; margin-top: 4px; }
.when-open { display: none; }
details[open] > summary .when-open { display: inline; }
details[open] > summary .when-closed { display: none; }
.fq-details { padding: 0 14px 14px; }
details[open] > summary .fq-toggle { background: var(--primary); color: var(--primary-text); }
.ec-table { min-width: 1100px; }
@media (max-width: 900px) {
  .fq-filters { grid-template-columns: 1fr 1fr; }
  .fq-unit-main { grid-template-columns: 32px 1fr auto auto; gap: 10px; }
  .fq-unit-main > .o-badge { justify-self: end; }
  .fq-unit-main .fq-id { grid-column: 2 / -1; }
  .fq-unit-main .fq-metric { grid-column: 2; white-space: nowrap; display: flex; gap: 6px; align-items: baseline; }
  .fq-customer-head .fq-id strong { font-size: .95rem; }
  .fq-unit-main .fq-last, .fq-unit-main .opt, .fq-customer-head .opt { display: none; }
  .fq-customer-head { grid-template-columns: minmax(0, 1fr) auto auto; }
}
.hbar-chart { max-height: 440px; overflow-y: auto; border: 1px solid var(--border); border-radius: 11px; padding: 8px 4px; }

/* Catatan Temuan */
.o-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tm-filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tm-kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tm-k0 { --tone: #0b3d91; } .tm-k1 { --tone: #f97316; } .tm-k2 { --tone: #16a34a; } .tm-k3 { --tone: #dc2626; }
.tm-k4 { --tone: #0ea5a4; } .tm-k5 { --tone: #2563eb; } .tm-k6 { --tone: #7c3aed; }
.tm-customer-head { grid-template-columns: minmax(0, 1fr) 80px 80px 80px 80px auto; }
.tm-unit-head { display: grid; grid-template-columns: minmax(140px, 1fr) repeat(3, 64px) repeat(2, 64px) 80px 96px auto; gap: 10px; align-items: center; padding: 12px 14px; }
.tm-table { min-width: 1050px; }
.t-purple { --t: #7c3aed; --tb: #ede9fe; --tt: #5b21b6; }
@media (max-width: 1000px) {
  .tm-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tm-unit-head { grid-template-columns: minmax(0, 1fr) repeat(3, 56px) auto; }
  .tm-unit-head .opt { display: none; }
}
@media (max-width: 640px) {
  .tm-filters { grid-template-columns: 1fr 1fr; }
  .tm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-customer-head { grid-template-columns: minmax(0, 1fr) 60px 60px auto; }
  .tm-unit-head { grid-template-columns: minmax(0, 1fr) 50px 50px auto; }
  .tm-unit-head .fq-metric:nth-of-type(4) { display: none; }
}
@media (min-width: 1001px) { .tm-unit-head { grid-template-columns: minmax(140px, 1fr) repeat(3, 60px) repeat(2, 60px) 80px 104px auto; } }
.tm-unit-head .fq-metric strong { font-size: 1rem; white-space: nowrap; }

/* Review Laporan Service */
.rv-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.rv-filters select, .rv-toolbar input { width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text); font: inherit; }
.rv-summary { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 20px; align-items: center; }
.rv-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rv-kpis .o-kpi-label .icon { width: 14px; height: 14px; vertical-align: -2px; }
.rv-v-primary { color: var(--primary); }
.rv-donut { text-align: center; }
.rv-donut svg { width: 170px; height: auto; }
.rv-seg { fill: none; stroke-width: 26; }
.rv-pending { stroke: #ef4444; }
.rv-done { stroke: #16a34a; }
.rv-pct { font-size: 30px; font-weight: 800; fill: var(--primary); }
.rv-legend { display: flex; justify-content: center; gap: 14px; font-size: .75rem; color: var(--muted); }
.rv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.rv-done-bg { background: #16a34a; } .rv-pending-bg { background: #ef4444; }
.rv-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px; align-items: center; }
.rv-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.rv-quick input { position: absolute; opacity: 0; pointer-events: none; }
.rv-quick span { display: inline-block; padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; font-weight: 700; font-size: .85rem; cursor: pointer; background: var(--surface); }
.rv-quick input:checked + span { background: #0f172a; color: #fff; border-color: #0f172a; }
.rv-quick input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.rv-list { display: grid; gap: 12px; }
.rv-card { border-left: 5px solid var(--t); margin-bottom: 0; }
.rv-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rv-heading h2 { margin: 0; font-size: 1rem; }
.rv-copy { display: flex; justify-content: space-between; margin: 12px 0 6px; font-size: .82rem; }
.rv-track { display: block; width: 100%; height: 8px; }
.rv-track .bg { fill: var(--border); }
.rv-track .fill { fill: var(--t); }
.rv-detail > summary { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; list-style: none; cursor: pointer; }
.rv-detail > summary::-webkit-details-marker { display: none; }
.rv-pending-copy { font-size: .82rem; color: var(--muted); }
.rv-detail[open] > summary { margin-bottom: 10px; }
.rv-detail[open] .rv-toggle { background: var(--primary); color: var(--primary-text); }
@media (max-width: 700px) {
  .rv-summary, .rv-toolbar { grid-template-columns: 1fr; }
  .rv-filters { grid-template-columns: 1fr 1fr; }
}

/* Jadwal Service: kalender bulan dengan bar jadwal (gaya dhtmlx scheduler di OPREC lama) */
.c-s1 { grid-column-start: 1; }
.c-w1 { grid-column-end: span 1; }
.c-s2 { grid-column-start: 2; }
.c-w2 { grid-column-end: span 2; }
.c-s3 { grid-column-start: 3; }
.c-w3 { grid-column-end: span 3; }
.c-s4 { grid-column-start: 4; }
.c-w4 { grid-column-end: span 4; }
.c-s5 { grid-column-start: 5; }
.c-w5 { grid-column-end: span 5; }
.c-s6 { grid-column-start: 6; }
.c-w6 { grid-column-end: span 6; }
.c-s7 { grid-column-start: 7; }
.c-w7 { grid-column-end: span 7; }
.c-r1 { grid-row-start: 2; }
.c-r2 { grid-row-start: 3; }
.c-r3 { grid-row-start: 4; }
.c-r4 { grid-row-start: 5; }
.c-r5 { grid-row-start: 6; }
.c-r6 { grid-row-start: 7; }
.c-r7 { grid-row-start: 8; }
.c-r8 { grid-row-start: 9; }
.c-r9 { grid-row-start: 10; }
.c-r10 { grid-row-start: 11; }
.c-r11 { grid-row-start: 12; }
.c-r12 { grid-row-start: 13; }
.c-r13 { grid-row-start: 14; }
.c-r14 { grid-row-start: 15; }
.c-r15 { grid-row-start: 16; }
.c-r16 { grid-row-start: 17; }
.c-r17 { grid-row-start: 18; }
.c-r18 { grid-row-start: 19; }
.c-r19 { grid-row-start: 20; }
.c-r20 { grid-row-start: 21; }
.c-r21 { grid-row-start: 22; }
.js-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.js-head .o-title { margin: 0; }
.js-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.js-cov select { min-height: 38px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.js-btn { background: #0ea5a4; border-color: #0ea5a4; color: #fff; }
.js-btn:hover { background: #0d8e8d; border-color: #0d8e8d; color: #fff; }
.js-btn .icon { width: 16px; height: 16px; vertical-align: -3px; }
.js-cal { padding: 14px; }
.js-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.js-nav-left { display: flex; align-items: center; gap: 8px; }
.js-arrow { display: inline-grid; place-items: center; width: 28px; height: 28px; color: var(--muted); font-size: 1.4rem; text-decoration: none; border-radius: 6px; }
.js-arrow:hover { background: var(--primary-soft); color: var(--primary); }
.js-month { font-size: 1rem; }
.js-grid { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.js-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.js-dow span { padding: 6px; text-align: center; font-size: .75rem; color: var(--muted); }
.js-week { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: auto; min-height: 92px; border-bottom: 1px solid var(--border); }
.js-week:last-child { border-bottom: 0; }
.js-days { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.js-day { border-right: 1px solid var(--border); text-align: right; padding: 4px 6px; font-size: .78rem; color: var(--text); }
.js-top { grid-column: 1 / -1; grid-row: 1; height: 24px; }
.js-ev { position: relative; }
.js-day:nth-child(7) { border-right: 0; }
.js-day > span { display: inline-block; }
.js-day.is-out { background: var(--surface-2); color: var(--muted); }
.js-day.is-today { background: #fff8e1; }
.js-ev { z-index: 1; margin: 1px 2px; padding: 2px 6px; border-radius: 4px; background: #7b68ee; color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.js-spacer { grid-column: 1 / -1; height: 10px; }
.js-week > .js-ev { align-self: start; }
.js-legend strong { display: block; margin-bottom: 10px; }
.js-legend-items { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 10px; font-size: .85rem; }
.js-ind { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.js-done-bg { background: #27ae60; } .js-partial-bg { background: #f1c40f; } .js-missed-bg { background: #e74c3c; } .js-pending-bg { background: #8e44ad; }
.o-section-title { margin: 0 0 6px; color: var(--primary); font-size: 1.05rem; }
@media (max-width: 760px) {
  .js-ev { font-size: .62rem; padding: 1px 3px; }
  .js-dow span { font-size: .65rem; }
}
@media print {
  .js-cal, .js-legend { box-shadow: none; border: 0; padding: 0; }
  .js-ev { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Daftar Laporan Emergency Call */
.ecl-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 1.1rem; }
.ecl-title .icon { color: #3b82f6; width: 20px; height: 20px; }
.ecl-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 12px; align-items: center; padding: 14px; margin-bottom: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.ecl-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ecl-dates input, .ecl-search { min-height: 38px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.ecl-search { width: 100%; }
.ecl-refresh { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.ecl-refresh:hover { background: #2563eb; color: #fff; }
.ecl-list { display: grid; gap: 10px; }
.ecl-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.ecl-item > summary { list-style: none; cursor: pointer; padding: 14px 16px; }
.ecl-item > summary::-webkit-details-marker { display: none; }
.ecl-item:hover, .ecl-item[open] { border-color: #3b82f6; }
.ecl-name { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.ecl-name .icon { color: #3b82f6; width: 16px; height: 16px; }
.ecl-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--muted); font-size: .78rem; }
.ecl-meta .icon { width: 13px; height: 13px; vertical-align: -2px; }
.ecl-status.is-stop { color: var(--error); font-weight: 700; }
.ecl-actions { display: flex; gap: 8px; padding: 0 16px 14px; }
.ecl-empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-2); }
@media (max-width: 760px) { .ecl-controls { grid-template-columns: 1fr; } }
.ecl-controls { grid-template-columns: auto minmax(0, 1fr) auto; }
.ecl-dates { flex-wrap: nowrap; }
@media (max-width: 760px) { .ecl-controls { grid-template-columns: 1fr; } .ecl-dates { flex-wrap: wrap; } }
.rv-quick label { position: relative; }
.rv-quick input { left: 0; top: 0; width: 1px; height: 1px; }
.js-dow b { font-weight: 400; }
.js-dow .d-short { display: none; }
@media (max-width: 760px) { .js-dow .d-long { display: none; } .js-dow .d-short { display: inline; } }

/* ===== Portal Customer: tema mengikuti halaman OPREC (panel putih membulat, judul biru tua,
   KPI bergaris warna, tab biru, tabel ber-header biru). Hanya berlaku di <body class="is-portal">. */
.is-portal h1 { color: var(--primary); }
.is-portal h2 { color: var(--primary); font-size: 1.05rem; }
.is-portal .pt-head { margin-bottom: 16px; padding: 22px 24px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 30px rgba(15, 23, 42, .07); }
.is-portal .pt-head:not(:has(.tabs)) { padding-bottom: 18px; }
.is-portal .pt-head h1 { margin: 0 0 6px; font-size: 1.55rem; }
.is-portal .pt-head > p { margin: 0 0 4px; }
.is-portal .pt-head .page-title .icon { color: #0ea5a4; }
.is-portal .pt-head .tabs { margin: 16px 0 0; border-bottom: 0; gap: 4px; }
.is-portal .pt-head .tabs a { border-radius: 8px 8px 0 0; border-bottom: 0; margin-bottom: 0; font-weight: 700; }
.is-portal .pt-head .tabs a:hover { color: var(--primary); background: var(--primary-soft); }
.is-portal .pt-head .tabs a.active { color: #fff; background: #3b82f6; }
.is-portal main > h2, .is-portal .pt-section { margin: 20px 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }

/* Kotak angka: gaya KPI OPREC dengan garis warna di kiri. */
.is-portal .stats { gap: 12px; margin-bottom: 16px; }
.is-portal .stat { --tone: #0b3d91; padding: 14px 16px; border-left: 4px solid var(--tone); border-radius: 13px; }
.is-portal .stats > .stat:nth-child(6n+2) { --tone: #16a34a; }
.is-portal .stats > .stat:nth-child(6n+3) { --tone: #0ea5a4; }
.is-portal .stats > .stat:nth-child(6n+4) { --tone: #dc2626; }
.is-portal .stats > .stat:nth-child(6n+5) { --tone: #f97316; }
.is-portal .stats > .stat:nth-child(6n+6) { --tone: #7c3aed; }
.is-portal .stat-num { color: var(--tone); font-weight: 900; }
.is-portal .stat .muted.small { font-weight: 700; }

/* Beranda: kartu ringkasan bergradasi seperti dashboard OPREC. */
.is-portal .pt-hero .stat { border: 0; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .1); }
.is-portal .pt-hero .stat:nth-child(4n+1) { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.is-portal .pt-hero .stat:nth-child(4n+2) { background: linear-gradient(135deg, #3d9cf0 0%, #00c6e0 100%); }
.is-portal .pt-hero .stat:nth-child(4n+3) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.is-portal .pt-hero .stat:nth-child(4n+4) { background: linear-gradient(135deg, #f6a04d 0%, #f97316 100%); }
.is-portal .pt-hero .stat-num { color: #fff; font-size: 2.2rem; text-shadow: 0 2px 4px rgba(0, 0, 0, .18); }
.is-portal .pt-hero .stat .muted { color: rgba(255, 255, 255, .92); text-transform: uppercase; letter-spacing: .04em; font-size: .74rem; }
.is-portal .pt-hero .stat-icon { background: rgba(255, 255, 255, .2); color: #fff; }

/* Kartu gedung. */
.is-portal .card { padding: 16px 18px; border-left: 4px solid #667eea; border-radius: 12px; }
.is-portal .card-title { color: var(--primary); }

/* Panel & grafik. */
.is-portal .panel { padding: 20px 22px; border-radius: 16px; box-shadow: 0 12px 30px rgba(15, 23, 42, .07); }
.is-portal .panel-title, .is-portal .panel > h2:first-child { margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border); color: var(--primary); font-size: 1rem; }

/* Tabel: header biru tua huruf kapital seperti tabel OPREC. */
.is-portal .table-wrap { border-radius: 12px; }
.is-portal .table th { color: var(--primary); font-weight: 800; font-size: .74rem; letter-spacing: .02em; }
.is-portal .table tbody tr:hover td { background: var(--primary-soft); }
.is-portal .table td { padding-top: 11px; padding-bottom: 11px; }
@media (max-width: 640px) {
  .is-portal .pt-head { padding: 16px 16px 0; }
  .is-portal .pt-head:not(:has(.tabs)) { padding-bottom: 14px; }
  .is-portal .pt-head { padding-bottom: 14px; }
  .is-portal .pt-head .tabs a { padding: 8px 10px; font-size: .85rem; border-radius: 8px; }
}
.is-portal .filters { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }
.is-portal .page-head h1 { margin-bottom: 4px; }
.is-portal .pt-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.is-portal .pt-filters label { display: grid; gap: 4px; color: #3b82f6; font-size: .72rem; font-weight: 700; }
.is-portal .pt-filters select { width: 100%; min-height: 40px; }
.is-portal .pt-period { margin: -4px 0 12px; }
@media (max-width: 640px) { .is-portal .pt-filters { grid-template-columns: 1fr 1fr; } }

/* Scan Form Service (admin): perbandingan form manual vs aplikasi + ceklis */
.text-warn { color: var(--warn); }
.fs-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fs-compare th:first-child, .fs-compare tbody th { width: 150px; white-space: nowrap; }
.fs-compare tr.fs-diff td { background: var(--warn-bg); }
.fs-ragu { background: var(--warn-bg); color: var(--warn); padding: 8px 10px; border-radius: 8px; }
.fs-ceklis { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.fs-ceklis li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 3px 6px; border-radius: 6px; font-size: .82rem; }
.fs-ceklis .fs-kode { color: var(--muted); font-variant-numeric: tabular-nums; }
.fs-ceklis .fs-nama { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.fs-ceklis .fs-val { font-weight: 700; }
.fs-ceklis li.is-note { background: var(--primary-soft); }
.fs-ceklis li.is-bad { background: var(--error-bg); color: var(--error); }
.fs-link select { flex: 1 1 200px; min-width: 0; max-width: 100%; }
@media (max-width: 900px) { .fs-grid { grid-template-columns: minmax(0, 1fr); } .fs-compare tbody th { width: auto; white-space: normal; } }
@media (max-width: 520px) { .fs-ceklis { grid-template-columns: 1fr; } }

/* Portal: data dari form service manual (Scan Form Service yang sudah disetujui) */
.fm { margin-top: 1.25rem; padding-top: .75rem; border-top: 1px dashed var(--border, #d9dce3); }
.fm h3 { font-size: .95rem; margin: .9rem 0 .35rem; }
.fm-ceklis td:first-child { width: 55%; }
.fm-ceklis td { overflow-wrap: anywhere; }
.fm-text { white-space: pre-line; margin: 0 0 .5rem; }

/* Kualitas Data: catatan sinkron & daftar pemeriksaan tanpa masalah */
.kd-notes { margin: 0 0 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
.kd-notes summary { cursor: pointer; }
.kd-notes ul { margin: 10px 0 0; padding-left: 20px; max-height: 320px; overflow: auto; font-size: .84rem; }
.kd-notes li { margin: 3px 0; overflow-wrap: anywhere; }
.kd-ok { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.kd-ok li { display: flex; align-items: center; gap: 10px; }

/* Jarak tepi halaman di layar HP (setelah aturan footer agar tidak tertimpa) */
@media (max-width: 640px) { .container, .footer-inner { padding-left: 16px; padding-right: 16px; } }

/* Filter halaman daftar (Laporan Service, E-Call, Berita Acara): pola sama dengan halaman monitoring */
.list-filters { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); }
.list-filters select:disabled { opacity: .55; }
@media (max-width: 900px) { .list-filters { grid-template-columns: 1fr 1fr; } .list-filters label:first-child, .list-filters label:last-of-type { grid-column: 1 / -1; } }

/* Pilih banyak baris (Scan Form: Setujui terpilih) */
.bulk-bar { position: sticky; top: 68px; z-index: 3; /* di bawah header yang menempel (tinggi ±60px) */ display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 18px rgba(15, 23, 42, .06); }
.bulk-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.bulk-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.bulk-col { width: 36px; text-align: center; }
.bulk-col input, .bulk-all input { width: 18px; height: 18px; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) { .bulk-bar { position: static; } }
.gedung-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.gedung-filter .ecl-search { max-width: 360px; }
.gedung-filter .small { white-space: nowrap; }
.cards > [hidden] { display: none; }
.gedung-groups { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.seg button[aria-pressed="true"] .count-pill { background: rgba(255,255,255,.25); color: inherit; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.card-tags:empty { display: none; }
.card-nonaktif { opacity: .75; border-left-color: var(--border); }

/* Halaman Panduan */
.guide-toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2 260px; column-gap: 32px; }
.guide-toc li { margin: 2px 0; break-inside: avoid; }
.guide .panel { scroll-margin-top: 72px; }
.guide h3 { font-size: .95rem; margin: 16px 0 6px; }
.guide ul, .guide ol { padding-left: 20px; margin: 6px 0; }
.guide li { margin: 4px 0; line-height: 1.5; }
.guide p { line-height: 1.55; }
.guide .grid-dl dd { line-height: 1.5; }
.guide kbd { font: inherit; font-size: .85em; padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
@media (max-width: 640px) { .guide .grid-dl { grid-template-columns: 1fr; gap: 2px; } .guide .grid-dl dd { margin-bottom: 8px; } }
.guide .grid-dl dt { color: inherit; font-weight: 600; }
.no-topbar main.container > .alert + .login-card { margin-top: 12px; }

/* Scan Form Service: form perbaikan hasil baca */
.fs-edit > summary { cursor: pointer; }
.fs-edit[open] > summary { margin-bottom: 8px; }
.fs-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
.fs-edit-cek { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.fs-edit-cek legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
.form .fs-edit-cek label { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; margin: 0; font-weight: 400; font-size: .85rem; }
.form .fs-edit-cek input { width: 76px; flex: none; text-align: center; }

/* Portal: masa kontrak & lama kerja sama di judul gedung */
.is-portal .pt-head .pt-kontrak { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0 0; font-size: .9rem; }

/* Portal baru: pilihan cara masuk dan daftar data akun */
.login-tabs { margin-top: 4px; }
.login-tabs a { flex: 1; text-align: center; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }

/* Tautan foto / PDF dari Sheet (Google Drive) di halaman laporan */
.photo-links { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.photo-links a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem; }
.guide-video { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.guide-video figure { margin: 0; }
.guide-video video { width: 100%; max-height: 70vh; border-radius: 8px; background: #000; display: block; }
.guide-video figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }

/* Beranda: filter status & kontrak (radio bergaya tombol), cari langsung */
.home-filter { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.home-filter .seg { gap: 6px 8px; }
.seg-opt { position: relative; display: inline-flex; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt > span { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .88rem; }
.seg-opt input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.seg-opt input:checked + span .count-pill { background: rgba(255,255,255,.25); color: inherit; }
.home-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.home-search input { flex: 0 1 360px; width: auto; }
.card-title .badge { flex: none; }
.seg-risk > span { border-color: var(--error); color: var(--error); }
.seg-risk input:checked + span { background: var(--error); border-color: var(--error); color: #fff; }
