/* ==========================================================================
   PayrollPro — Design system "Tinta & Jade"
   Ink-indigo navigation, cool paper surfaces, jade for money, saffron for attention.
   Instrument Sans for interface, Newsreader for figures & headings.
   ========================================================================== */
:root {
  --ink: #161b36;
  --ink-2: #1f2650;
  --ink-3: #2c3568;
  --paper: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --line: #e3e7f0;
  --text: #1a2040;
  --muted: #66708f;
  --jade: #0f9d84;
  --jade-soft: #dff5ef;
  --saffron: #e3a13a;
  --saffron-soft: #fdf1dc;
  --rose: #d2475f;
  --rose-soft: #fde6ea;
  --sky: #4b6bfb;
  --sky-soft: #e5eaff;
  --accent: var(--jade);
  --glow: 0 0 0 3px rgba(15,157,132,.18), 0 8px 28px -6px rgba(15,157,132,.55);
  --shadow-sm: 0 1px 2px rgba(22,27,54,.06), 0 1px 1px rgba(22,27,54,.04);
  --shadow-md: 0 10px 30px -12px rgba(22,27,54,.18), 0 2px 6px rgba(22,27,54,.05);
  --shadow-lg: 0 30px 60px -20px rgba(22,27,54,.35);
  --r-lg: 16px; --r-md: 11px; --r-sm: 8px;
  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-fig: "Newsreader", Georgia, serif;
  --side-w: 258px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0f1328;
  --surface: #171c38;
  --surface-2: #1c2244;
  --line: #2a3160;
  --text: #e7eaf6;
  --muted: #9aa3c7;
  --jade-soft: rgba(15,157,132,.16);
  --saffron-soft: rgba(227,161,58,.15);
  --rose-soft: rgba(210,71,95,.16);
  --sky-soft: rgba(75,107,251,.16);
  --shadow-md: 0 14px 34px -14px rgba(0,0,0,.6);
  --glow: 0 0 0 3px rgba(32,201,170,.22), 0 8px 30px -4px rgba(32,201,170,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-ui); font-size: 14.5px; line-height: 1.55;
  background: var(--paper); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-fig); font-weight: 600; letter-spacing: -.01em; margin: 0 0 .4em; line-height: 1.15; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 18px; }
