/* ---------- Font & token ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../lib/inter/inter-latin-wght-normal.woff2") format("woff2");
}

:root, [data-bs-theme="light"] {
  --wps-primary: #1689c4;
  --wps-primary-rgb: 22, 137, 196;
  --wps-primary-hover: #106fa1;
  --wps-sidebar-bg: #22394d;
  --wps-sidebar-fg: #c3cddb;
  --wps-sidebar-muted: #7d8ba1;
  --wps-sidebar-active: rgba(255, 255, 255, .09);
  --wps-topbar-bg: #1ba3dc;
  --wps-table-head: #1ba3dc;
  --wps-zebra: #eef8fd;
  --wps-surface: #ffffff;
  --wps-page: #f3f5f8;
  --wps-border: #e4e8ee;
  --wps-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --bs-body-bg: var(--wps-page);
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-primary: var(--wps-primary);
  --bs-primary-rgb: var(--wps-primary-rgb);
  --bs-link-color: var(--wps-primary);
  --bs-link-color-rgb: var(--wps-primary-rgb);
  --bs-link-hover-color: var(--wps-primary-hover);
  --bs-border-color: var(--wps-border);
  --bs-primary-bg-subtle: #dcf0fa;
  --bs-primary-text-emphasis: #0b5a82;
  --bs-primary-border-subtle: #a6d8f0;
}

[data-bs-theme="dark"] {
  --wps-primary: #22a6c9;
  --wps-primary-rgb: 34, 166, 201;
  --wps-primary-hover: #4bbcda;
  --wps-sidebar-bg: #0e151d;
  --wps-sidebar-active: rgba(255, 255, 255, .07);
  --wps-topbar-bg: #13324a;
  --wps-table-head: #164a69;
  --wps-zebra: rgba(27, 163, 220, .06);
  --wps-surface: #151e28;
  --wps-page: #0b1117;
  --wps-border: #253242;
  --wps-shadow: none;
  --bs-body-bg: var(--wps-page);
  --bs-body-color: #d8dee7;
  --bs-tertiary-bg: #1a2531;
  --bs-secondary-bg: #1a2531;
  --bs-primary: var(--wps-primary);
  --bs-primary-rgb: var(--wps-primary-rgb);
  --bs-link-color: var(--wps-primary);
  --bs-link-color-rgb: var(--wps-primary-rgb);
  --bs-link-hover-color: var(--wps-primary-hover);
  --bs-border-color: var(--wps-border);
  --bs-primary-bg-subtle: #0d3340;
  --bs-primary-text-emphasis: #8fd6ea;
  --bs-primary-border-subtle: #13566a;
}

html { font-size: 14px; }
@media (min-width: 1400px) { html { font-size: 14.5px; } }
body { background: var(--wps-page); -webkit-font-smoothing: antialiased; }
h1, .h1, h2, .h2, h3, .h3, h4, .h4 { font-weight: 650; letter-spacing: -.01em; }

/* ---------- Tombol ---------- */
.btn-primary {
  --bs-btn-bg: var(--wps-primary); --bs-btn-border-color: var(--wps-primary);
  --bs-btn-hover-bg: var(--wps-primary-hover); --bs-btn-hover-border-color: var(--wps-primary-hover);
  --bs-btn-active-bg: var(--wps-primary-hover); --bs-btn-active-border-color: var(--wps-primary-hover);
  --bs-btn-disabled-bg: var(--wps-primary); --bs-btn-disabled-border-color: var(--wps-primary);
}
.btn-outline-primary {
  --bs-btn-color: var(--wps-primary); --bs-btn-border-color: var(--wps-primary);
  --bs-btn-hover-bg: var(--wps-primary); --bs-btn-hover-border-color: var(--wps-primary);
  --bs-btn-active-bg: var(--wps-primary); --bs-btn-active-border-color: var(--wps-primary);
}
.btn { font-weight: 500; border-radius: .5rem; }
.btn-sm { border-radius: .4rem; }
.btn i.bi { margin-right: .15rem; }
.form-control, .form-select { border-radius: .5rem; background-color: var(--wps-surface); }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: var(--bs-tertiary-bg); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--wps-primary); box-shadow: 0 0 0 .2rem rgba(var(--wps-primary-rgb), .18);
}
.form-check-input:checked { background-color: var(--wps-primary); border-color: var(--wps-primary); }
.form-label { font-weight: 500; font-size: .85rem; margin-bottom: .3rem; color: var(--bs-secondary-color); }

