:root {
  /* Latar abu kebiruan lebih gelap agar kartu putih "terangkat"; teks sekunder ≥5:1 */
  --bg: #e8ecf4; --surface: #ffffff; --surface-2: #f2f4f9; --border: #d5dbe7; --text: #0f172a; --muted: #4f5b70;
  /* Warna MAP (dari logo): biru #0000F0 diredam agar nyaman dibaca, merah hanya aksen merek (bukan arti "bahaya") */
  --primary: #1a23c8; --primary-2: #141ba6; --primary-soft: #e1e4fc; --brand-red: #e1141b; --brand-navy: #0b1150;
  --ok: #15803d; --ok-soft: #e7f6ec; --warn: #b45309; --warn-soft: #fef3e2; --bad: #b91c1c; --bad-soft: #fdecec;
  --info: #0369a1; --info-soft: #e5f3fb; --purple: #7c3aed; --purple-soft: #f1ebfe; --gray-soft: #e5e9f1;
  --radius: 12px; --shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 6px 18px rgba(15, 23, 42, .07);
  --sidebar: 248px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .xs { font-size: .76rem; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; } .row.end { justify-content: flex-end; } .row.top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: .75rem; }
.grid { display: grid; gap: 1rem; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.mt { margin-top: 1rem; } .mt-s { margin-top: .5rem; } .mb { margin-bottom: 1rem; } .mb-s { margin-bottom: .5rem; }
.hidden { display: none !important; }
.ic { display: inline-block; vertical-align: -0.18em; flex-shrink: 0; }
/* Scrollbar: halaman utama disembunyikan (tetap bisa digulir); area lain transparan dan baru tampil tipis saat kursor di atasnya */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
*:hover { scrollbar-color: #c9cfdb transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background-color: transparent; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*:hover::-webkit-scrollbar-thumb { background-color: #c9cfdb; }
::-webkit-scrollbar-thumb:hover { background-color: #9aa3b5; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.c-ok { color: var(--ok); } .c-warn { color: var(--warn); } .c-bad { color: var(--bad); }
a, button, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Layout */
.shell { display: flex; min-height: 100vh; }
/* Menu samping terang: logo MAP (PNG transparen) tampil tanpa kotak putih */
.sidebar { width: var(--sidebar); background: var(--surface); color: var(--text); border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .2s; }
.sidebar .brand { padding: 1.1rem 1.2rem .7rem; display: flex; flex-direction: column; gap: .4rem; border-bottom: 1px solid var(--border); }
.sidebar .brand-logo { display: block; }
.sidebar .brand-logo img { display: block; width: 100%; height: auto; }
.sidebar .brand-sub { color: var(--muted); letter-spacing: .02em; }
.sidebar nav { overflow-y: auto; padding: .25rem .6rem 1rem; flex: 1; }
.sidebar .group { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem .6rem .35rem; }
.sidebar a { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: 8px; color: #334155; font-size: .92rem; }
.sidebar a:hover { background: var(--gray-soft); color: var(--text); }
.sidebar a.active { background: var(--primary); color: #fff; font-weight: 650; box-shadow: inset 4px 0 0 var(--brand-red), 0 3px 10px rgba(26, 35, 200, .25); }
.sidebar a.active .ico { opacity: 1; }
.sidebar .user-box { padding: .8rem 1rem; border-top: 1px solid var(--border); }
.sidebar a .badge { margin-left: auto; }
.sidebar .ico { width: 18px; display: inline-flex; justify-content: center; opacity: .9; }
.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.95); box-shadow: 0 1px 3px rgba(15, 23, 42, .06); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); padding: .65rem 1.25rem; display: flex; align-items: center; gap: .75rem; }
.topbar .title { font-weight: 650; font-size: 1.05rem; }
.content { padding: 1.25rem; max-width: 1280px; width: 100%; margin: 0 auto; }
.menu-btn { display: none; }
.scrim { display: none; }
.bottomnav { display: none; }

/* Mode karyawan (mobile-first) */
.shell.employee .sidebar { display: none; }
.shell.employee .main { margin-left: 0; }
.shell.employee .menu-btn { display: none; }
.shell.employee .content { max-width: 640px; padding-bottom: 6rem; }
.shell.employee .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 10px rgba(15, 23, 42, .06); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { flex: 1; min-height: 56px; text-align: center; padding: .45rem 0 .5rem; color: var(--muted); font-size: .74rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative; }
.bottomnav a .ico { line-height: 1; display: inline-flex; padding: 2px 14px; border-radius: 999px; transition: background-color .15s; }
.bottomnav a.active { color: var(--primary); font-weight: 650; }
.bottomnav a.active .ico { background: var(--primary-soft); }
.bottomnav a:active .ico { background: var(--gray-soft); }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .shell.open .sidebar { transform: none; }
  .shell.open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .content { padding: 1rem; }
}

/* Komponen dasar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; }
.card.flat { box-shadow: none; }
.card h2, .card h3 { margin-bottom: .75rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: .5rem .9rem; border-radius: 9px; font: inherit; font-size: .9rem; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c5cfdd; background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-2); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--gray-soft); }
.btn.sm { padding: .3rem .6rem; font-size: .8rem; border-radius: 7px; }
.btn.lg { padding: .9rem 1.2rem; font-size: 1.05rem; border-radius: 12px; }
.btn.block { width: 100%; }
.icon-btn { position: relative; border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; min-width: 44px; min-height: 44px; padding: .35rem; border-radius: 10px; color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--gray-soft); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: .72rem; font-weight: 700; }
.icon-btn .badge { position: absolute; top: -2px; right: -4px; }

.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--gray-soft); color: #475569; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.primary { background: var(--primary-soft); color: var(--primary); }

label.field { display: block; }
label.field > span { display: block; font-size: .82rem; font-weight: 600; color: #334155; margin-bottom: .3rem; }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: .55rem .7rem; border: 1px solid #cfd8e3; border-radius: 9px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(37,99,235,.25); border-color: var(--primary-2); }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { resize: vertical; min-height: 80px; }
.check { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font-size: .92rem; }
.hint { font-size: .78rem; color: var(--muted); margin-top: .25rem; }
.form-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }

.alert { padding: .7rem .9rem; border-radius: 10px; font-size: .9rem; border: 1px solid transparent; }
.alert.info { background: var(--info-soft); color: #075985; border-color: #bfe1f3; }
.alert.warn { background: var(--warn-soft); color: #92400e; border-color: #f7d9a8; }
.alert.bad { background: var(--bad-soft); color: #991b1b; border-color: #f5c2c2; }
.alert.ok { background: var(--ok-soft); color: #166534; border-color: #bfe5cb; }

table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #334155; font-weight: 650; padding: .55rem .6rem; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; }
.table td { padding: .6rem; border-bottom: 1px solid #edf1f6; vertical-align: top; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #f6f9ff; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.table-wrap .table th:first-child, .table-wrap .table td:first-child { padding-left: .85rem; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: .6rem .9rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

.stat { padding: 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); box-shadow: var(--shadow); }
.stat.ok { border-left-color: var(--ok); } .stat.warn { border-left-color: var(--warn); } .stat.bad { border-left-color: var(--bad); } .stat.info { border-left-color: var(--info); }
.stat .v { font-size: 1.7rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .82rem; margin-top: .2rem; }
.stat.ok .v { color: var(--ok); } .stat.warn .v { color: var(--warn); } .stat.bad .v { color: var(--bad); } .stat.info .v { color: var(--info); }

.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.loading { text-align: center; color: var(--muted); padding: 2rem; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 20px 50px rgba(15,23,42,.25); }
.modal.wide { max-width: 900px; }
.modal-head { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 1.2rem; }
.modal-foot { padding: .9rem 1.2rem; border-top: 1px solid var(--border); display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) { .modal-bg { padding: 0; align-items: flex-end; } .modal { border-radius: 16px 16px 0 0; max-height: 94vh; overflow-y: auto; } .modal-foot { position: sticky; bottom: 0; background: var(--surface); } }

/* Toast */
.toasts { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; width: min(440px, calc(100vw - 2rem)); }
.toast { padding: .75rem 1rem; border-radius: 10px; background: #0f172a; color: #fff; box-shadow: var(--shadow); font-size: .9rem; }
.toast.ok { background: #14532d; } .toast.bad { background: #7f1d1d; } .toast.warn { background: #78350f; }

/* Dropdown notifikasi */
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); width: min(380px, calc(100vw - 1.5rem)); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.15); z-index: 60; max-height: 70vh; overflow-y: auto; }
.notif { padding: .7rem .9rem; border-bottom: 1px solid #eef2f7; cursor: pointer; }
.notif:hover { background: #f8fafc; }
.notif.unread { background: #f3f7ff; }
.notif .t { font-weight: 600; font-size: .9rem; }

/* Halaman absen */
.clock-card { text-align: center; background: linear-gradient(135deg, var(--primary), #3a44dc); color: #fff; border: 0; position: relative; overflow: hidden; }
.clock-card::after { content: ""; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; background: var(--brand-red); transform: rotate(45deg); opacity: .9; }
.clock-card .time { font-size: 3.2rem; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.clock-card .date { opacity: .92; }
.clock-card .sched { margin-top: .6rem; display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.16); padding: .3rem .8rem; border-radius: 999px; font-size: .85rem; }
/* Status hari ini: satu kalimat dengan ikon & warna (warna bukan satu-satunya penanda) */
.absen-status { display: flex; gap: .8rem; align-items: center; border-left: 4px solid var(--border); }
.absen-status .st-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-soft); color: var(--muted); flex-shrink: 0; }
.absen-status .st-title { font-weight: 700; font-size: 1.02rem; }
.absen-status.ok { border-left-color: var(--ok); } .absen-status.ok .st-ico { background: var(--ok-soft); color: var(--ok); }
.absen-status.warn { border-left-color: var(--warn); } .absen-status.warn .st-ico { background: var(--warn-soft); color: var(--warn); }
.absen-status.info { border-left-color: var(--info); } .absen-status.info .st-ico { background: var(--info-soft); color: var(--info); }
/* Satu tombol utama: masuk (hijau) → pulang (biru MAP) → selesai (nonaktif) */
.att-btn { width: 100%; min-height: 92px; border: 0; border-radius: 18px; padding: 1rem; font: inherit; font-weight: 700; font-size: 1.15rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; color: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, .14); transition: transform .12s ease-out, filter .15s; }
.att-btn.masuk { background: var(--ok); } .att-btn.pulang { background: var(--primary); }
.att-btn:not(:disabled):active { transform: scale(.98); filter: brightness(.95); }
.att-btn:disabled { background: #e2e8f0; color: #475569; cursor: not-allowed; box-shadow: none; }
.att-btn[aria-busy="true"] { background: var(--primary-2); color: #fff; }
.att-btn .lbl { text-align: center; }
.att-btn .sub { font-weight: 500; font-size: .8rem; opacity: .92; }
.att-btn .spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; width: 26px; height: 26px; }
/* Konfirmasi absen layar penuh */
.att-done { position: fixed; inset: 0; z-index: 120; background: rgba(11, 17, 80, .55); display: flex; align-items: flex-end; justify-content: center; }
.att-done .sheet { background: var(--surface); width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 1.6rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom)); text-align: center; animation: sheet-up .22s ease-out; }
.att-done .big-ico { width: 84px; height: 84px; margin: 0 auto .8rem; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }
.att-done .pengajuan .big-ico, .att-done .sheet.pengajuan .big-ico { background: var(--info); }
.att-done h2 { margin: 0; font-size: 1.25rem; }
.att-done .jam { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: .3rem 0; color: var(--text); }
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) { .att-done { align-items: center; } .att-done .sheet { border-radius: 22px; } }
.timeline { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.timeline .box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem; }
.timeline .box .v { font-size: 1.25rem; font-weight: 700; }
.map { height: 260px; border-radius: 10px; border: 1px solid var(--border); z-index: 0; }
.map.tall { height: 380px; }
.camera video, .camera img { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 3/4; object-fit: cover; }

