/* HRIS System — mobile-first, putih & biru */
:root {
  --brand-primary: #1E5BD6;
  --brand-primary-dark: #1546A8;
  --brand-primary-soft: #EAF1FD;
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --text: #0E1A2E;
  --text-muted: #56607A;
  --border: #E3E8F0;
  --success: #0F7A3D;
  --success-soft: #E6F5EC;
  --warning: #A14E05;
  --warning-soft: #FDF1E3;
  --danger: #B42318;
  --danger-soft: #FDECEA;
  --purple: #5B47C2;
  --purple-soft: #F0EEFB;
  --ink: #0E1A2E;
  --line: #EEF1F6;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(36, 53, 74, .05), 0 4px 16px rgba(36, 53, 74, .06);
  --mobile-header-height: 60px;
  --bottom-nav-height: calc(64px + env(safe-area-inset-bottom));
  --content-padding: 16px;
  --content-max-width: 1200px;
  --font: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (min-width: 390px) { :root { --content-padding: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
a { color: var(--brand-primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(55, 117, 195, .45); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 18px; height: 18px; }
.i.lg { width: 28px; height: 28px; }

/* ---------- Splash & status ---------- */
.splash { position: fixed; inset: 0; display: grid; place-items: center; background: var(--surface); z-index: 100; }
.splash .logo { width: 150px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--brand-primary-soft); border-top-color: var(--brand-primary); border-radius: 50%; animation: spin .8s linear infinite; }
.splash .spinner { margin: 22px auto 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: var(--warning); color: #fff; text-align: center; font-size: 13px; padding: 6px calc(12px + env(safe-area-inset-right)) 6px calc(12px + env(safe-area-inset-left)); padding-top: calc(6px + env(safe-area-inset-top)); }

/* ---------- Logo ---------- */
.logo { height: auto; }
.logo-text { font-weight: 700; color: var(--brand-primary); letter-spacing: -.01em; }
.logo-text span { color: var(--text); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s; text-align: center; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-primary-dark); }
.btn-soft { background: var(--brand-primary-soft); border-color: transparent; color: var(--brand-primary-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand-primary); padding: 0 10px; }
.btn-danger { background: var(--surface); border-color: #f0cfd0; color: var(--danger); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn .spinner { width: 18px; height: 18px; border-width: 2px; border-color: rgba(255,255,255,.35); border-top-color: currentColor; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--brand-primary-soft); }

/* ---------- Forms ---------- */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  font-size: 16px; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(55,117,195,.15); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw .icon-btn { position: absolute; right: 2px; top: 1px; color: var(--text-muted); }
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand-primary); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; }
.chip-check span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; cursor: pointer; }
.chip-check input:checked + span { background: var(--brand-primary-soft); border-color: var(--brand-primary); color: var(--brand-primary-dark); font-weight: 600; }
.chip-check input:focus-visible + span { outline: 3px solid rgba(55,117,195,.45); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #cfdbea; position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--brand-primary); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- Cards & lists ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.list > .item + .item { border-top: 1px solid var(--border); }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px; color: inherit; width: 100%; background: none; border: 0; text-align: left; }
a.item, button.item { cursor: pointer; }
a.item:hover, button.item:hover { background: #fbfdff; }
.item .meta { font-size: 13px; color: var(--text-muted); }
.item .chev { color: #b4c3d5; }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-primary-soft); color: var(--brand-primary-dark); font-weight: 700; flex: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #eef2f7; color: var(--text-muted); }
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--brand-primary-soft); color: var(--brand-primary-dark); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--text-muted); }
.stat.accent { background: var(--brand-primary-soft); border-color: transparent; }
.stat.accent b { color: var(--brand-primary-dark); }

.tabs { display: flex; gap: 4px; background: #edf3fb; padding: 4px; border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1; min-height: 38px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--brand-primary-dark); box-shadow: 0 1px 3px rgba(36,53,74,.1); }
.tab .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--brand-primary); color: #fff; font-size: 11px; line-height: 18px; }

.empty { text-align: center; padding: 36px 16px; color: var(--text-muted); }
.empty .i { width: 36px; height: 36px; margin: 0 auto 10px; color: #b4c3d5; }
.skeleton { background: linear-gradient(90deg, #eef3f9 25%, #f6f9fd 50%, #eef3f9 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.state { text-align: center; padding: 40px 16px; }
.state .i { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--text-muted); }
.state p { color: var(--text-muted); margin: 6px 0 16px; }

/* ---------- Page layout ---------- */
.page { padding: 16px var(--content-padding) 24px; max-width: var(--content-max-width); margin: 0 auto; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head .back { margin-left: -10px; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 22px 0 10px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar > * { flex: 1 1 150px; }
.sticky-actions { position: sticky; bottom: calc(var(--bottom-nav-height) + 8px); z-index: 5; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; min-height: 100dvh; padding-bottom: var(--bottom-nav-height); }
.app > .content { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: calc(var(--mobile-header-height) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--content-padding) 0;
  display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border);
}
.topbar .logo { height: 30px; width: auto; }
.topbar .title { font-weight: 700; font-size: 15px; }
.topbar .sub { font-size: 12px; color: var(--text-muted); }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left)); height: var(--bottom-nav-height);
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; color: var(--text-muted); font-size: 11px; font-weight: 600; border-radius: 12px; }
.bottom-nav a[aria-current="page"] { color: var(--brand-primary); }
.bottom-nav a[aria-current="page"] .i { stroke-width: 2.2; }
.bottom-nav a.fab .bubble { width: 48px; height: 48px; margin-top: -22px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-primary); color: #fff; box-shadow: 0 6px 16px rgba(55,117,195,.35); }
.bottom-nav a.fab[aria-current="page"] .bubble { background: var(--brand-primary-dark); }
.sidebar { display: none; }

@media (min-width: 1024px) {
  .app { padding-bottom: 0; display: grid; grid-template-columns: 248px 1fr; }
  .bottom-nav { display: none; }
  .sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px; gap: 4px; overflow-y: auto; }
  .sidebar .brand { padding: 0 8px 18px; }
  .sidebar .brand .logo { width: 150px; }
  .sidebar a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--text); font-weight: 500; }
  .sidebar a:hover { background: #f4f8fd; }
  .sidebar a[aria-current="page"] { background: var(--brand-primary-soft); color: var(--brand-primary-dark); font-weight: 650; }
  .sidebar .spacer { flex: 1; }
  .topbar .mobile-only { display: none; }
  .sticky-actions { bottom: 16px; }
}

