:root {
  --brand: #0B4F6C; --brand-2: #E6F0F4; --ink: #1C1917; --muted: #57534E; --line: #E2E8F0;
  --bg: #F5F7F8; --ok: #166534; --ok-bg: #DCFCE7; --warn: #78350F; --warn-bg: #FEF3C7;
  --bad: #991B1B; --bad-bg: #FEE2E2; --info: #1E40AF; --info-bg: #DBEAFE; --work: #5B21B6; --work-bg: #EDE9FE;
  --wa: #15803D;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 10px; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0 0 10px; }
.demo-strip { background: #1C1917; color: #FDE68A; font-size: 13px; text-align: center; padding: 7px 12px; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 20px; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--brand); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand small { font-weight: 500; color: var(--muted); font-size: 12px; }
.roles { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.roles a { padding: 10px 14px; border-radius: 8px; text-decoration: none; color: #334155; font-weight: 600; }
.roles a.on { background: var(--brand); color: #fff; }
.roles .reset { margin-left: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid #CBD5E1; border-radius: 8px; background: #fff; color: #475569; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; outline: none; }
.narrow { max-width: 560px; margin: 0 auto; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > * { flex: 1 1 220px; min-width: 0; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi .v { font-size: 24px; font-weight: 700; margin: 2px 0; }
label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 4px; color: #334155; }
.field { margin-bottom: 12px; }
input[type=text], input[type=tel], input[type=number], input[type=date], select, textarea { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #CBD5E1; border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #7DD3FC; outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.alt { background: #fff; color: var(--brand); }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn.wa { background: var(--wa); border-color: var(--wa); }
.btn.sm { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.btn.block { width: 100%; }
button.link { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 8px 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid #CBD5E1; border-radius: 999px; font-size: 14px; background: #fff; }
.chip input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip input:focus-visible + span { outline: 3px solid #7DD3FC; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.s-MENUNGGU { background: var(--warn-bg); color: var(--warn); }
.s-DIJADWALKAN { background: var(--info-bg); color: var(--info); }
.s-DIKERJAKAN { background: var(--work-bg); color: var(--work); }
.s-SELESAI { background: var(--ok-bg); color: var(--ok); }
.s-DIBATALKAN { background: #F1F5F9; color: #475569; }
.late { background: var(--bad-bg); color: var(--bad); }
.b-Lunas { background: var(--ok-bg); color: var(--ok); }
.b-DP { background: var(--info-bg); color: var(--info); }
.b-Belum { background: var(--warn-bg); color: var(--warn); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; background: #F8FAFC; padding: 10px 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.scroll { overflow-x: auto; }
.scroll table { min-width: 640px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 14px; text-decoration: none; color: #475569; font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; text-align: center; }
.notice { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.info { background: var(--brand-2); color: var(--brand); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.code6 { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 34px; font-weight: 700; letter-spacing: 6px; text-align: center; margin: 6px 0; }
.qr { width: 120px; height: 120px; margin: 6px auto; border: 6px solid #1E293B; background:
  linear-gradient(90deg,#1E293B 0 18%,transparent 18% 30%,#1E293B 30% 42%,transparent 42% 58%,#1E293B 58% 70%,transparent 70% 82%,#1E293B 82%),
  linear-gradient(#1E293B 0 18%,transparent 18% 40%,#1E293B 40% 52%,transparent 52% 70%,#1E293B 70% 82%,transparent 82%);
  background-blend-mode: multiply; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 12px 20px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 17px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.tg { background: #EEF4F8; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bubble { background: #fff; border-radius: 10px; padding: 8px 10px; font-size: 14px; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.bubble.unread { border-left: 0; background: #FFFFFF; font-weight: 600; }
.bubble time { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 4px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 34px; color: #CBD5E1; cursor: pointer; margin: 0; padding: 0 2px; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #D97706; }
.stars input:focus-visible + label { outline: 3px solid #7DD3FC; }
.task { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #fff; }
.task-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.unit-row { display: grid; grid-template-columns: 1.3fr 0.8fr 1.2fr; gap: 8px; margin-bottom: 8px; }
.home { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.home a.card { text-decoration: none; color: var(--ink); display: block; }
.home a.card:hover { border-color: var(--brand); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1C1917; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; }
#toast.show { opacity: 1; }
@media (max-width: 640px) {
  main { padding: 16px 14px 60px; }
  .topbar { padding: 8px 12px; }
  .roles a { padding: 8px 10px; }
  .unit-row { grid-template-columns: 1fr; }
}