.fig { font-family: var(--font-fig); font-variant-numeric: lining-nums tabular-nums; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

/* ---------- Images: shadow + glow (semua gambar) ---------- */
img, .avatar, .logo-mark {
  box-shadow: var(--shadow-md);
  transition: box-shadow .25s ease, transform .25s ease;
}
img:hover, .avatar:hover, .logo-mark:hover { box-shadow: var(--glow); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; overflow: hidden;
  font-weight: 600; font-size: 13px; color: #fff;
  background: linear-gradient(140deg, var(--ink-3), var(--jade));
  box-shadow: 0 0 0 2px var(--surface), 0 0 14px -2px rgba(15,157,132,.55);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; box-shadow: none; }
.avatar.lg { width: 84px; height: 84px; font-size: 26px; box-shadow: 0 0 0 4px var(--surface), 0 0 34px -4px rgba(15,157,132,.7); }
.avatar.xl { width: 112px; height: 112px; font-size: 34px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.sidebar {
  background: radial-gradient(120% 60% at 0% 0%, #26306a 0%, var(--ink) 60%);
  color: #c9cfee; padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 18px; overflow-y: auto;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 6px 6px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; flex: none;
  background: conic-gradient(from 200deg, var(--jade), #5eead4, var(--saffron), var(--jade));
  color: var(--ink); font-family: var(--font-fig); font-weight: 700; font-size: 20px;
  box-shadow: 0 0 22px -2px rgba(94,234,212,.55);
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; box-shadow: none; }
.brand strong { display: block; color: #fff; font-family: var(--font-fig); font-size: 19px; line-height: 1.1; }
.brand span { font-size: 11.5px; color: #8f98c6; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11.5px; color: #7d86b6; padding: 8px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px;
  color: #c9cfee; font-weight: 500; text-decoration: none; position: relative;
}
.nav a i { font-size: 17px; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: rgba(94,234,212,.12); color: #fff; }
.nav a.active::before {
  content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: #5eead4; box-shadow: 0 0 12px #5eead4;
}
.nav .badge-count { margin-left: auto; background: var(--saffron); color: var(--ink); border-radius: 20px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.side-foot { margin-top: auto; font-size: 12px; color: #7d86b6; padding: 0 8px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .page-title { font-family: var(--font-fig); font-size: 21px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--text); cursor: pointer; font-size: 17px;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 30px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; }
.user-chip .who { line-height: 1.15; padding-right: 6px; }
.user-chip .who b { display: block; font-size: 13px; }
.user-chip .who span { font-size: 11.5px; color: var(--muted); }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 200px; padding: 6px; display: none; }
.dropdown.open { display: block; }
.dropdown a { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.dropdown a:hover { background: var(--surface-2); text-decoration: none; }

.content { padding: 26px 28px 60px; max-width: 1440px; width: 100%; }

/* ---------- Panels & grid ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h3 { margin: 0; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 20px; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.mt { margin-top: 18px; }

/* ---------- Hero ledger (dashboard signature) ---------- */
.ledger-hero {
  background: radial-gradient(90% 140% at 100% 0%, #2c3a85 0%, var(--ink) 55%);
  color: #e6e9fb; border-radius: 20px; padding: 26px 28px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.ledger-hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(94,234,212,.35), transparent 65%); pointer-events: none;
}
.ledger-hero .period { color: #9ea8d8; font-size: 13px; }
.ledger-hero .big { font-family: var(--font-fig); font-size: clamp(36px, 5vw, 54px); line-height: 1; margin: 6px 0 4px; color: #fff; font-variant-numeric: tabular-nums; }
.ledger-hero .sub { color: #aab3df; }
.ribbon { display: flex; height: 18px; border-radius: 9px; overflow: hidden; margin: 22px 0 12px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.ribbon span { height: 100%; width: 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); position: relative; }
.ribbon .r-net { background: linear-gradient(90deg, #12b495, #5eead4); box-shadow: 0 0 18px rgba(94,234,212,.6); }
.ribbon .r-tax { background: var(--saffron); }
.ribbon .r-bpjs { background: #8b9cff; }
.ribbon .r-other { background: #e2687c; }
.ribbon-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; }
.ribbon-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.ribbon-legend b { color: #fff; font-weight: 600; margin-left: 6px; font-variant-numeric: tabular-nums; }

.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat .value { font-family: var(--font-fig); font-size: 28px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .delta { font-size: 12.5px; margin-top: 2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: 600 13.5px var(--font-ui); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px -8px rgba(15,157,132,.8); }
.btn-primary:hover { box-shadow: var(--glow); color: #fff; }
.btn-ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-danger { color: var(--rose); }
.btn-danger:hover { background: var(--rose-soft); border-color: var(--rose); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { padding: 6px 8px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: 14px var(--font-ui); transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); background: var(--surface); }
.input-sm { padding: 6px 9px; font-size: 13px; border-radius: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.section-label { grid-column: 1 / -1; font-family: var(--font-fig); font-size: 16px; font-weight: 600; padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 4px; }
.section-label:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 22px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: var(--shadow-sm); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { position: relative; }
.search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 34px; min-width: 240px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table th[data-sort] { cursor: pointer; }
.table th[data-sort]::after { content: " ↕"; opacity: .35; }
.table th.asc::after { content: " ↑"; opacity: 1; } .table th.desc::after { content: " ↓"; opacity: 1; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.table .r { text-align: right; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
.person { display: flex; align-items: center; gap: 12px; }
.person b { display: block; font-weight: 600; }
.person > span:not(.avatar) > span { display: block; font-size: 12.5px; color: var(--muted); }
.avatar i { color: #fff; font-size: 16px; }
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty i { font-size: 34px; display: block; margin-bottom: 8px; color: var(--accent); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 30px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-jade { background: var(--jade-soft); color: var(--jade); }
.chip-saffron { background: var(--saffron-soft); color: #b2761a; }
.chip-rose { background: var(--rose-soft); color: var(--rose); }
.chip-sky { background: var(--sky-soft); color: var(--sky); }
.chip-ink { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
:root[data-theme="dark"] .chip-saffron { color: var(--saffron); }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; width: fit-content; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font: 600 13px var(--font-ui); color: var(--muted); cursor: pointer; }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-pane { display: none; } .tab-pane.active { display: block; }

/* ---------- Modal, toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(12,15,35,.55); backdrop-filter: blur(4px); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal-backdrop.open { display: flex; animation: fade .18s ease; }
.modal { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 760px; animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
.modal.sm { max-width: 460px; }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; flex: 1; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 18px 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 10px; align-items: flex-start; min-width: 280px; max-width: 380px; padding: 13px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); animation: pop .25s ease; border-left: 4px solid var(--jade); }
.toast.error { border-left-color: var(--rose); } .toast.warning { border-left-color: var(--saffron); }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; display: flex; gap: 10px; }
.alert-success { background: var(--jade-soft); color: var(--jade); }
.alert-danger { background: var(--rose-soft); color: var(--rose); }
.alert-warning { background: var(--saffron-soft); color: #9a6614; }
.alert-info { background: var(--sky-soft); color: var(--sky); }

/* ---------- Payslip preview ---------- */
.slip { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.slip-head { background: var(--ink); color: #fff; padding: 20px 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.slip-cols { display: grid; grid-template-columns: 1fr 1fr; }
.slip-cols > div { padding: 16px 22px; }
.slip-cols > div + div { border-left: 1px solid var(--line); }
.slip-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.slip-row:last-child { border-bottom: 0; }
.slip-total { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; background: linear-gradient(90deg, var(--jade-soft), transparent); border-top: 1px solid var(--line); }
.slip-total .fig { font-size: 28px; color: var(--jade); font-weight: 600; }

/* ---------- Auth & installer ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art {
  background: radial-gradient(80% 80% at 20% 10%, #2e3b8a 0%, var(--ink) 60%); color: #dfe3fb;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-art h1 { font-size: clamp(34px, 4vw, 52px); color: #fff; max-width: 14ch; }
.auth-art p { max-width: 42ch; color: #aab3df; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.mock-slip {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 20px;
  max-width: 380px; backdrop-filter: blur(6px); box-shadow: 0 30px 70px -20px rgba(0,0,0,.6), 0 0 60px -20px rgba(94,234,212,.5);
  transform: rotate(-2deg);
}
.mock-slip .row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed rgba(255,255,255,.12); font-size: 13.5px; }
.mock-slip .net { font-family: var(--font-fig); font-size: 30px; color: #5eead4; text-shadow: 0 0 24px rgba(94,234,212,.6); }

.steps { display: flex; gap: 8px; margin-bottom: 24px; }
.steps .st { flex: 1; height: 5px; border-radius: 5px; background: var(--line); transition: background .3s; }
.steps .st.on { background: var(--accent); box-shadow: 0 0 10px rgba(15,157,132,.6); }
.step { display: none; } .step.active { display: block; animation: fade .25s ease; }
.req { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pw-meter { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }
.logo-drop { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; cursor: pointer; }
.logo-drop img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }

/* ---------- Attendance grid ---------- */
.att-status { min-width: 120px; }
.att-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal div { aspect-ratio: 1.3; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); padding: 5px 7px; font-size: 12px; }
.cal .s-hadir { background: var(--jade-soft); } .cal .s-terlambat { background: var(--saffron-soft); }
.cal .s-absen { background: var(--rose-soft); }
.cal .nonwork { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line) 70%, transparent) 6px 7px); } .cal .s-cuti, .cal .s-izin, .cal .s-sakit { background: var(--sky-soft); }


/* ---------- Kalender kerja ---------- */
.calcard { border: 1px solid var(--line); border-left: 4px solid var(--cc, var(--jade)); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--surface); transition: box-shadow .2s, border-color .2s; }
.calcard:hover { box-shadow: var(--shadow-md); }
.calcard.active { border-color: var(--cc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc) 18%, transparent), 0 10px 26px -12px var(--cc); }
.wcal-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.wcal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--line); }
.wcal-head, .wcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wcal-head div { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.wcal button, .wcal .pad { min-height: 64px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; padding: 6px 8px; font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.wcal .pad { background: none; border: 0; cursor: default; }
.wcal button span { font-size: 11px; line-height: 1.25; color: var(--muted); }
.wcal button:hover { border-color: var(--accent); }
.wcal button.today { box-shadow: 0 0 0 2px var(--accent); }
.d-workday { background: var(--jade-soft) !important; }
.d-rest { background: var(--surface-2) !important; }
.d-holiday { background: var(--rose-soft) !important; }
.d-off { background: var(--saffron-soft) !important; }
.d-extra { background: var(--sky-soft) !important; }
.daypick { display: flex; gap: 6px; flex-wrap: wrap; }
.daypick label { cursor: pointer; }
.daypick input { position: absolute; opacity: 0; pointer-events: none; }
.daypick span { display: inline-grid; place-items: center; width: 52px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 13px; transition: all .15s; }
.daypick input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px -8px var(--accent); }
.daypick input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }

.kindpick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kindpick input { position: absolute; opacity: 0; pointer-events: none; }
.kindpick span { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface-2); transition: all .15s; }
.kindpick span i { grid-row: span 2; font-size: 22px; color: var(--muted); align-self: center; }
.kindpick small { color: var(--muted); font-size: 12px; }
.kindpick input:checked + span { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent), 0 10px 24px -14px var(--accent); }
.kindpick input:checked + span i { color: var(--accent); }
.kindpick input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
@media (max-width: 640px) { .kindpick { grid-template-columns: 1fr; } }

/* ---------- Lembur mingguan ---------- */
.otw td.dcell { text-align: center; min-width: 64px; }
.otw .h { display: inline-block; min-width: 40px; padding: 3px 6px; border-radius: 8px; font-weight: 600; font-size: 12.5px; }
.otw .h.wd { background: var(--jade-soft); color: var(--jade); }
.otw .h.hd { background: var(--sky-soft); color: var(--sky); }
.otw .h.bad { background: var(--rose-soft); color: var(--rose); }
.otw .nonwork { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line) 60%, transparent) 6px 7px); }
.capbar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; min-width: 120px; }
.capbar span { display: block; height: 100%; border-radius: 8px; background: var(--jade); }
.capbar.warn span { background: var(--saffron); } .capbar.over span { background: var(--rose); box-shadow: 0 0 10px var(--rose); }
.daytag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 20px; margin-top: 3px; }
.nonwork-row td:first-child { box-shadow: inset 3px 0 0 var(--saffron); }
.ot-auto { font-size: 11px; color: var(--sky); }
.ot-flag { font-size: 11px; color: var(--rose); display: block; max-width: 200px; }
@media (max-width: 860px) { #calLayout { grid-template-columns: 1fr !important; } .wcal button { min-height: 48px; } .wcal button span { display: none; } }

/* ---------- Impor & ekspor ---------- */
.dropzone { display: flex; align-items: center; gap: 14px; padding: 16px; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; background: var(--surface-2); transition: all .15s; }
.dropzone i { font-size: 28px; color: var(--accent); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: var(--glow); }
.dropzone.busy { opacity: .6; pointer-events: none; }
.imp-card.focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent), var(--shadow-md); }
.exp-card .panel-body { display: grid; gap: 6px; align-content: start; height: 100%; }
.exp-card p { margin: 0 0 6px; }
#pvTable tr.bad { background: var(--rose-soft); }

/* ---------- Absensi HP ---------- */
.clock-wrap { max-width: 560px; margin: 0 auto; display: grid; gap: 16px; }
.clock-hero { text-align: center; padding: 22px 20px 18px; }
.clock-hero .now { font-family: var(--font-fig); font-size: 52px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.clock-hero .date { color: #aab3df; margin-top: 4px; }
.geo-map { height: 230px; border-radius: 14px; overflow: hidden; position: relative; isolation: isolate; border: 1px solid var(--line); box-shadow: var(--shadow-md); z-index: 0; }
.geo-status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.geo-status.ok { background: var(--jade-soft); color: var(--jade); } .geo-status.bad { background: var(--rose-soft); color: var(--rose); } .geo-status.wait { background: var(--surface-2); color: var(--muted); }
.cam { position: relative; width: 220px; height: 220px; margin: 0 auto; border-radius: 50%; overflow: hidden; background: var(--ink);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent), 0 0 40px -6px var(--accent); }
.cam video, .cam img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); box-shadow: none; }
.cam img { transform: none; }
.cam .hint { position: absolute; inset: 0; display: grid; place-items: center; color: #aab3df; font-size: 13px; text-align: center; padding: 20px; }
.punch-btn { width: 100%; padding: 18px; font-size: 18px; border-radius: 16px; }
.punch-btn.out { background: var(--saffron); border-color: var(--saffron); color: var(--ink); box-shadow: 0 8px 24px -10px var(--saffron); }
.timeline-mini { display: grid; gap: 8px; }
.timeline-mini .ev { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.timeline-mini .ev img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #4b6bfb; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(75,107,251,.3), 0 0 16px #4b6bfb; }
.office-pin { width: 18px; height: 18px; border-radius: 50%; background: var(--jade); border: 3px solid #fff; box-shadow: 0 0 14px var(--jade); }
.loc-map { height: 460px; border-radius: 14px; overflow: hidden; position: relative; isolation: isolate; border: 1px solid var(--line); z-index: 0; }
.selfie-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; cursor: zoom-in; }
.flag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.leaflet-container { font-family: var(--font-ui); }

/* ---------- Code / docs ---------- */
pre.code { background: var(--ink); color: #d6dcff; padding: 16px; border-radius: 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.6; }
.prose { max-width: 78ch; }
.prose li { margin-bottom: 6px; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 22px 34px; }
.timeline li::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: attr(data-n); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700; box-shadow: 0 0 12px rgba(15,157,132,.55); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g-main { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: var(--side-w); transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: grid; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .g-2, .g-3, .form-grid, .slip-cols { grid-template-columns: 1fr; }
  .slip-cols > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  .user-chip .who { display: none; }
  .search .input { min-width: 0; width: 100%; }
}
@media (max-width: 520px) { .g-4 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .no-print { display: none !important; } .shell { display: block; } body { background: #fff; } }

/* ---------- Multi-perusahaan ---------- */
.co-chip { padding-right: 10px; }
.co-mark { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; font: 700 11px/1 var(--font-ui, inherit);
  letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, var(--accent), #4b6bfb); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent); }
.co-mark.sm { min-width: 26px; height: 22px; border-radius: 7px; font-size: 10px; box-shadow: none; }
.co-list { min-width: 260px; max-height: 60vh; overflow: auto; }
.co-list a { align-items: center; }
.co-list a.active { background: var(--surface-2); font-weight: 600; }
.co-static { gap: 6px; }
.co-card { position: relative; }
.co-card .co-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 13px; }
.co-card.inactive { opacity: .6; }
.co-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.co-stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.co-stats b { display: block; font-size: 17px; font-family: var(--font-fig); }
.co-stats span { font-size: 11.5px; color: var(--muted); }
@media (max-width: 760px) { .co-chip .who { display: none; } .co-static { display: none; } }
/* ---------- Pilihan modul HRIS / Payroll ---------- */
.mod-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mod-opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.mod-opt input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.mod-opt b { display: block; font-size: 14px; }
.mod-opt small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 2px; }
.mod-opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
@media (max-width: 600px) { .mod-pick { grid-template-columns: 1fr; } }