/* ---------- Admin shell (sidebar ber-grup + header sticky) ---------- */
.adm { display: flex; }
.adm-side {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50; width: 268px; max-width: 86vw; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border); padding: calc(14px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-102%); transition: transform .2s ease, width .2s ease; overflow: hidden;
}
.adm.open .adm-side { transform: none; box-shadow: 0 12px 40px rgba(23,37,56,.18); }
.adm-scrim { display: none; position: fixed; inset: 0; z-index: 45; background: rgba(23, 37, 56, .42); }
.adm.open .adm-scrim { display: block; }
.adm-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 8px 14px; min-height: 44px; }
.adm-brand .logo { width: 132px; }
.adm-mark { display: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-primary); color: #fff; }
.adm-brand .logo-text { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.adm-nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.adm-group + .adm-group { margin-top: 10px; }
.adm-group-label { font-size: 12px; font-weight: 500; color: var(--text-muted); padding: 8px 10px 6px; white-space: nowrap; }
.adm-nav a { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; }
.adm-nav a .i { width: 20px; height: 20px; color: var(--text-muted); }
.adm-nav a:hover { background: #f2f6fb; }
.adm-nav a[aria-current="page"] { background: var(--brand-primary-soft); color: var(--brand-primary-dark); font-weight: 600; }
.adm-nav a[aria-current="page"] .i { color: var(--brand-primary); }
.adm-user { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 12px 4px 0; margin-top: 8px; }
.adm-user .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.adm-user .who b { font-size: 14px; }
.adm-user .who span { font-size: 12px; color: var(--text-muted); }
.adm-inset { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: calc(64px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0; background: var(--surface); border-bottom: 1px solid var(--border);
}
.adm-title { font-size: 17px; font-weight: 600; min-width: 0; }
.adm-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; flex: none; }
.adm-actions .icon-btn { color: var(--text-muted); }
.bell { position: relative; }
.bell .dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
.avatar.sm { width: 34px; height: 34px; border-radius: 50%; font-size: 13px; margin-left: 4px; }
.adm .avatar { border-radius: 50%; }
.adm .page { padding-top: 20px; }
@media (min-width: 640px) { .adm-header { padding-left: 18px; padding-right: 18px; } }
@media (min-width: 1024px) {
  .adm { padding-bottom: 0; display: flex; }
  .adm-side { position: sticky; top: 0; height: 100vh; height: 100dvh; transform: none; flex: none; }
  .adm-scrim, .adm .bottom-nav { display: none !important; }
  .adm.collapsed .adm-side { width: 72px; }
  .adm.collapsed .adm-nav a { justify-content: center; padding: 0; }
  .adm.collapsed .adm-nav a span, .adm.collapsed .adm-group-label, .adm.collapsed .adm-user .who, .adm.collapsed .adm-brand .badge { display: none; }
  .adm.collapsed .adm-group-label + a { margin-top: 0; }
  .adm.collapsed .adm-group + .adm-group { border-top: 1px solid var(--border); padding-top: 10px; }
  .adm.collapsed .adm-brand { justify-content: center; padding: 2px 0 14px; }
  .adm.collapsed .adm-logo { display: none; }
  .adm.collapsed .adm-mark { display: grid; }
  .adm.collapsed .adm-user { flex-direction: column; padding: 12px 0 0; }
}

/* ---------- KPI, grafik, progres, aktivitas ---------- */
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 479px) { .kpi { padding: 14px; } .kpi-value { font-size: 22px; margin-top: 6px; } }
@media (min-width: 1200px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: block; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(36,53,74,.05); }
a.kpi:hover { border-color: #c9daf0; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 500; }
.kpi-head .i { width: 20px; height: 20px; color: var(--text-muted); }
.kpi-value { font-size: 26px; font-weight: 650; line-height: 1.2; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 15px; color: var(--text-muted); font-weight: 500; }
.kpi-hint { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgba(36,53,74,.05); }
.panel-head { padding: 18px 18px 4px; }
.panel-head h2 { font-size: 16px; font-weight: 600; }
.panel-head p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.panel-body { padding: 14px 18px 18px; }
.cols-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 240px; overflow: visible; }
.chart text { fill: var(--text-muted); font-size: 11px; font-family: var(--font); }
.chart-tip { position: absolute; top: 0; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(36,53,74,.12); padding: 8px 10px; font-size: 12px; min-width: 136px; z-index: 2; }
.chart-tip b { display: block; margin-bottom: 4px; }
.chart-tip div { display: flex; align-items: center; gap: 6px; }
.chart-tip div span:last-child { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.legend { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 0; border-top: 2px solid; display: inline-block; }
.swatch.dash { border-top-style: dashed; }
.swatch.fill { height: 8px; border: 0; border-radius: 2px; }
details.table-view summary { cursor: pointer; font-size: 12px; color: var(--brand-primary); margin-top: 10px; }
details.table-view table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
details.table-view td, details.table-view th { padding: 5px 6px; border-bottom: 1px solid var(--border); text-align: right; font-variant-numeric: tabular-nums; }
details.table-view td:first-child, details.table-view th:first-child { text-align: left; }
.progress { position: relative; flex: 1; height: 8px; border-radius: 999px; background: #e8eff8; overflow: hidden; }
.progress > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--brand-primary); }
.branch-row + .branch-row { margin-top: 18px; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; align-items: flex-start; gap: 12px; }
.activity li + li { margin-top: 16px; }
.activity .avatar { width: 34px; height: 34px; font-size: 12px; }

/* ---------- Tabel data + paginasi ---------- */
.dt { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(14,26,46,.04); }
.dt-scroll { overflow-x: auto; }
.dt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.dt-table th { position: sticky; top: 0; background: #F8FAFC; color: var(--text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dt-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt-table td:first-child { white-space: nowrap; }
.dt-table tbody tr:last-child td { border-bottom: 0; }
.dt-table tbody tr:nth-child(even) td { background: #FCFDFE; }
.dt-table tr.click { cursor: pointer; }
.dt-table tr.click:hover td { background: var(--brand-primary-soft); }
.dt-table tr.click:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; }
.dt-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dt-who .avatar { width: 34px; height: 34px; font-size: 12px; border-radius: 50%; }
.dt-who b { display: block; font-weight: 600; }
.dt-who span { display: block; font-size: 12px; color: var(--text-muted); }
.dt-cards { display: none; }
.dt-card { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dt-card.click { cursor: pointer; }
.dt-card-head { display: flex; align-items: flex-start; gap: 8px; }
.dt-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: 13px; }
.dt-kv dt { color: var(--text-muted); }
.dt-kv dd { margin: 0; text-align: right; font-weight: 500; }
.dt-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.dt-card-actions > * { flex: 1; }
.dt-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; border-top: 1px solid var(--border); background: #FBFCFE; }
.dt-size { display: inline-flex; align-items: center; gap: 6px; }
.dt-size select { border: 1px solid var(--border); border-radius: 8px; padding: 4px 6px; background: #fff; font-size: 13px; }
.dt-pages { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.dt-pg { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.dt-pg:hover:not(:disabled) { border-color: var(--brand-primary); color: var(--brand-primary); }
.dt-pg.on { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; box-shadow: 0 4px 10px rgba(30,91,214,.25); }
.dt-pg:disabled { opacity: .4; cursor: not-allowed; }
.dt-gap { padding: 0 4px; color: var(--text-muted); }
@media (max-width: 767px) {
  .dt-scroll { display: none; }
  .dt-cards { display: block; }
  .dt-size { display: none; }
  .dt-pages { margin-left: 0; }
  .dt-foot { justify-content: center; }
}

/* ---------- Login ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; background: var(--surface); }
.auth-panel { display: none; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: calc(32px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom)); width: 100%; max-width: 420px; margin: 0 auto; }
.auth-main .logo { width: 170px; margin: 0 auto 22px; }
.auth-main .logo-text { font-size: 24px; text-align: center; margin-bottom: 18px; }
.topbar .logo-text { font-size: 16px; }
.sidebar .logo-text { font-size: 19px; }
.auth-main h1 { text-align: center; font-size: 20px; }
.auth-main .lead { text-align: center; color: var(--text-muted); margin: 4px 0 26px; }
.auth-help { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 22px; }
.portal-tag { display: block; width: max-content; margin: 0 auto 10px; }
@media (min-width: 1024px) {
  .auth.split { grid-template-columns: 1fr 1fr; }
  .auth-panel { display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; color: #fff; background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.18), transparent 40%), linear-gradient(160deg, #4a8ad6, var(--brand-primary-dark)); }
  .auth-panel h2 { font-size: 30px; line-height: 1.2; font-weight: 700; max-width: 420px; }
  .auth-panel p { opacity: .85; margin-top: 10px; }
}

/* ---------- Portal karyawan (desain "Aplikasi Karyawan") ---------- */
.emp { display: block !important; max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); padding-bottom: calc(84px + env(safe-area-inset-bottom)); position: relative; }
@media (min-width: 481px) { body:has(.emp) { background: #E8ECF3; } .emp { box-shadow: 0 0 0 1px var(--border); } }
.ei { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ei.sm { width: 16px; height: 16px; } .ei.xs { width: 14px; height: 14px; } .ei.lg { width: 24px; height: 24px; } .ei.xl { width: 40px; height: 40px; }
.tap { transition: transform .12s ease, background-color .15s ease; }
.tap:active { transform: scale(.97); }
.e-page { padding: calc(20px + env(safe-area-inset-top)) 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.e-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.e-head h1 { font-size: 22px; line-height: 28px; font-weight: 700; }
.e-head p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.e-iconbtn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.e-iconbtn:disabled { opacity: .4; cursor: default; }
.e-iconbtn.flat { border: 0; background: var(--bg); }

.e-hero { background: var(--brand-primary); color: #fff; padding: calc(20px + env(safe-area-inset-top)) 20px 92px; border-radius: 0 0 28px 28px; display: flex; flex-direction: column; gap: 20px; }
.e-hero-top { display: flex; align-items: center; justify-content: space-between; }
.e-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: .2px; min-width: 0; }
.e-brand [data-company] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-brand-mark { width: 32px; height: 32px; border-radius: 10px; background: #fff; color: var(--brand-primary); display: flex; align-items: center; justify-content: center; }
.e-avatar { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--brand-primary); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex: none; }
.e-hero p { font-size: 14px; color: #DCE7FB; }
.e-hero h1 { font-size: 24px; line-height: 30px; font-weight: 700; margin-top: 6px; }
.e-glass { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 12px; font-weight: 500; }
.e-overlap { margin-top: -72px; padding: 0 16px 24px; display: flex; flex-direction: column; gap: 24px; }

.e-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.e-card.raise { box-shadow: 0 8px 24px rgba(14,26,46,.06); }
.e-card.sm { border-radius: 16px; padding: 16px; gap: 12px; }
.e-card.tight { padding: 16px; }
.e-row { display: flex; align-items: center; gap: 12px; }
.e-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.e-muted { color: var(--text-muted); }
.e-sub { font-size: 12px; color: var(--text-muted); }
.e-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.e-pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.e-pill.sm { padding: 3px 8px; font-size: 11px; font-weight: 700; }
.k-neutral { background: #EEF1F6; color: #3D4760; } .k-ok { background: var(--success-soft); color: var(--success); }
.k-info { background: var(--brand-primary-soft); color: var(--brand-primary-dark); } .k-warn { background: var(--warning-soft); color: var(--warning); }
.k-bad { background: var(--danger-soft); color: var(--danger); } .k-purple { background: var(--purple-soft); color: var(--purple); }
.e-clock { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.e-clock b { font-size: 44px; line-height: 48px; font-weight: 700; letter-spacing: -1px; }
.e-clock small { font-size: 18px; font-weight: 600; color: var(--text-muted); }
.e-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.e-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.e-tile { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.e-tile span { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.e-tile b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.e-bar { height: 8px; border-radius: 4px; background: var(--brand-primary-soft); overflow: hidden; }
.e-bar > i { display: block; height: 8px; border-radius: 4px; background: var(--brand-primary); transition: width .4s ease; }
.e-btn { height: 56px; width: 100%; border-radius: 16px; border: 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; }
.e-btn.primary { background: var(--brand-primary); color: #fff; box-shadow: 0 6px 16px rgba(30,91,214,.28); }
.e-btn.ink { background: var(--ink); color: #fff; }
.e-btn.done { background: var(--success-soft); color: var(--success); font-size: 15px; cursor: default; }
.e-btn.muted { background: #EEF1F6; color: #3D4760; font-size: 15px; cursor: default; }
.e-btn.ghost { background: #fff; border: 1px solid #C9D3E3; color: var(--ink); }
.e-btn.danger { background: #fff; border: 1px solid #F4C7C3; color: var(--danger); height: 52px; font-size: 15px; }
.e-btn.red { background: var(--danger); color: #fff; }
.e-btn:disabled { background: var(--border); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.e-btn .spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.e-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.e-mini > div { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); min-width: 0; }
.e-mini b { display: block; font-size: 12px; font-weight: 600; }
.e-mini span.e-sub { font-size: 11px; }
.e-ibox { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.e-ibox.sm { width: 28px; height: 28px; border-radius: 8px; }
.e-ibox.lg { width: 44px; height: 44px; border-radius: 12px; }
.e-ibox.round { border-radius: 50%; width: 32px; height: 32px; }
.e-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.e-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; color: var(--ink); text-decoration: none; }
.e-stat b { font-size: 22px; font-weight: 700; }
.e-stat b small { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.e-sec { display: flex; flex-direction: column; gap: 12px; }
.e-sec-h { display: flex; align-items: center; justify-content: space-between; }
.e-sec-h h2 { font-size: 16px; font-weight: 700; }
.e-sec-h a { font-size: 13px; font-weight: 600; padding: 12px 0; }
.e-datebox { width: 52px; height: 56px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.e-datebox.blue { background: var(--brand-primary-soft); color: var(--brand-primary); }
.e-datebox small { font-size: 11px; font-weight: 600; color: inherit; opacity: .8; }
.e-datebox b { font-size: 20px; line-height: 22px; font-weight: 800; }
.e-tag { font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; background: var(--bg); white-space: nowrap; }
.e-feed { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 16px; }
.e-feed > div { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.e-feed > div + div { border-top: 1px solid var(--line); }
.e-feed b { display: block; font-size: 13px; font-weight: 600; }

.e-ring { position: relative; width: 168px; height: 168px; align-self: center; }
.e-ring svg { transform: rotate(-90deg); }
.e-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.e-ring b { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.e-cam { position: relative; height: 300px; border-radius: 16px; background: var(--ink); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.e-cam .oval { width: 160px; height: 208px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.7); }
.e-cam .tag { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 11px; font-weight: 600; }
.e-cam .tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #F04438; }
.e-cam .hint { position: absolute; bottom: 92px; left: 0; right: 0; text-align: center; color: #DCE7FB; font-size: 12px; }
.e-cam .shutter { position: absolute; bottom: 16px; left: 50%; margin-left: -32px; width: 64px; height: 64px; border-radius: 50%; border: 4px solid rgba(255,255,255,.5); background: #fff; background-clip: padding-box; display: flex; align-items: center; justify-content: center; color: var(--brand-primary); cursor: pointer; }
.e-shot { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--bg); }
.e-shot img { width: 72px; height: 88px; border-radius: 12px; object-fit: cover; flex: none; }
.e-actionbar { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 10; margin: 0 -16px -24px; padding: 12px 16px; background: #fff; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.e-actionbar .e-status { font-size: 12px; text-align: center; }

.e-sum4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 16px; }
.e-sum4 > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 0; }
.e-sum4 > div + div { border-left: 1px solid var(--line); }
.e-sum4 b { font-size: 20px; font-weight: 700; } .e-sum4 span { font-size: 11px; color: var(--text-muted); }
.e-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.e-chips::-webkit-scrollbar { display: none; }
.e-fchip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); background: #fff; color: var(--ink); display: inline-flex; align-items: center; text-decoration: none; }
.e-fchip[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.e-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #E8ECF3; }
.e-seg > * { flex: 1; min-height: 40px; border: 0; border-radius: 10px; font-size: 12px; font-weight: 700; background: transparent; color: var(--text-muted); display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.e-seg.lg > * { min-height: 44px; font-size: 14px; }
.e-seg > [aria-selected="true"], .e-seg > [aria-checked="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(14,26,46,.12); }
.e-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.e-item { width: 100%; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 12px; display: flex; align-items: center; gap: 12px; color: var(--ink); cursor: pointer; font: inherit; }
.e-item .times { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.e-empty { background: #fff; border: 1px dashed #C9D3E3; border-radius: 20px; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.e-empty b { font-size: 15px; } .e-empty p { font-size: 13px; line-height: 19px; color: var(--text-muted); }
.e-empty .e-ibox { width: 64px; height: 64px; border-radius: 20px; }
.e-req { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.e-req p { font-size: 13px; line-height: 19px; color: #3D4760; }
.e-note { padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 18px; }
.e-newgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.e-new { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--ink); }
.e-new b { display: block; font-size: 15px; }
.e-balance { background: var(--brand-primary); color: #fff; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.e-balance small { font-size: 12px; color: #DCE7FB; font-weight: 500; }
.e-balance b { font-size: 28px; line-height: 32px; font-weight: 800; }
.e-balance .e-bar { background: rgba(255,255,255,.22); } .e-balance .e-bar > i { background: #fff; }

.e-form-head { position: sticky; top: 0; z-index: 10; height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0; display: flex; align-items: center; gap: 8px; background: #fff; border-bottom: 1px solid var(--border); }
.e-form-head h1 { font-size: 17px; font-weight: 700; }
.e-form { padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 18px; }
.e-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.e-field > label, .e-field > .lbl { font-size: 13px; font-weight: 700; }
.e-input { height: 52px; width: 100%; padding: 0 14px; border-radius: 14px; border: 1px solid #C9D3E3; background: #fff; color: var(--ink); font-size: 16px; min-width: 0; appearance: none; -webkit-appearance: none; }
textarea.e-input { height: auto; padding: 12px 14px; line-height: 22px; resize: none; }
select.e-input { background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.e-input:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(30,91,214,.15); }
.e-input[aria-invalid="true"] { border-color: var(--danger); }
.e-err { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--danger); }
.e-upload { min-height: 72px; border-radius: 14px; border: 1.5px dashed #A9B6CC; background: #fff; color: var(--brand-primary); display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 700; width: 100%; }
.e-file { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px; border: 1px solid var(--border); background: #fff; }
.e-submitbar { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); margin: 0 -16px -24px; padding: 12px 16px; background: #fff; border-top: 1px solid var(--border); }
.e-success { padding: 72px 24px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.e-success .e-ibox { width: 88px; height: 88px; border-radius: 50%; }
.e-success h2 { font-size: 22px; font-weight: 700; margin-top: 8px; }
.e-success p { font-size: 14px; line-height: 22px; color: var(--text-muted); }
.e-group-h { margin: 0 4px; font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: .6px; text-transform: uppercase; }
.e-group { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.e-group > * { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 44px; color: var(--ink); text-decoration: none; width: 100%; background: none; border: 0; text-align: left; font: inherit; cursor: default; }
.e-group > a, .e-group > button { cursor: pointer; }
.e-group > * + * { border-top: 1px solid var(--line); }
.e-group .ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.e-group .ttl span { font-size: 12px; color: var(--text-muted); }
.e-group .ttl b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.e-profile { align-items: center; text-align: center; padding: 24px 20px 20px; gap: 12px; }
.e-profile .big { width: 88px; height: 88px; border-radius: 50%; background: var(--brand-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }

.e-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30; width: 100%; max-width: 480px; height: calc(84px + env(safe-area-inset-bottom)); padding: 6px 8px calc(22px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--border); display: flex; align-items: flex-end; }
.e-nav a { flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-muted); font-size: 11px; font-weight: 500; text-decoration: none; }
.e-nav a .pillic { position: relative; width: 52px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.e-nav a[aria-current="page"] { color: var(--brand-primary); font-weight: 700; }
.e-nav a[aria-current="page"] .pillic { background: var(--brand-primary-soft); }
.e-nav a.fab { justify-content: flex-end; }
.e-nav a.fab .pillic { width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; border: 4px solid #fff; background: var(--brand-primary); color: #fff; box-shadow: 0 6px 16px rgba(30,91,214,.32); }
.e-nav .badge-dot { position: absolute; top: 0; right: 10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; border: 2px solid #fff; background: var(--danger); color: #fff; font-size: 9px; font-weight: 700; line-height: 12px; text-align: center; }
.emp .toast-wrap, body:has(.emp) .toast-wrap { bottom: auto; top: calc(16px + env(safe-area-inset-top)); }
body:has(.emp) .toast { background: var(--ink); border-radius: 14px; padding: 14px 16px; font-weight: 600; }
body:has(.emp) .toast.ok { background: var(--ink); }
body:has(.emp) .toast.bad { background: var(--danger); }

/* ---------- Sheet / dialog ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(23, 37, 56, .42); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-height: 92vh; max-height: 92dvh; background: var(--surface); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .2s ease-out; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 12px 10px 20px; border-bottom: 1px solid var(--border); }
.sheet-body { padding: 18px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
@media (min-width: 720px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 520px; border-radius: 22px; max-height: 86vh; }
  .sheet.wide { max-width: 760px; }
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-nav-height) + 12px); z-index: 80; display: grid; justify-items: center; gap: 8px; padding: 0 16px; pointer-events: none; }
@media (min-width: 1024px) { .toast-wrap { bottom: 24px; } }
.toast { max-width: 440px; padding: 12px 16px; border-radius: 12px; background: #1f2f44; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: up .2s; pointer-events: auto; }
.toast.bad { background: var(--danger); }
.toast.ok { background: var(--success); }
.secret { font: 600 22px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; background: var(--brand-primary-soft); color: var(--brand-primary-dark); border-radius: 12px; padding: 14px; text-align: center; user-select: all; }
pre.json { background: #f4f8fd; border-radius: 12px; padding: 12px; font-size: 12px; overflow: auto; max-height: 260px; white-space: pre-wrap; word-break: break-word; }

/* ---------- Map ---------- */
.map-wrap { position: relative; }
.map { height: 300px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: #eef3f9; z-index: 0; }
@media (min-width: 720px) { .map { height: 380px; } }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 500; margin-top: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 0; background: none; cursor: pointer; font-size: 14px; }
.suggest button + button { border-top: 1px solid var(--border); }
.suggest button:hover { background: var(--brand-primary-soft); }
.pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; background: var(--brand-primary); transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.leaflet-container { font: inherit; }

/* ---------- Schedule grid ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.week div { text-align: center; padding: 6px 2px; border-radius: 8px; background: #f2f6fb; font-size: 11px; line-height: 1.3; }
.week div b { display: block; font-size: 11px; color: var(--text-muted); font-weight: 600; }
.week div.work { background: var(--brand-primary-soft); color: var(--brand-primary-dark); }
.week div.off { background: #f6f2ea; color: var(--warning); }

/* ---------- Kalender jadwal pegawai ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 4px; }
.cal-head h2 { font-size: 17px; font-weight: 700; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 8px 14px 14px; }
.cal-wd { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 4px 0; }
.cal-wd:nth-child(7) { color: var(--warning); }
.cal-day { display: flex; flex-direction: column; gap: 6px; min-height: 96px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.cal-day:hover:not(:disabled) { border-color: var(--brand-primary); box-shadow: 0 4px 14px rgba(30,91,214,.12); transform: translateY(-1px); }
.cal-day:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.cal-day:disabled { cursor: default; }
.cal-day.off { background: #FBF8F3; }
.cal-day.none { border-style: dashed; background: #FAFBFD; }
.cal-num { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; line-height: 22px; }
.cal-day.today .cal-num { color: var(--brand-primary); }
.cal-day.today { border-color: var(--brand-primary); box-shadow: inset 0 0 0 1px var(--brand-primary); }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); flex: none; }
.cal-shift { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; line-height: 1.25; min-width: 0; }
.cal-time { display: flex; flex-wrap: wrap; align-items: baseline; font-variant-numeric: tabular-nums; }
.cal-time b { font-size: 13px; font-weight: 700; }
.cal-time span { font-size: 13px; font-weight: 500; }
.cal-time span::before { content: "–"; margin: 0 2px; }
.cal-shift em { font-style: normal; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.cal-off { font-size: 12px; font-weight: 600; color: var(--warning); }
.cal-none { font-size: 12px; color: var(--text-muted); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid; flex: none; }
.cal-legend i.off { background: #FBF8F3; border-color: var(--warning); }
.cal-legend i.dot { width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--purple); }
@media (max-width: 639px) {
  .cal { gap: 3px; padding: 4px 6px 10px; }
  .cal-day { min-height: 64px; padding: 4px; gap: 3px; border-radius: 9px; }
  .cal-num { font-size: 12px; line-height: 18px; }
  .cal-shift { padding: 3px 2px; border-radius: 6px; text-align: center; }
  .cal-time { flex-direction: column; align-items: center; }
  .cal-time b { font-size: 11px; }
  .cal-time span { font-size: 10px; opacity: .8; }
  .cal-time span::before { content: none; }
  .cal-shift em { display: none; }
  .cal-off, .cal-none { font-size: 10px; text-align: center; }
}

/* ---------- Jam operasional ---------- */
.oh-rows { display: flex; flex-direction: column; }
.oh-row { display: grid; grid-template-columns: 76px 84px 1fr; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.oh-row:last-child { border-bottom: 0; }
.oh-day { font-weight: 600; font-size: 14px; }
.oh-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--brand-primary-dark); }
.oh-toggle input { width: 18px; height: 18px; accent-color: var(--brand-primary); margin: 0; }
.oh-row.closed .oh-day, .oh-row.closed .oh-toggle { color: var(--text-muted); }
.oh-ranges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.oh-range { display: inline-flex; align-items: center; gap: 6px; }
.oh-range .input { width: 132px; min-height: 40px; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.oh-range .icon-btn { width: 36px; height: 36px; }
.oh-mini { display: flex; flex-direction: column; gap: 4px; }
.oh-days { display: inline-flex; gap: 3px; }
.oh-days i { font-style: normal; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--line); color: #9AA3B5; }
.oh-days i.on { background: var(--brand-primary-soft); color: var(--brand-primary-dark); }
@media (max-width: 559px) {
  .oh-row { grid-template-columns: 1fr auto; }
  .oh-ranges { grid-column: 1 / -1; }
  .oh-row.closed .oh-ranges { display: none; }
}

/* ---------- Steps ---------- */
.steps { display: flex; gap: 6px; overflow-x: auto; }
.steps span { flex: 1; min-width: 72px; text-align: center; font-size: 12px; font-weight: 600; padding: 8px 4px; border-radius: 10px; background: #f0f4f9; color: var(--text-muted); }
.steps span.done { background: var(--success-soft); color: var(--success); }
.steps span.now { background: var(--brand-primary); color: #fff; }

/* ---------- Slip ---------- */
.slip { max-width: 640px; margin: 0 auto; }
.slip .head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--brand-primary); padding-bottom: 12px; margin-bottom: 14px; }
.slip .head .logo { width: 130px; }
.slip table { width: 100%; border-collapse: collapse; font-size: 14px; }
.slip td { padding: 7px 0; border-bottom: 1px solid var(--border); }
.slip td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.slip tr.total td { font-weight: 700; font-size: 16px; border-bottom: 0; color: var(--brand-primary-dark); }

@media print {
  body { background: #fff; }
  .topbar, .bottom-nav, .sidebar, .no-print, .toast-wrap, .offline { display: none !important; }
  .app { display: block; padding: 0; }
  .card { box-shadow: none; border: 0; }
  .overlay { position: static; background: none; display: block; }
  .sheet { max-height: none; border-radius: 0; }
  .sheet-head, .sheet-foot { display: none; }
  body:has(.overlay) #root { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