/* Riwayat & kalender */
.day-list .day { display: flex; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid #edf1f6; align-items: center; }
.day-list .date-box { width: 48px; text-align: center; flex-shrink: 0; }
.day-list .date-box .d { font-size: 1.2rem; font-weight: 700; line-height: 1; }
.day-list .date-box .w { font-size: .72rem; color: var(--muted); text-transform: uppercase; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .hd { font-size: .72rem; text-transform: uppercase; color: var(--muted); text-align: center; padding: .3rem 0; font-weight: 600; }
.cal .cell { min-height: 84px; border: 1px solid var(--border); border-radius: 8px; padding: .3rem; background: #fff; font-size: .75rem; overflow: hidden; }
.cal .cell.out { background: transparent; border-color: transparent; }
.cal .cell.hol { background: #fff6f6; }
.cal .cell.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal .cell .n { font-weight: 700; font-size: .8rem; }
.cal .ev { display: block; margin-top: 2px; padding: 1px 4px; border-radius: 4px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.pending { background: var(--warn-soft); color: var(--warn); }
.cal .ev.hol { background: var(--bad-soft); color: var(--bad); }

/* Grid kehadiran */
.att-grid { border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.att-grid th, .att-grid td { border-bottom: 1px solid #edf1f6; padding: 0; text-align: center; }
.att-grid th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; font-weight: 600; color: var(--muted); padding: .35rem 0; min-width: 30px; }
.att-grid th.name, .att-grid td.name { position: sticky; left: 0; background: #fff; text-align: left; padding: .4rem .7rem; min-width: 170px; z-index: 3; border-right: 1px solid var(--border); }
.att-grid th.name { z-index: 4; background: var(--surface-2); }
.att-grid td.c { width: 30px; height: 32px; cursor: default; }
.att-grid td.c span { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 6px; font-weight: 700; font-size: .72rem; }
.att-grid td.c.can span { cursor: pointer; }
.att-grid td.c.can span:hover { outline: 2px solid var(--primary-2); }
.s-hadir { background: var(--ok-soft); color: var(--ok); }
.s-terlambat { background: var(--warn-soft); color: var(--warn); }
.s-alpha { background: var(--bad-soft); color: var(--bad); }
.s-cuti, .s-sakit, .s-izin { background: var(--purple-soft); color: var(--purple); }
.s-libur { background: #f1f5f9; color: #94a3b8; }
.s-menunggu { background: var(--info-soft); color: var(--info); }
.s-belum_absen, .s-akan_datang, .s-di_luar_masa_kerja { background: transparent; color: #cbd5e1; }
.s-koreksi { box-shadow: inset 0 0 0 2px #0f172a33; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-size: .78rem; color: var(--muted); }
.legend span.k { display: inline-flex; width: 18px; height: 18px; border-radius: 5px; align-items: center; justify-content: center; font-weight: 700; font-size: .66rem; margin-right: .3rem; }

/* Editor rumus */
.editor { position: relative; }
.editor textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; min-height: 96px; line-height: 1.5; }
.editor textarea.err { border-color: var(--bad); }
.hl { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 8px; padding: .45rem .6rem; white-space: pre-wrap; word-break: break-word; }
.hl .v { color: var(--primary); font-weight: 600; } .hl .c { color: #0e7490; font-weight: 600; } .hl .f { color: var(--purple); font-weight: 600; }
.hl .n { color: #15803d; } .hl .u { color: #fff; background: var(--bad); border-radius: 3px; padding: 0 2px; } .hl .o { color: #64748b; }
.ac { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 24px rgba(15,23,42,.15); max-height: 240px; overflow-y: auto; min-width: 280px; }
.ac div { padding: .4rem .7rem; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; font-size: .84rem; }
.ac div.sel, .ac div:hover { background: var(--primary-soft); }
.ac div small { color: var(--muted); }
.var-panel { max-height: 420px; overflow-y: auto; }
.var-panel .item { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem .5rem; border-radius: 7px; cursor: pointer; font-size: .82rem; }
.var-panel .item:hover { background: var(--primary-soft); }
.var-panel .item code { color: var(--primary); font-weight: 600; }
.formula-line { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; color: #334155; background: var(--surface-2); padding: .15rem .4rem; border-radius: 5px; word-break: break-word; }

/* Slip */
.slip { max-width: 560px; }
.slip .line { display: flex; justify-content: space-between; padding: .35rem 0; gap: 1rem; }
.slip .line.total { font-weight: 700; border-top: 1px solid var(--border); margin-top: .25rem; padding-top: .5rem; }
.slip .net { background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: .8rem 1rem; display: flex; justify-content: space-between; font-weight: 700; font-size: 1.15rem; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 20% 10%, #dbe7ff, transparent 50%), radial-gradient(circle at 90% 90%, #e0f2fe, transparent 45%), var(--bg); }
.login { width: min(400px, 100%); }
.login { border-top: 4px solid var(--primary); }
.login-brand { text-align: center; margin-bottom: 1.3rem; }
.login-brand img { width: min(220px, 70%); height: auto; display: block; margin: .2rem auto 1rem; }
.login-brand h1 { font-size: 1.25rem; margin: 0; }
.login-brand p { margin: .25rem 0 0; }
.login .field input { min-height: 46px; font-size: 16px; }

/* Tab Cuti | Lembur (halaman Pengajuan) */
.seg { display: flex; gap: 4px; background: var(--gray-soft); padding: 4px; border-radius: 12px; }
.seg a { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.seg a.on { background: var(--surface); color: var(--primary); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* Persetujuan: kartu di HP, tabel di layar lebar */
.m-cards { display: none; }
@media (max-width: 760px) {
  .hide-m { display: none !important; }
  .m-cards { display: grid; gap: .7rem; }
  .m-card { padding: .9rem; }
  .m-card .m-info { margin: .55rem 0 .7rem; display: grid; gap: .2rem; }
  .m-card .m-actions { display: flex; gap: .5rem; }
  .m-card .m-actions .btn { flex: 1; min-height: 44px; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.bars { display: flex; align-items: flex-end; gap: .6rem; height: 170px; padding-top: 1rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; justify-content: flex-end; }
.bars .bar .b { width: 100%; max-width: 46px; background: linear-gradient(180deg, #f59e0b, #d97706); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bars .bar .val { font-size: .78rem; font-weight: 700; }
.bars .bar .lbl { font-size: .72rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 550; }
.chip-select { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-select label { border: 1px solid var(--border); border-radius: 999px; padding: .3rem .7rem; cursor: pointer; font-size: .85rem; user-select: none; }
.chip-select label.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip-select input { display: none; }
