/* Mivi Project Core — lihat DESIGN.md untuk peran tiap token */
:root {
  --blue: #0F5BE8; --blue-600: #0B49C4; --blue-50: #EAF1FF; --blue-100: #D6E4FF; --cyan: #12C2F2;
  --navy: #0C1330; --navy-2: #18224A; --navy-3: #26325F;
  --bg: #E8EDF6; --shell: #F5F7FB; --card: #FFFFFF;
  --ink: #0C1330; --ink-2: #465070; --ink-3: #68728E; --line: #E2E7F1;
  --ok: #0B8A5F; --ok-bg: #E3F6EE; --warn: #B45309; --warn-bg: #FDF1DC; --bad: #D92D20; --bad-bg: #FDECEA;
  --r-in: 10px; --r-sm: 14px; --r: 20px; --r-lg: 28px;
  --shadow: 0 8px 24px -12px rgba(12, 19, 48, .18), 0 2px 6px -2px rgba(12, 19, 48, .06);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.no-scroll { overflow: hidden; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(15, 91, 232, .45); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 100; }
.skip:focus { top: 12px; }
.ic { flex: none; }
.mute { color: var(--ink-3); } .sm { font-size: 13px; } .r { text-align: right; } .grow { flex: 1; }
.num, .stat strong, .pscore, .hbar-val, .kpi-score strong, #att-time { font-variant-numeric: tabular-nums; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--ink-3); }

/* ---------- Shell ---------- */
.shell { max-width: 1480px; margin: 16px auto; min-height: calc(100vh - 32px); background: var(--shell); border-radius: 32px; padding: 20px 28px 48px; }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 8px; justify-self: start; background: #fff; border-radius: 999px; padding: 4px 14px 4px 8px; border: 1px solid var(--line); }
.brand img { height: 36px; width: auto; }
.brand-tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); background: var(--blue-50); padding: 3px 9px; border-radius: 999px; }
.pillnav { display: flex; gap: 2px; background: var(--navy); padding: 6px; border-radius: 999px; }
.pill { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; color: #C3CBE6; font-weight: 600; transition: background .2s var(--ease), color .2s; }
.pill:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.pill.on { background: var(--blue); color: #fff; }
.top-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; background: transparent; color: var(--ink-2); border-radius: 12px; transition: background .15s; }
.iconbtn:hover { background: var(--blue-50); color: var(--blue); }
.iconbtn.round { background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.userbtn { border: 0; background: none; padding: 0; border-radius: 999px; display: grid; }
.badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; border: 2px solid var(--shell); }
.av { width: var(--s, 40px); height: var(--s, 40px); flex: none; display: inline-grid; place-items: center; border-radius: 999px; color: #fff; font-weight: 700; font-size: calc(var(--s, 40px) * .36); letter-spacing: .02em; }
.show-sm { display: none !important; }

.pop-wrap { position: relative; }
.pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
.pop-notif { width: 380px; max-width: calc(100vw - 32px); }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.pop-head h2 { font-size: 16px; }
.notif-list { max-height: min(60vh, 460px); overflow-y: auto; padding: 0 8px 8px; }
.notif { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 10px; border: 0; background: none; border-radius: var(--r-sm); }
.notif:hover { background: var(--shell); }
.notif.unread { background: var(--blue-50); }
.notif-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--blue); }
.notif-tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.notif-tx span { color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.notif-tx time { color: var(--ink-3); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--blue); margin-top: 6px; flex: none; }
.pop-user { width: 260px; padding: 8px; }
.pop-me { display: flex; gap: 12px; align-items: center; padding: 10px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pop-me div { display: grid; min-width: 0; } .pop-me span { color: var(--ink-3); font-size: 12px; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink); border-radius: var(--r-in); font-weight: 500; text-align: left; }
.menu-item:hover { background: var(--shell); }

.botnav { display: none; }