/* ---------- Kerangka aplikasi ---------- */
.wps-app { display: flex; min-height: 100vh; }
.wps-sidebar {
  --bs-offcanvas-width: 270px;
  --bs-offcanvas-bg: var(--wps-sidebar-bg);
  width: 260px; flex: 0 0 260px; background: var(--wps-sidebar-bg) !important; color: var(--wps-sidebar-fg);
  display: flex; flex-direction: column;
}
@media (min-width: 992px) {
  .wps-sidebar { position: sticky; top: 0; height: 100vh; }
}
.wps-brand { display: flex; align-items: center; gap: .7rem; padding: 1rem 1rem .9rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.07); }
.wps-logo {
  height: 2.1rem; padding: 0 .55rem; border-radius: .45rem; display: grid; place-items: center; flex: none; letter-spacing: .04em;
  background: #e3262e; color: #fff; font-weight: 800; font-size: 1.1rem;
}
.wps-brand-text { min-width: 0; }
.wps-brand-text .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.wps-nav { flex: 1; overflow-y: auto; padding: .6rem .6rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.wps-group { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wps-sidebar-muted); padding: 1.1rem .75rem .35rem; }
.wps-link {
  display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; margin: 1px 0; border-radius: .5rem;
  color: var(--wps-sidebar-fg); text-decoration: none; font-weight: 500; position: relative; white-space: nowrap;
}
.wps-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; opacity: .9; }
.wps-link:hover { background: var(--wps-sidebar-active); color: #fff; }
.wps-link.active { background: rgba(var(--wps-primary-rgb), .22); color: #fff; }
.wps-link.active::before { content: ""; position: absolute; left: -.6rem; top: .45rem; bottom: .45rem; width: 3px; border-radius: 3px; background: #45c1f2; }
.wps-link.disabled { opacity: .5; cursor: default; }
.wps-link.disabled:hover { background: none; color: var(--wps-sidebar-fg); }
.wps-link em { margin-left: auto; font-style: normal; font-size: .65rem; border: 1px solid rgba(255,255,255,.2); border-radius: 1rem; padding: 0 .45rem; }
.wps-count { margin-left: auto; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: 1rem; background: #f59e0b; color: #111; font-size: .72rem; display: inline-grid; place-items: center; font-weight: 700; }
.btn-top .wps-count { margin-left: .2rem; }
.wps-sidebar-foot { border-top: 1px solid rgba(255,255,255,.07); padding: .5rem .6rem; }

html.sidebar-mini .wps-sidebar { width: 72px; flex-basis: 72px; }
html.sidebar-mini .wps-sidebar .wps-link span, html.sidebar-mini .wps-sidebar .wps-link em,
html.sidebar-mini .wps-sidebar .wps-brand-text, html.sidebar-mini .wps-sidebar .wps-group { display: none; }
html.sidebar-mini .wps-sidebar .wps-link { justify-content: center; }
html.sidebar-mini .wps-sidebar .wps-count { position: absolute; top: 0; right: 2px; min-width: 1.1rem; height: 1.1rem; font-size: .62rem; }
html.sidebar-mini .wps-sidebar .wps-group + .wps-link { margin-top: .9rem; }
@media (max-width: 991.98px) { html.sidebar-mini .wps-sidebar { width: 270px; } }

.wps-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wps-topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1.25rem; background: var(--wps-topbar-bg); color: #fff; min-height: 60px;
}
.btn-top { color: #fff; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); padding: .35rem .8rem; }
.btn-top:hover, .btn-top:focus { color: #fff; background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.5); }
.btn-icon { color: #fff; border: 0; background: transparent; font-size: 1.15rem; padding: .3rem .5rem; }
.btn-icon:hover { color: #fff; background: rgba(255,255,255,.12); }
.wps-search { position: relative; flex: 0 1 340px; margin-left: auto; }
.wps-search i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); opacity: .8; }
.wps-search input {
  width: 100%; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff;
  border-radius: .5rem; padding: .4rem .75rem .4rem 2.1rem; outline: none;
}
.wps-search input::placeholder { color: rgba(255,255,255,.75); }
.wps-search input:focus { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.6); }
.wps-search + .ms-auto { margin-left: .5rem !important; }
.wps-user { display: flex; align-items: center; gap: .55rem; color: #fff; background: transparent; border: 0; padding: .2rem .4rem; border-radius: .5rem; }
.wps-user:hover { background: rgba(255,255,255,.1); }
.wps-avatar { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2); font-weight: 700; font-size: .8rem; }
.wps-content { padding: 1.25rem 1.5rem 2.5rem; }
@media (max-width: 576px) {
  .wps-content { padding: 1rem .75rem 2rem; }
  .wps-topbar { padding: .5rem .75rem; }
  .wps-search { flex-basis: auto; }
}

/* ---------- Halaman login ---------- */
.wps-auth { background: radial-gradient(1200px 600px at 10% -10%, rgba(var(--wps-primary-rgb), .18), transparent), var(--wps-page); }
.wps-auth-main { min-height: 100vh; padding: 2rem 1rem; }

/* ---------- Komponen ---------- */
.card { --bs-card-border-color: var(--wps-border); --bs-card-bg: var(--wps-surface); --bs-card-border-radius: .75rem; --bs-card-inner-border-radius: calc(.75rem - 1px); box-shadow: var(--wps-shadow); }
.card-header { background: var(--wps-surface); font-weight: 600; padding: .8rem 1rem; }
.card-footer { background: var(--bs-tertiary-bg); }
.card + .card { margin-top: 1rem; }
.alert { border-radius: .65rem; }
.dropdown-menu { border-radius: .6rem; box-shadow: 0 10px 30px rgba(16,24,40,.12); border-color: var(--wps-border); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.page-head .sub { color: var(--bs-secondary-color); margin-top: .15rem; }
.crumbs { font-size: .8rem; color: var(--bs-secondary-color); margin-bottom: .25rem; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--wps-primary); }

.wps-tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--wps-border); margin-bottom: 1.1rem; overflow-x: auto; }
.wps-tabs a { padding: .55rem .1rem; color: var(--bs-secondary-color); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.wps-tabs a:hover { color: var(--bs-body-color); }
.wps-tabs a.active { color: var(--wps-primary); border-bottom-color: var(--wps-primary); }
.wps-tabs .n { font-size: .75rem; margin-left: .3rem; color: var(--bs-secondary-color); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: var(--wps-surface); border: 1px solid var(--wps-border); border-radius: .75rem; padding: .85rem 1rem; box-shadow: var(--wps-shadow); text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: rgba(var(--wps-primary-rgb), .5); }
.kpi .lbl { font-size: .8rem; color: var(--bs-secondary-color); display: flex; align-items: center; gap: .4rem; }
.kpi .val { font-size: 1.55rem; font-weight: 700; line-height: 1.25; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.kpi .note { font-size: .75rem; color: var(--bs-secondary-color); }
.kpi.tone-danger .val { color: var(--bs-danger-text-emphasis); }
.kpi.tone-warning .val { color: var(--bs-warning-text-emphasis); }
.kpi.tone-primary .val { color: var(--wps-primary); }

.filter-card { background: var(--wps-surface); border: 1px solid var(--wps-border); border-radius: .75rem; padding: 1rem; margin-bottom: 1rem; box-shadow: var(--wps-shadow); }

.table-card { background: var(--wps-surface); border: 1px solid var(--wps-border); border-radius: .75rem; overflow: hidden; box-shadow: var(--wps-shadow); }
.table-card .table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .75rem 1rem; }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .6rem .75rem; border-bottom-color: var(--wps-border); }
.table-wps thead th { background: var(--wps-table-head); color: #fff; font-weight: 600; border-bottom: 0; white-space: nowrap; text-align: center; vertical-align: middle; }
.table-wps thead th.text-start { text-align: start; }
.table-wps tbody tr:nth-child(even) > * { background: var(--wps-zebra); }
.table-wps thead th a { color: inherit; }
.table-wps tbody tr:hover > * { background: rgba(var(--wps-primary-rgb), .05); }
.thead-soft th { background-color: var(--bs-tertiary-bg); font-weight: 600; font-size: .85rem; color: var(--bs-secondary-color); }
.row-new td { background-color: var(--bs-tertiary-bg); }

.badge { font-weight: 600; border-radius: .4rem; padding: .38em .6em; letter-spacing: .01em; }
.chip { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .45rem; border-radius: .35rem; background: var(--bs-tertiary-bg); border: 1px solid var(--wps-border); color: var(--bs-body-color); }

.table-tracker td, .table-tracker th { white-space: nowrap; vertical-align: middle; }
.table-tracker .col-title { white-space: normal; min-width: 15rem; }
.table-tracker .jo-no { font-weight: 600; text-decoration: none; }
.stage-cell { min-width: 3.4rem; text-align: center; font-variant-numeric: tabular-nums; }
.stage-na { color: var(--bs-tertiary-color); }
.stage-pill { display: inline-block; min-width: 2.6rem; padding: .1rem .3rem; border-radius: .35rem; font-size: .75rem; font-weight: 600; background: var(--bs-tertiary-bg); }
.stage-pill.done { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.stage-pill.run { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.progress { background: var(--bs-tertiary-bg); }
.progress-bar { background: var(--wps-primary); }
.progress-thin { height: .45rem; border-radius: 1rem; }

.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge-src { font-weight: 500; }
.dev-warn { color: var(--bs-warning-text-emphasis); font-weight: 600; }
.dev-bad { color: var(--bs-danger-text-emphasis); font-weight: 600; }
.empty-state { padding: 2.5rem 1rem; text-align: center; color: var(--bs-secondary-color); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; opacity: .6; }
.pagination { --bs-pagination-active-bg: var(--wps-primary); --bs-pagination-active-border-color: var(--wps-primary); --bs-pagination-color: var(--wps-primary); }

/* Halaman lain: judul & tabel bawaan ikut gaya kartu */
.wps-content > h1.h4, .wps-content .d-flex > h1.h4 { font-size: 1.45rem; margin-bottom: .6rem; }
.wps-content .table-responsive.border { background: var(--wps-surface); border-radius: .75rem !important; box-shadow: var(--wps-shadow); }
.wps-content .table-responsive.border thead th { background-color: var(--bs-tertiary-bg); font-weight: 600; font-size: .85rem; color: var(--bs-secondary-color); }
.list-group { --bs-list-group-bg: var(--wps-surface); --bs-list-group-border-color: var(--wps-border); }

/* Ringkasan (kartu berikon, sesuai desain WPS) */
.summary-card { display: flex; align-items: center; gap: .85rem; background: var(--wps-surface); border: 1px solid var(--wps-border); border-radius: .75rem; padding: .8rem 1rem; box-shadow: var(--wps-shadow); text-decoration: none; color: inherit; min-width: 0; }
a.summary-card:hover { border-color: rgba(var(--wps-primary-rgb), .55); color: inherit; }
.summary-card.active { border-color: var(--wps-primary); box-shadow: 0 0 0 .15rem rgba(var(--wps-primary-rgb), .18); }
.summary-card .ico { width: 2.6rem; height: 2.6rem; border-radius: .65rem; display: grid; place-items: center; font-size: 1.3rem; flex: none; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.summary-card .ico.warn { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.summary-card .ico.ok { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.summary-card .ico.bad { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.summary-card .ico.mute { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.summary-card .v { font-size: 1.35rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.summary-card .l { font-size: .8rem; color: var(--bs-secondary-color); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }

/* Kartu pilihan kategori JO */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.cat-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: 1.5rem 1.1rem; background: var(--wps-surface); border: 1.5px solid var(--wps-border); border-radius: 1rem; text-decoration: none; color: inherit; box-shadow: var(--wps-shadow); transition: border-color .15s, transform .15s; }
.cat-card:hover { border-color: var(--wps-primary); transform: translateY(-2px); color: inherit; }
.cat-card .cat-ico { width: 4.2rem; height: 4.2rem; border-radius: 1rem; display: grid; place-items: center; font-size: 2rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.cat-card .cat-name { font-weight: 700; color: var(--wps-primary); text-transform: uppercase; letter-spacing: .03em; }
.cat-card .cat-desc { font-size: .85rem; color: var(--bs-secondary-color); }
.cat-card .cat-stages { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; margin-top: auto; }

.page-title-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-title-bar h1 { font-size: 1.55rem; margin: 0; }
.user-cell .who { font-weight: 500; }
.user-cell .unit { font-size: .78rem; color: var(--bs-secondary-color); }
.class-badge { display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.75rem; border-radius: .45rem; font-weight: 800; font-size: .85rem; }
.notif-dot { position: absolute; top: -2px; right: -4px; margin: 0; min-width: 1.15rem; height: 1.15rem; font-size: .65rem; }
.notif-menu { width: min(360px, 92vw); max-height: 70vh; overflow-y: auto; }
.notif-item { white-space: normal; border-bottom: 1px solid var(--wps-border); padding: .6rem 1rem; }
.notif-item.unread { background: rgba(var(--wps-primary-rgb), .07); }
.notif-item.unread .fw-semibold::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--wps-primary); margin-right: .4rem; vertical-align: middle; }
.btn-wa { --bs-btn-color: #128c4a; --bs-btn-border-color: #25d366; --bs-btn-hover-bg: #25d366; --bs-btn-hover-border-color: #25d366; --bs-btn-hover-color: #fff; }

/* ---------- Gantt ---------- */
.gantt-card { overflow: hidden; }
.gantt-scroll { overflow-x: auto; }
.gantt-grid { min-width: 980px; }
.gantt-head, .gantt-row { display: grid; grid-template-columns: 250px 1fr; }
.gantt-head { background: var(--wps-table-head); color: #fff; font-size: .75rem; font-weight: 600; }
.gantt-head .gantt-label { padding: .55rem .75rem; }
.gantt-row { border-bottom: 1px solid var(--wps-border); min-height: 48px; }
.gantt-row:nth-child(even) { background: var(--wps-zebra); }
.gantt-label { padding: .35rem .75rem; border-right: 1px solid var(--wps-border); min-width: 0; display: flex; align-items: center; }
.gantt-label > div { width: 100%; min-width: 0; }
.gantt-timeline { position: relative; min-height: 46px; }
.gantt-head .gantt-timeline { min-height: 2.1rem; }
.gantt-col { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; border-left: 1px solid rgba(255,255,255,.25); white-space: nowrap; overflow: hidden; }
.gantt-col.we { background: rgba(0,0,0,.12); }
.gantt-we { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--bs-secondary-color) 8%, transparent); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #e5484d; opacity: .7; z-index: 3; }
.gantt-marker { position: absolute; top: 4px; bottom: 4px; width: 3px; border-radius: 3px; background: #111827; z-index: 3; }
[data-bs-theme="dark"] .gantt-marker { background: #f1f5f9; }
.gbar { position: absolute; top: 9px; height: 28px; border-radius: 7px; color: #fff; font-size: .7rem; font-weight: 600; padding: 0 .4rem; display: flex; align-items: center;
  overflow: hidden; white-space: nowrap; text-decoration: none; z-index: 2; box-shadow: 0 2px 6px -3px rgba(0,0,0,.4); min-width: 4px; }
.gbar:hover { color: #fff; filter: brightness(1.08); z-index: 4; }
.gbar.late { outline: 2px solid #e5484d; outline-offset: 1px; }
.gbar.ot { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 5px, transparent 5px 10px); }
.gbar.locked::before { content: "\F47B"; font-family: "bootstrap-icons"; margin-right: .25rem; }
.bar-A { background: #e5484d; } .bar-B { background: #f29d0b; } .bar-C { background: #1689c4; } .bar-D { background: #13a8bd; } .bar-E { background: #8394a8; }
.bar-down { background: repeating-linear-gradient(135deg, rgba(229,72,77,.35) 0 6px, rgba(229,72,77,.12) 6px 12px); color: #b4232a; border: 1px solid rgba(229,72,77,.6); box-shadow: none; z-index: 1; }
.bar-leave { background: repeating-linear-gradient(135deg, rgba(142,92,240,.35) 0 6px, rgba(142,92,240,.12) 6px 12px); color: #6d3fd1; border: 1px solid rgba(142,92,240,.6); box-shadow: none; z-index: 1; }
.st-1 { background: #6d5bd0; } .st-2 { background: #9b59b6; } .st-3 { background: #f29d0b; } .st-4 { background: #e5484d; } .st-5 { background: #1689c4; }
.st-6 { background: #13a8bd; } .st-7 { background: #f5c518; color: #3d2f00; } .st-8 { background: #2fb36b; } .st-9 { background: #0e7a5c; } .st-10 { background: #8394a8; } .st-11 { background: #b7791f; }
.legend-sw { display: inline-block; width: 1rem; height: .8rem; border-radius: 3px; }
.legend-sw.marker-legend { width: 3px; background: #111827; }
.legend-sw.late-legend { outline: 2px solid #e5484d; background: transparent; }
.legend-sw.bar-ot-legend { background: #1689c4 repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 3px, transparent 3px 6px); }
@media (max-width: 576px) { .gantt-head, .gantt-row { grid-template-columns: 160px 1fr; } }

/* ---------- Cetak ---------- */
.print-only { display: none; }
@media print {
  .wps-sidebar, .wps-topbar, .d-print-none, .alert-dismissible, .btn { display: none !important; }
  .wps-main, .wps-content { padding: 0 !important; }
  body, .wps-app { background: #fff !important; display: block; }
  .card, .print-sheet { box-shadow: none !important; border: 0 !important; }
  .print-only { display: table-cell; }
  .table { font-size: 10pt; }
  .thead-soft th { background: #eee !important; color: #000 !important; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* ---------- Operator (HP) ---------- */
.op-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.op-card.today { border-color: rgba(var(--wps-primary-rgb), .55); }
.op-running { border: 2px solid #f29d0b; }
.op-timer { font-size: 2rem; font-weight: 800; color: #b06f00; }
.min-w-0 { min-width: 0; }
@media (max-width: 576px) { .op-list { grid-template-columns: 1fr; } }

/* ---------- Grafik (palet tervalidasi: light pada #fff, dark pada #151e28) ---------- */
:root, [data-bs-theme="light"] { --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-grid: #e8ecf1; --viz-ink: #5d6b7c; }
[data-bs-theme="dark"] { --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-grid: #263445; --viz-ink: #a8b5c4; }
.viz { position: relative; }
.viz svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-1 { fill: var(--viz-1); } .viz-2 { fill: var(--viz-2); } .viz-3 { fill: var(--viz-3); }
.viz-1-stroke { stroke: var(--viz-1); } .viz-2-stroke { stroke: var(--viz-2); } .viz-3-stroke { stroke: var(--viz-3); }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-dot { stroke: var(--wps-surface); stroke-width: 2; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { stroke: var(--viz-ink); stroke-width: 1; opacity: .5; }
.viz-today { stroke: #e5484d; stroke-width: 1.5; opacity: .6; }
.viz-tick { font-size: 10px; fill: var(--viz-ink); }
.viz-label { font-size: 12px; fill: var(--bs-body-color); }
.viz-value { font-size: 12px; font-weight: 600; fill: var(--bs-body-color); }
.viz-hit { fill: transparent; }
.viz-hit:hover { fill: color-mix(in srgb, var(--bs-body-color) 5%, transparent); }
.viz-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .78rem; color: var(--bs-secondary-color); margin-top: .35rem; }
.viz-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.viz-sw { width: .75rem; height: .75rem; border-radius: 3px; display: inline-block; }
.viz-sw.viz-1 { background: var(--viz-1); } .viz-sw.viz-2 { background: var(--viz-2); } .viz-sw.viz-3 { background: var(--viz-3); }
.viz-table summary { font-size: .75rem; color: var(--bs-secondary-color); cursor: pointer; margin-top: .3rem; }
.viz-tip { position: fixed; z-index: 2000; pointer-events: none; background: var(--bs-body-color); color: var(--bs-body-bg); font-size: .75rem; padding: .3rem .55rem; border-radius: 6px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
@media print { .viz-table { display: none; } }

/* ===== Task Tracker kanban ===== */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: .6rem; overflow-x: auto; padding-bottom: .5rem; }
.kanban-col { background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: .75rem; display: flex; flex-direction: column; min-height: 12rem; }
.kanban-col > header { display: flex; align-items: center; gap: .5rem; padding: .6rem .75rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.kanban-list { padding: .5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.kanban-col.drop-over { outline: 2px dashed var(--bs-primary); outline-offset: -4px; }
.kanban-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-left: 3px solid var(--bs-secondary-border-subtle); border-radius: .5rem; padding: .55rem .65rem; cursor: grab; box-shadow: 0 1px 2px rgb(0 0 0 / .04); }
.kanban-card.urgent { border-left-color: var(--bs-danger); }
.kanban-card.dragging { opacity: .5; }
.kanban-card:focus-visible { outline: 2px solid var(--bs-primary); }
.kanban-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.avatar-xs { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .65rem; font-weight: 600; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); flex: none; }
@media print { .kanban { grid-template-columns: repeat(5, 1fr); overflow: visible; } .kanban-card { break-inside: avoid; box-shadow: none; } }

/* ===== Masukan & revisi ===== */
.fb-steps { display: flex; list-style: none; padding: 0; gap: .25rem; counter-reset: s; overflow-x: auto; }
.fb-steps li { flex: 1; min-width: 6.5rem; font-size: .75rem; padding: .4rem .5rem; border-top: 3px solid var(--bs-border-color); color: var(--bs-secondary-color); }
.fb-steps li.done { border-color: var(--bs-success); color: var(--bs-body-color); }
.fb-steps li.now { border-color: var(--wps-primary, var(--bs-primary)); color: var(--bs-body-color); font-weight: 600; }
.fb-thumb { display: inline-flex; align-items: center; justify-content: center; width: 8rem; height: 6rem; border: 1px solid var(--bs-border-color); border-radius: .5rem; overflow: hidden; background: var(--bs-tertiary-bg); font-size: .75rem; text-decoration: none; padding: .25rem; text-align: center; }
.fb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fb-comment { border-left: 3px solid var(--bs-border-color); padding: .25rem .6rem; margin-bottom: .5rem; }
.fb-comment.system { border-left-color: var(--bs-info); color: var(--bs-secondary-color); }
.btn-feedback { position: fixed; right: 1rem; bottom: 1rem; z-index: 1030; border-radius: 2rem; box-shadow: 0 4px 14px rgb(0 0 0 / .18); }
@media print { .btn-feedback { display: none; } }
.viz-bars svg { max-width: 640px; }
.viz svg a { text-decoration: none; }
.viz svg a:hover .viz-label { text-decoration: underline; }