/* ---------- Tipografi halaman ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
.page-head p { color: var(--ink-3); margin-top: 6px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink-2); font-weight: 600; margin: -10px 0 4px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lead { font-size: 16px; color: var(--ink-2); margin-bottom: 16px; }
.note { color: var(--ink-3); font-size: 13px; margin-top: 16px; max-width: 75ch; }
.linkbtn { border: 0; background: none; color: var(--blue); font-weight: 600; padding: 8px 0; white-space: nowrap; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- Tombol, chip, form ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s var(--ease); }
.btn:hover { border-color: #C5CEE2; background: #FBFCFE; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.white { background: #fff; border-color: #fff; color: var(--navy); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #EEF1F7; color: var(--ink-2); }
.chip.ok { background: var(--ok-bg); color: #06694A; } .chip.blue { background: var(--blue-50); color: var(--blue-600); }
.chip.warn { background: var(--warn-bg); color: #8A3F06; } .chip.bad { background: var(--bad-bg); color: #B42318; }
.chip.glass { background: rgba(255, 255, 255, .18); color: #fff; }
.chipbtn { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.chipbtn:hover { border-color: var(--blue); color: var(--blue); }
.field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 12px; }
.req { color: var(--bad); }
input:not([type=checkbox]):not([type=file]), select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px; background: #fff; border: 1px solid #CDD5E6; border-radius: var(--r-in); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; text-overflow: ellipsis; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23465070' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(15, 91, 232, .18); }
input:disabled { background: var(--shell); color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span2 { grid-column: 1 / -1; }
.form-sec { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin: 10px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.form-sec:first-child { border: 0; padding-top: 0; margin-top: 0; }
.form-err { color: #B42318; background: var(--bad-bg); padding: 10px 12px; border-radius: var(--r-in); font-weight: 500; margin: 4px 0 12px; }
.form-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.selwrap select { min-width: 210px; border-radius: 999px; padding-left: 18px; padding-right: 44px; background-position: right 18px center; font-size: 14px; font-weight: 600; }
.tabs { display: inline-flex; gap: 2px; padding: 4px; background: #E6EBF4; border-radius: 999px; }
.tab { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(12, 19, 48, .12); }

/* ---------- Kartu ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head h2 .ic { color: var(--blue); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 36px 16px; text-align: center; color: var(--ink-3); }
.empty.sm { padding: 20px 12px; } .empty.dark { color: #AEB8D8; grid-column: 1 / -1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.stat header { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.stat header i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; background: var(--blue-50); color: var(--blue); }
.stat strong { display: block; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; margin: 10px 0 4px; }
.stat strong small { font-size: 16px; font-weight: 600; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.stat p { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat.accent { background: var(--blue); border-color: var(--blue); color: #fff; }
.stat.accent header, .stat.accent p { color: #DCE7FF; } .stat.accent header i { background: rgba(255, 255, 255, .16); color: #fff; }
.stat.alert header i { background: var(--warn-bg); color: var(--warn); }

.announce { display: flex; align-items: center; gap: 16px; background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--r); padding: 12px 18px; margin-bottom: 24px; }
.announce-tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.announce-tx { flex: 1; min-width: 0; }
.announce-tx p { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Beranda: panel navy ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 20px; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.5fr); gap: 20px; min-width: 0; }
.panel-list header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 2px 4px 12px; }
.panel-list h2 { font-size: 16px; }
.panel-per { font-size: 12px; color: #AEB8D8; }
.panel-list ul { display: grid; gap: 4px; max-height: 452px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--navy-3) transparent; }
.prow { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: #fff; text-align: left; transition: background .15s; }
.prow:hover { background: var(--navy-2); }
.prow.on { background: var(--blue); }
.prank { width: 18px; color: #AEB8D8; font-size: 12px; font-weight: 700; text-align: center; flex: none; }
.prow.on .prank, .prow.on small { color: #DCE7FF; }
.pname { flex: 1; min-width: 0; display: grid; }
.pname strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname small { color: #AEB8D8; font-size: 12px; }
.pscore { font-weight: 700; background: rgba(255, 255, 255, .1); padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.feature { background: linear-gradient(160deg, #1A66F0, #0A44BD); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.feature-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.feature-top .eyebrow { color: #BFD4FF; }
.feature-top h3 { font-size: 22px; line-height: 1.25; letter-spacing: -.01em; margin: 6px 0 4px; }
.feature-top p { color: #DCE7FF; font-size: 13px; }
.feature-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; flex: 1; }
.tile { background: rgba(255, 255, 255, .13); border-radius: var(--r-sm); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 116px; color: #fff; }
.tile strong { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile strong small { font-size: 12px; font-weight: 600; color: #BFD4FF; margin-left: 4px; }
.tile span { font-size: 12px; line-height: 1.4; color: #E4EDFF; }
.tile.dashed { background: none; border: 1.5px dashed rgba(255, 255, 255, .45); align-items: center; justify-content: center; text-align: center; transition: background .15s; }
.tile.dashed:hover { background: rgba(255, 255, 255, .1); }
.feature-foot { display: flex; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .2); }
.feature-foot div { display: grid; gap: 2px; }
.feature-foot span { font-size: 12px; color: #BFD4FF; }
.feature-foot strong { font-size: 20px; font-variant-numeric: tabular-nums; } .feature-foot strong.sm { font-size: 14px; line-height: 1.9; }
.feature-foot .btn { margin-left: auto; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 2px; }
.row-tx { flex: 1; min-width: 0; display: grid; }
.row-tx strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-tx span { color: var(--ink-3); font-size: 12px; }
.datebox { width: 44px; height: 44px; flex: none; display: grid; place-content: center; text-align: center; border-radius: 12px; background: var(--blue-50); color: var(--blue-600); font-size: 11px; font-weight: 600; line-height: 1.15; }
.datebox b { font-size: 16px; display: block; }

/* ---------- Tabel ---------- */
table.rt { width: 100%; border-collapse: collapse; }
.rt th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rt th.r { text-align: right; }
.rt td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rt tbody tr:last-child td { border-bottom: 0; }
.rt tbody tr:hover { background: #FAFBFE; }
.rt tfoot td { border-top: 2px solid var(--line); border-bottom: 0; background: var(--shell); }
.rt td small { display: block; color: var(--ink-3); font-size: 12px; }
.rt .under { color: var(--warn); }
.cell-user { display: flex; align-items: center; gap: 10px; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); padding: 0; background: var(--shell); overflow: hidden; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.cell-att { display: flex; align-items: center; gap: 10px; }

/* ---------- Grafik ---------- */
.hbars { display: grid; gap: 4px; }
.hbar, .hbar-axis { display: grid; grid-template-columns: minmax(150px, 280px) 1fr 56px; gap: 16px; align-items: center; }
.hbar { color: var(--ink); padding: 6px 8px; margin: 0 -8px; border-radius: var(--r-in); }
.hbar:hover { background: var(--shell); }
.hbar-lb { display: grid; min-width: 0; }
.hbar-lb strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-lb small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { position: relative; height: 22px; background: #EEF2F9; border-radius: 6px; }
.hbar-track::after { content: ''; position: absolute; left: var(--mark); top: -6px; bottom: -6px; border-left: 2px dashed var(--bad); }
.hbar-fill { display: block; height: 100%; background: var(--blue); border-radius: 6px; }
.hbar-fill.low { background: var(--bad); }
.hbar-val { font-weight: 700; text-align: right; }
.hbar-scale { position: relative; height: 20px; font-size: 12px; color: var(--ink-3); }
.hbar-scale i { position: absolute; top: 4px; font-style: normal; transform: translateX(-50%); white-space: nowrap; }
.hbar-scale i:first-child { transform: none; } .hbar-scale .mk { color: #B42318; font-weight: 600; }
.vbars { display: flex; align-items: flex-end; gap: clamp(4px, 1.4vw, 18px); height: 220px; padding: 8px 4px 0; border-bottom: 1px solid var(--line); }
.vbar { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.vbar-cols { flex: 1; width: 100%; max-width: 56px; display: flex; align-items: flex-end; gap: 3px; }
.vbar-cols span { flex: 1; border-radius: 5px 5px 0 0; min-height: 2px; }
.c-bobot, .lg-bobot { background: #B9C6E3; } .c-skor, .lg-skor { background: var(--blue); } .c-skor.under, .lg-under { background: #E0912F; }
.vbar-n { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 6px 0; }
.legend { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }

/* ---------- KPI detail ---------- */
.kpi-hero { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 24px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 24px; align-items: center; margin-bottom: 20px; }
.kpi-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.kpi-who h2 { font-size: 22px; line-height: 1.2; } .kpi-who p { color: #AEB8D8; margin-top: 4px; }
.kpi-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.kpi-meta dt { font-size: 12px; color: #AEB8D8; } .kpi-meta dd { font-weight: 600; }
.kpi-score { background: linear-gradient(160deg, #1A66F0, #0A44BD); border-radius: var(--r); padding: 18px 24px; display: grid; gap: 4px; justify-items: start; min-width: 200px; }
.kpi-score span:first-child { font-size: 12px; color: #DCE7FF; } .kpi-score strong { font-size: 44px; line-height: 1.05; letter-spacing: -.02em; }
.krow { display: grid; grid-template-columns: minmax(0, 3fr) repeat(3, minmax(0, .8fr)) minmax(0, 1.2fr) 44px; gap: 10px; align-items: end; padding: 12px 0; border-top: 1px solid var(--line); }
.krow .field { margin: 0; } .krow input.k-in, .krow textarea.k-in { font-size: 14px; }
#kpi-rows { margin-bottom: 12px; }

/* ---------- Pengumuman ---------- */
.ann-list { display: grid; gap: 16px; max-width: 860px; }
.ann { margin: 0; } .ann.pinned { border-color: var(--blue-100); box-shadow: inset 4px 0 0 var(--blue); }
.ann header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ann h2 { font-size: 20px; line-height: 1.3; margin-top: 6px; }
.ann-act { display: flex; }
.ann-body { font-size: 16px; line-height: 1.55; color: var(--ink-2); margin: 10px 0 16px; white-space: pre-wrap; max-width: 70ch; }
.ann footer { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; }

/* ---------- Absensi ---------- */
.att-hero { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 28px; display: grid; grid-template-columns: 1fr auto auto; gap: 28px; align-items: center; margin-bottom: 20px; }
.att-clock .eyebrow { color: var(--cyan); }
#att-time { display: block; font-size: clamp(44px, 8vw, 72px); font-weight: 700; line-height: 1; letter-spacing: -.03em; margin: 8px 0; }
.att-clock p { color: #AEB8D8; }
.att-slots { display: flex; gap: 12px; }
.slot { background: var(--navy-2); border-radius: var(--r-sm); padding: 14px 18px; min-width: 132px; display: grid; gap: 2px; }
.slot span { font-size: 12px; color: #AEB8D8; } .slot strong { font-size: 24px; font-variant-numeric: tabular-nums; } .slot small { color: #C3CBE6; font-size: 12px; }
.att-cta { display: grid; gap: 8px; justify-items: stretch; text-align: center; }
.att-cta small { color: #AEB8D8; }
.cam-stage { position: relative; aspect-ratio: 3 / 4; max-height: 52vh; margin: 0 auto 14px; background: var(--navy); border-radius: var(--r); overflow: hidden; display: grid; place-items: center; }
.cam-stage video, .cam-stage img { width: 100%; height: 100%; object-fit: cover; }
.cam-stage video { transform: scaleX(-1); }
.cam-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: #C3CBE6; }
.cam-info { display: grid; gap: 8px; }
.cam-info li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px; background: var(--shell); border-radius: var(--r-in); }
.cam-info .ic { color: var(--blue); } .cam-info span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.photo-view { width: 100%; border-radius: var(--r); }

/* ---------- Kalender ---------- */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.cal-head h2 { font-size: 20px; flex: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dow span { text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 6px 0; text-transform: uppercase; letter-spacing: .05em; }
.day { display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; text-align: left; transition: border-color .15s, background .15s; min-width: 0; }
.day:hover { border-color: var(--blue); }
.day.out { background: transparent; border-color: transparent; } .day.out b { color: #A5ADC4; }
.day b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; font-weight: 600; font-size: 13px; }
.day.today b { background: var(--blue); color: #fff; }
.day.sel { border-color: var(--blue); background: var(--blue-50); }
.ev { display: block; font-style: normal; font-size: 11px; font-weight: 600; line-height: 18px; padding: 0 6px; border-radius: 5px; color: #fff; background: var(--tc, var(--blue)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.t-Proyek { --tc: #0F5BE8; } .t-Rapat { --tc: #0C1330; } .t-Marketing { --tc: #0E7FA6; } .t-Logistik { --tc: #B45309; } .t-Finance { --tc: #0B8A5F; } .t-HR { --tc: #5B6B93; } .t-Libur { --tc: #D92D20; } .t-Lainnya { --tc: #68728E; }
.evlist { display: grid; gap: 12px; }
.evcard { border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--blue)); border-radius: var(--r-sm); padding: 14px; background: #fff; display: grid; gap: 8px; }
.evcard h3 { font-size: 15px; line-height: 1.35; } .evcard p { color: var(--ink-2); font-size: 13px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--ink-3); font-size: 12px; align-items: center; }
.ev-meta span { display: inline-flex; align-items: center; gap: 5px; }
.evcard { min-width: 0; } .evcard h3, .evcard p { overflow-wrap: anywhere; }
.ev-who { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-2); font-size: 13px; }
.ev-names { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-all { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ev-note { background: var(--shell); border-radius: 10px; padding: 8px 10px; font-size: 12px !important; line-height: 1.45; }
.ev-note.warn { background: var(--warn-bg); color: #8A3F06 !important; } .ev-note.ok { background: var(--ok-bg); color: #06694A !important; }
.ev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.ev-actions .btn { flex: 1 1 auto; } .ev-actions > .mute { display: inline-flex; align-items: center; gap: 6px; }
.ev-sel { flex: 1 1 130px; min-width: 0; }
.iconbtn.line { width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 10px; }
.stack { display: flex; flex: none; } .stack .av { margin-left: -8px; border: 2px solid #fff; } .stack .av:first-child { margin-left: 0; }
.evcard select { min-height: 40px; padding: 4px 34px 4px 12px; font-size: 13px; font-weight: 600; width: 100%; background-position: right 10px center; }
.pipe { display: grid; grid-template-columns: repeat(4, minmax(272px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.pipe-col { background: #EBEFF7; border-radius: var(--r); padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; align-content: start; scroll-snap-align: start; min-height: 200px; }
.pipe-col header { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; font-weight: 700; }
.pipe-col header b { flex: none; background: #fff; border-radius: 999px; min-width: 26px; height: 26px; display: grid; place-items: center; font-size: 12px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; max-height: 190px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-in); padding: 4px 12px; }

/* ---------- Karyawan ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search .ic { position: absolute; left: 14px; top: 12px; color: var(--ink-3); pointer-events: none; }
.toolbar .search input[type=search] { padding-left: 46px; border-radius: 999px; }
.search .ic { left: 16px; }
.toolbar select { width: auto; min-width: 200px; border-radius: 999px; padding-left: 18px; padding-right: 44px; background-position: right 18px center; max-width: 100%; }
.toolbar { align-items: flex-end; }
.toolbar > label { display: block; min-width: 0; max-width: 100%; }
select { max-width: 100%; }
.shell { overflow-x: clip; } #view { min-width: 0; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; color: var(--ink); display: grid; gap: 14px; transition: border-color .15s, transform .2s var(--ease); }
.pcard:hover { border-color: var(--blue); transform: translateY(-2px); }
.pcard-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pcard-top div { min-width: 0; display: grid; } .pcard-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; } .pcard-top span { color: var(--ink-3); font-size: 13px; }
.pcard-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.pcard-div { color: var(--ink-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; }
.profile-head { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 24px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.profile-head h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.2; letter-spacing: -.01em; }
.profile-head p { color: #AEB8D8; margin: 4px 0 10px; }
.profile-head .grow { min-width: 220px; } .profile-head .page-actions .btn:not(.white):not(.danger) { background: var(--navy-2); border-color: var(--navy-3); color: #fff; }
.pgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pgrid2 .card { margin: 0; }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.dl dt { font-size: 12px; color: var(--ink-3); } .dl dd { font-weight: 600; overflow-wrap: anywhere; } .dl .span2 { grid-column: 1 / -1; }

/* ---------- Diskusi ---------- */
.chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; height: calc(100vh - 230px); min-height: 480px; }
.chat .card { margin: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-list header { padding: 18px 18px 10px; } .chat-list h2 { font-size: 16px; }
.chat-list ul { overflow-y: auto; padding: 0 8px 8px; flex: 1; }
.room-sep { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 12px 10px 6px; }
.room { width: 100%; position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 10px; border: 0; background: none; border-radius: var(--r-sm); text-align: left; }
.room:hover { background: var(--shell); } .room.on { background: var(--blue-50); }
.room-tx { flex: 1; min-width: 0; display: grid; }
.room-tx strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.room-tx small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .badge { position: static; border: 0; }
.av.group { background: var(--navy) !important; }
.room-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.room-head div { display: grid; min-width: 0; } .room-head small { color: var(--ink-3); font-size: 12px; }
.back-sm { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: #FAFBFE; }
.daysep { align-self: center; font-size: 12px; font-weight: 600; color: var(--ink-3); background: #fff; border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; margin: 6px 0; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: min(78%, 620px); }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble { background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; min-width: 0; display: grid; gap: 4px; }
.msg.me .bubble { background: var(--blue); border-color: var(--blue); color: #fff; border-radius: 16px 16px 4px 16px; }
.who { font-size: 12px; font-weight: 700; color: var(--blue-600); }
.bubble p { font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble time { font-size: 11px; color: var(--ink-3); justify-self: end; } .msg.me .bubble time { color: #DCE7FF; }
.attach { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--shell); color: var(--ink); min-width: 0; }
.msg.me .attach { background: rgba(255, 255, 255, .16); color: #fff; }
.attach span { min-width: 0; display: grid; } .attach strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; } .attach small { font-size: 11px; opacity: .8; }
.attach-img { border-radius: 10px; max-height: 240px; width: auto; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: #fff; }
.composer-in { flex: 1; min-width: 0; display: grid; gap: 6px; }
.composer textarea { border-radius: 22px; padding: 10px 16px; max-height: 120px; resize: none; }
.composer .btn { width: 44px; padding: 0; flex: none; }
.composer .pop-wrap { flex: none; }
.attach-menu { top: auto; bottom: calc(100% + 12px); left: 0; right: auto; display: grid; grid-template-columns: repeat(4, 76px); gap: 4px; padding: 14px 10px 10px; }
.att-opt { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 6px 2px; border: 0; background: none; border-radius: 12px; font-size: 12px; font-weight: 600; color: var(--ink-2); line-height: 1.25; text-align: center; }
.att-opt i { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 999px; background: var(--c-bg); color: var(--c); transition: transform .2s var(--ease); }
.att-opt:hover i { transform: scale(1.06); } .att-opt:hover { color: var(--ink); }
.a-file { --c: #0F5BE8; --c-bg: #EAF1FF; } .a-media { --c: #0E7FA6; --c-bg: #E0F5FB; } .a-poll { --c: #B45309; --c-bg: #FDF1DC; } .a-event { --c: #D92D20; --c-bg: #FDECEA; }
.poll, .chat-ev { background: #fff; color: var(--ink); border-radius: 12px; padding: 12px; display: grid; gap: 8px; width: 300px; max-width: 100%; }
.poll > strong { font-size: 15px; line-height: 1.35; } .poll small, .chat-ev small { color: var(--ink-3); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.poll-opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; text-align: left; font-weight: 500; }
.poll-opt:hover { border-color: var(--blue); } .poll-opt.on { border-color: var(--blue); font-weight: 700; }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: var(--blue-50); transition: width .3s var(--ease); }
.poll-lb, .poll-opt b { position: relative; } .poll-lb { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; } .poll-lb .ic { color: var(--blue); }
.chat-ev-top { display: flex; gap: 12px; align-items: center; } .chat-ev-top div { display: grid; gap: 2px; min-width: 0; } .chat-ev-top strong { overflow-wrap: anywhere; }
.bubble { grid-template-columns: minmax(0, 1fr); }
.chat-ev-rsvp { display: flex; gap: 8px; flex-wrap: wrap; } .chat-ev-rsvp .btn { flex: 1; padding: 0 8px; }
video.attach-img { max-width: 100%; background: #000; }
.pending { display: flex; align-items: center; gap: 8px; background: var(--blue-50); border-radius: 10px; padding: 4px 4px 4px 12px; font-size: 13px; font-weight: 600; min-width: 0; }
.pending span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending .iconbtn { width: 36px; height: 36px; }

/* ---------- Modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(12, 19, 48, .55); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: var(--r-lg); width: min(520px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); animation: rise .25s var(--ease); }
.modal.wide { width: min(880px, 100%); }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 8px 24px; }
.modal-head h2 { font-size: 20px; line-height: 1.3; }
.modal-body { padding: 8px 24px 24px; overflow-y: auto; }
#toasts { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow); animation: rise .25s var(--ease); transition: opacity .25s, transform .25s; }
.toast .ic { color: #5BE0A8; margin-top: 2px; } .toast.bad .ic { color: #FF8A80; } .toast.info .ic { color: var(--cyan); }
.toast div { display: grid; min-width: 0; } .toast span { color: #C3CBE6; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--shell); }
.login-art { position: relative; overflow: hidden; background: var(--navy); color: #fff; margin: 16px; border-radius: 32px; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: flex-end; gap: 20px; }
#view:focus { outline: none; }
.art-bars { position: absolute; top: -14%; right: -4%; width: 62%; aspect-ratio: 1.5; display: flex; gap: 4%; transform: skewY(-38deg); transform-origin: top right; }
.art-bars i { flex: 1; border-radius: 14px; background: var(--blue); }
.art-bars i:nth-child(2) { background: linear-gradient(var(--cyan) 46%, var(--blue) 46%); margin-top: -14%; }
.art-bars i:nth-child(3) { margin-top: -28%; background: #1A66F0; }
.art-kicker { position: relative; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.art-title { position: relative; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; max-width: 14ch; }
.art-list { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; color: #C3CBE6; max-width: 520px; }
.art-list li { display: flex; align-items: center; gap: 10px; } .art-list .ic { color: var(--cyan); }
.login-main { display: grid; place-items: center; padding: 32px 20px; }
.login-box { width: min(400px, 100%); }
.login-box img { height: 60px; width: auto; margin: 0 0 28px -10px; mix-blend-mode: multiply; }
.login-box h1 { font-size: 36px; letter-spacing: -.02em; line-height: 1.1; }
.login-box > .mute { margin: 8px 0 24px; }
.demo { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.demo p { color: var(--ink-3); font-size: 13px; margin-bottom: 10px; }
.demo-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Responsif ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .cal-wrap { grid-template-columns: 1fr; }
  .dash-side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .dash-side .card { margin: 0; }
  .kpi-hero { grid-template-columns: 1fr 1fr; } .kpi-score { grid-column: 1 / -1; }
  .att-hero { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  body { background: var(--shell); }
  .shell { margin: 0; border-radius: 0; min-height: 100vh; padding: 12px 20px calc(104px + env(safe-area-inset-bottom)); }
  .top { grid-template-columns: 1fr auto; margin-bottom: 20px; }
  .pillnav { display: none; }
  .show-sm { display: flex !important; }
  .botnav { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; justify-content: space-around; gap: 2px; background: var(--navy); border-radius: 24px; padding: 6px; box-shadow: var(--shadow); max-width: 560px; margin: 0 auto; }
  .bot { position: relative; flex: 1; min-height: 52px; display: grid; justify-items: center; align-content: center; gap: 2px; color: #AEB8D8; font-size: 11px; font-weight: 600; border-radius: 18px; }
  .bot.on { background: var(--blue); color: #fff; }
  .bot .badge { top: 2px; right: calc(50% - 22px); border-color: var(--navy); }
  #toasts { bottom: calc(92px + env(safe-area-inset-bottom)); right: 16px; }
  .chat { height: calc(100dvh - 304px); min-height: 400px; }
}
@media (max-width: 860px) {
  .panel { grid-template-columns: 1fr; }
  .panel-list ul { max-height: 240px; }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 250px; margin: 12px 12px 0; border-radius: 24px; padding: 24px; }
  .art-list { display: none; } .art-title { font-size: 26px; max-width: 18ch; }
  .chat { grid-template-columns: 1fr; }
  .msg { max-width: 90%; }
  .chat:not(.has-room) .chat-room, .chat.has-room .chat-list { display: none; }
  .back-sm { display: inline-grid; margin-left: -8px; }
  .pgrid2 { grid-template-columns: 1fr; }
  .krow { grid-template-columns: repeat(3, minmax(0, 1fr)) 44px; } .krow .k-nama { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .shell { padding-left: 16px; padding-right: 16px; }
  .hide-sm { display: none !important; }
  .attach-menu { grid-template-columns: repeat(4, 68px); }
  .toolbar > label, .toolbar > label select, .toolbar .search, .toolbar .field { width: 100%; max-width: none; flex: 1 1 100%; }
  .pop-notif { position: fixed; left: 16px; right: 16px; top: 72px; width: auto; max-width: none; }
  .brand-tag { display: none; }
  .stats { gap: 12px; } .stat { padding: 14px; } .stat strong { font-size: 26px; }
  .dash-side { grid-template-columns: 1fr; }
  .announce { flex-wrap: wrap; gap: 8px 12px; } .announce-tx { flex-basis: 100%; order: 3; } .announce .linkbtn { margin-left: auto; }
  .announce-tx p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .page-actions { width: 100%; } .page-actions .btn, .page-actions .selwrap, .page-actions .selwrap select { flex: 1; }
  .panel { padding: 14px; } .feature-tiles { grid-template-columns: 1fr 1fr; } .tile { min-height: 104px; padding: 12px; }
  .feature { padding: 18px; } .feature-foot .btn { margin-left: 0; width: 100%; }
  .kpi-hero { grid-template-columns: 1fr; padding: 20px; }
  .form-grid, .dl, .checks { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .modal-bg { padding: 0; place-items: end center; } .modal, .modal.wide { width: 100%; border-radius: 24px 24px 0 0; max-height: 94dvh; }
  .modal-body { padding: 8px 18px calc(20px + env(safe-area-inset-bottom)); } .modal-head { padding-left: 18px; }
  .form-foot .btn { flex: 1; }
  .hbar, .hbar-axis { grid-template-columns: 1fr 52px; gap: 4px 10px; } .hbar-lb { grid-column: 1 / -1; } .hbar-axis span:first-child { display: none; }
  .att-hero { padding: 20px; } .att-slots .slot { flex: 1; min-width: 0; }
  .day { min-height: 56px; padding: 4px; align-items: center; } .day .ev { width: 6px; height: 6px; padding: 0; border-radius: 999px; font-size: 0; display: inline-block; } .ev-chips { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; } .more { display: none; }
  .cal-grid { gap: 4px; }
  .pipe { grid-template-columns: repeat(4, 286px); max-width: 100%; }
  /* Tabel menjadi kartu */
  .rt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rt, .rt tbody, .rt tfoot, .rt tr, .rt td { display: block; width: 100%; }
  .rt tr { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 12px; margin-bottom: 10px; }
  .rt td, .rt tfoot td { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 7px 0; border: 0; border-top: 1px solid var(--line); text-align: right; background: none; }
  .rt td:first-child, .rt td.wide + td { border-top: 0; } .rt td:empty { display: none; }
  .rt td[data-l]::before { content: attr(data-l); font-size: 12px; font-weight: 600; color: var(--ink-3); text-align: left; flex: none; }
  .rt td.wide { display: block; text-align: left; } .rt td.wide::before { display: none; }
  .kpi-table td[data-l=No] { display: none; }
  .rt td .btn { width: 100%; } .rt td:last-child:not([data-l]) { display: block; }
  .cell-user { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Foto profil ---------- */
.av { overflow: hidden; } .av img { width: 100%; height: 100%; object-fit: cover; }
/* ---------- Absensi: kondisi & keterangan ---------- */
.moodface { flex: none; display: inline-block; vertical-align: middle; }
.moods { border: 0; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.moods legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.moodbtn { display: grid; justify-items: center; gap: 6px; padding: 8px 2px; border: 2px solid transparent; border-radius: 14px; background: var(--shell); font-size: 11px; font-weight: 600; color: var(--ink-2); line-height: 1.2; text-align: center; transition: transform .2s var(--ease), border-color .15s; }
.moodbtn:hover { transform: translateY(-2px); } .moodbtn.on { border-color: var(--blue); background: var(--blue-50); color: var(--ink); }
.slot strong { display: flex; align-items: center; gap: 8px; }
.att-cta .btn.ghost, .btn.ghost { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.att-note { font-size: 13px; color: var(--ink-2); display: inline-block; max-width: 28ch; overflow-wrap: anywhere; text-align: left; }
.cam-stage { max-height: 40vh; }
/* ---------- Usulan kegiatan ---------- */
.ev.pend { background: #fff; color: var(--tc, var(--blue)); box-shadow: inset 0 0 0 1.5px var(--tc, var(--blue)); }
.pend-box { border-color: #F3D9A4; background: #FFFCF5; }
.pend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 12px; }
.checks .check span { display: grid; line-height: 1.3; padding: 6px 0; } .checks .check small { color: var(--ink-3); font-size: 12px; font-weight: 400; }
/* ---------- Beranda: kartu statistik dengan visual mini ---------- */
.stat { display: flex; flex-direction: column; }
.stat p { margin-bottom: 0; }
.stat-viz { margin-top: auto; padding-top: 14px; height: 46px; display: flex; align-items: flex-end; color: var(--blue); }
.stat.accent .stat-viz { color: #fff; }
.mbars { display: flex; align-items: flex-end; gap: 4px; width: 100%; height: 32px; }
.mbars i { flex: 1; border-radius: 3px 3px 0 0; background: currentColor; opacity: .9; min-height: 3px; }
.mbars i.low { background: var(--bad); } .mbars i.z { opacity: .22; }
.stat.accent .mbars i { background: rgba(255, 255, 255, .88); }
.spark { width: 100%; height: 32px; display: block; overflow: visible; }
.spark .ln { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark .ar { fill: currentColor; opacity: .12; stroke: none; }
.meter { position: relative; width: 100%; height: 8px; border-radius: 999px; background: var(--blue-50); align-self: center; margin-bottom: 8px; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--blue); }
.meter b { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--bad); }
.stat.accent .meter { background: rgba(255, 255, 255, .22); } .stat.accent .meter i { background: #fff; } .stat.accent .meter b { background: var(--cyan); }
.dots { display: flex; gap: 6px; align-items: center; width: 100%; align-self: center; margin-bottom: 8px; }
.dots i { flex: 1; max-width: 26px; height: 10px; border-radius: 999px; background: var(--blue); }
.dots i.bad { background: var(--bad); } .dots i.off { background: #DCE3F1; } .dots i.me { height: 18px; box-shadow: 0 0 0 3px var(--blue-100); }
.row.today { background: var(--blue-50); border-radius: 12px; padding: 10px 12px; margin: 0 -12px; border-top: 0; }
.row.today + .row { border-top: 0; }

/* ---------- Beranda: grafik line ---------- */
.charts { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.chart-card { margin: 0; padding: 20px 20px 12px; }
.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.cc-head h2 { font-size: 16px; line-height: 1.3; } .cc-head p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.cc-head .legend { margin-top: 2px; gap: 6px 14px; font-size: 12px; }
.cc-head .legend i { width: 10px; height: 10px; border-radius: 3px; }
.lc { position: relative; touch-action: pan-y; border-radius: 12px; }
.lc svg { display: block; width: 100%; height: auto; overflow: visible; }
.lc text { font: 500 11px var(--font); fill: var(--ink-3); }
.lc .lc-reftx { font-weight: 700; }
.lc-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.lc-ref { stroke-width: 1.5; stroke-dasharray: 5 4; }
.lc-guide { stroke: var(--navy); stroke-opacity: 0; stroke-width: 1; stroke-dasharray: 3 3; transition: stroke-opacity .15s; }
.lc.on .lc-guide { stroke-opacity: .35; }
.lc-line { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: lcdraw 1.1s var(--ease) both; }
.lc-line.dashed { stroke-width: 2; stroke-dasharray: 5 5; animation: none; }
.lc-area { animation: lcfade .9s ease both; }
.lc-dot { fill: #fff; stroke-width: 2.4; }
@keyframes lcdraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes lcfade { from { opacity: 0; } }
.lc-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--navy); color: #fff; border-radius: 12px; padding: 9px 12px; font-size: 12px; line-height: 1.5; white-space: nowrap; box-shadow: var(--shadow); }
.lc-tip strong { font-size: 12px; }

/* ---------- Beranda: Progres Pekerjaan ---------- */
.proj { margin-top: 20px; }
.pstages { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 6px; margin-bottom: 18px; }
.pstage-arrow { color: #A5ADC4; display: grid; }
.pstage { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; text-align: left; min-width: 0; transition: border-color .15s, background .15s; }
.pstage:hover { border-color: #BFC9E0; }
.pstage.on { border-color: var(--blue); background: var(--blue-50); }
.pstage > i { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--navy); color: #fff; font-style: normal; font-weight: 700; font-size: 13px; }
.pstage.on > i { background: var(--blue); }
.pstage-tx { flex: 1; min-width: 0; display: grid; }
.pstage-tx strong, .pstage-tx small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pstage-tx small { color: var(--ink-3); font-size: 12px; }
.pstage > b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pj-head, .pj-row { display: grid; grid-template-columns: var(--cols); gap: 18px; align-items: center; padding-left: 10px; padding-right: 10px; }
.pj-head { padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.pj-row { min-height: 62px; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pj-row:last-child { border-bottom: 0; } .pj-row:hover { background: #FAFBFE; }
.pj-more { display: contents; }
.c-name { display: grid; min-width: 0; } .c-name strong { line-height: 1.3; overflow-wrap: anywhere; } .c-name small { color: var(--ink-3); font-size: 12px; }
.c-txt { color: var(--ink-2); } .c-edit { display: grid; justify-items: end; }
.c-edit .iconbtn { width: 36px; height: 36px; }
.lb { display: none; color: var(--ink-3); }
.pbar { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ptrack { flex: 1; height: 8px; border-radius: 999px; background: #E6EBF4; overflow: hidden; }
.ptrack i { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.ptrack i.full { background: var(--ok); }
.pbar b { min-width: 52px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.sisa { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; } .sisa small { color: var(--ink-3); font-size: 12px; }
.pj-more-btn { display: flex; justify-content: center; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 1180px) { .charts { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .moodbtn span { font-size: 10px; }
  .pstages { grid-template-columns: repeat(3, 1fr); gap: 8px; } .pstage-arrow { display: none; }
  .pstage { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; position: relative; }
  .pstage > b { position: absolute; top: 8px; right: 12px; font-size: 20px; }
  .pstage-tx { width: 100%; } .pstage-tx small { white-space: normal; font-size: 11px; line-height: 1.3; }
  .pj-head { display: none; }
  .pj-row { grid-template-columns: 1fr auto !important; gap: 8px 8px; padding: 14px 4px; align-items: start; }
  .pj-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; grid-column: 1 / -1; grid-row: 2; }
  .pj-more > .mute { display: none; } .pj-more > .pbar { flex-basis: 100%; }
  .c-edit { grid-column: 2; grid-row: 1; } .lb { display: inline; }
  .sisa { flex-direction: row; align-items: center; gap: 8px; }
}
@media (max-width: 640px) { .chart-card { padding: 16px 14px 8px; } .stat-viz { height: 42px; } }

/* Label tersembunyi (.sr) harus ikut tergulung bersama kolom pipeline, bukan melebarkan halaman */
.pipe, .evcard, .ev-sel, .panel-list ul, .notif-list, .msgs { position: relative; }
.pj-row .chip { justify-self: start; }
@media (max-width: 760px) {
  .proj .card-head { flex-wrap: wrap; gap: 8px 12px; }
  .proj .card-head .page-actions { width: 100%; justify-content: space-between; flex-wrap: nowrap; }
  .proj .card-head .page-actions .btn { flex: none; }
  .pstage-tx strong { white-space: normal; overflow: visible; text-overflow: clip; font-size: 13px; line-height: 1.25; padding-right: 22px; }
}

img[data-spath]:not([src]), video[data-spath]:not([src]) { visibility: hidden; min-height: 44px; }
.login-help { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
