/* ==========================================================================
   PayrollPro — Tema "Hanna Consulting" (hcu.co.id)
   Sage hijau tua untuk navigasi & kepercayaan, lime khas logo Hanna untuk sorotan,
   krem/ivory untuk permukaan, emas lembut untuk perhatian.
   Plus Jakarta Sans untuk antarmuka, Cormorant Garamond untuk angka & judul.
   ========================================================================== */
:root {
  /* palet merek Hanna Consulting */
  --sage-950: #151e18; --sage-900: #1f2b23; --sage-800: #2f3e33; --sage-700: #3f5443; --sage-600: #5f7a61;
  --sage-500: #7d977e; --sage-400: #9fb59f; --sage-300: #bfd0bb; --sage-200: #d7e1d3; --sage-100: #e9efe6; --sage-50: #f3f6f1;
  --lime: #a9cc4a; --lime-hi: #c5e17a; --gold: #c6ae74; --gold-soft: #e8dcb8; --cream: #f8f6f0; --ivory: #fffdf8;

  --ink: var(--sage-900);
  --ink-2: var(--sage-800);
  --ink-3: var(--sage-700);
  --paper: var(--cream);
  --surface: var(--ivory);
  --surface-2: var(--sage-50);
  --line: #e3e8dd;
  --text: #1d2620;
  --muted: #66756a;
  --jade: #5f7a61;          /* uang / positif / aksi utama */
  --jade-soft: #eaf2dc;
  --saffron: #c39a45;       /* perhatian (emas) */
  --saffron-soft: #f6efdc;
  --rose: #c4483f;
  --rose-soft: #f9e5e2;
  --sky: #3e7a8c;
  --sky-soft: #e3eff2;
  --accent: var(--jade);
  --glow: 0 0 0 3px rgba(169,204,74,.28), 0 10px 30px -6px rgba(95,122,97,.55), 0 0 26px -6px rgba(169,204,74,.55);
  --shadow-sm: 0 1px 2px rgba(31,43,35,.06), 0 1px 1px rgba(31,43,35,.04);
  --shadow-md: 0 12px 30px -12px rgba(31,43,35,.20), 0 2px 6px rgba(31,43,35,.05);
  --shadow-lg: 0 35px 70px -20px rgba(31,43,35,.38);
  --r-lg: 18px; --r-md: 12px; --r-sm: 8px;
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-fig: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --side-w: 262px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #121914;
  --surface: #18221b;
  --surface-2: #1d2a21;
  --line: #2f3e33;
  --text: #eef2ea;
  --muted: #a3b39f;
  --jade: #8fb26a;
  --jade-soft: rgba(169,204,74,.14);
  --saffron-soft: rgba(195,154,69,.16);
  --rose-soft: rgba(196,72,63,.18);
  --sky-soft: rgba(62,122,140,.2);
  --shadow-md: 0 14px 34px -14px rgba(0,0,0,.6);
  --glow: 0 0 0 3px rgba(169,204,74,.25), 0 8px 30px -4px rgba(169,204,74,.55);
  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: 700; letter-spacing: 0; 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-weight: 700; 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(95,122,97,.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(95,122,97,.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% 55% at 0% 0%, #3f5443 0%, var(--sage-900) 58%, var(--sage-950) 100%);
  color: #cfdccb; 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: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff, var(--sage-50) 70%);
  color: var(--ink); font-family: var(--font-fig); font-weight: 700; font-size: 20px;
  box-shadow: 0 0 22px -2px rgba(169,204,74,.55);
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; box-shadow: none; }
.logo-mark.hcu { background: radial-gradient(circle at 40% 35%, #ffffff, #eef3e6 72%); padding: 5px; }
.logo-mark.hcu img { object-fit: contain; border-radius: 50%; }
/* tanda tangan merek Hanna Consulting */
.hcu-sign { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; text-decoration: none;
  background: linear-gradient(135deg, rgba(169,204,74,.10), rgba(255,255,255,.03)); border: 1px solid rgba(169,204,74,.22); color: #cfdccb; }
.hcu-sign:hover { text-decoration: none; border-color: rgba(169,204,74,.5); box-shadow: 0 0 24px -8px rgba(169,204,74,.7); color: #fff; }
.hcu-sign img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 16px -2px rgba(169,204,74,.6); background: #fff; padding: 2px; }
.hcu-sign b { display: block; color: #fff; font-size: 12.5px; letter-spacing: .02em; }
.hcu-sign span { display: block; font-size: 10.5px; color: #97ac95; line-height: 1.3; }
.hcu-sign small { display: block; font-size: 10px; color: var(--lime-hi); letter-spacing: .08em; text-transform: uppercase; }
.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: #97ac95; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11.5px; color: #8fa58f; padding: 8px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px;
  color: #cfdccb; 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(169,204,74,.12); color: #fff; }
.nav a.active::before {
  content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: #c5e17a; box-shadow: 0 0 12px #c5e17a;
}
.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: #8fa58f; 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%, #3f5443 0%, var(--sage-900) 55%, var(--sage-950) 100%);
  color: #e9efe6; 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(169,204,74,.35), transparent 65%); pointer-events: none;
}
.ledger-hero .period { color: #a9bba6; font-size: 13px; }
.ledger-hero .big { font-family: var(--font-fig); font-weight: 700; font-size: clamp(40px, 5.4vw, 60px); line-height: 1; margin: 6px 0 4px; color: #fff; font-variant-numeric: lining-nums tabular-nums; }
.ledger-hero .sub { color: #b9c8b6; }
.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, #7d977e, #c5e17a); box-shadow: 0 0 18px rgba(169,204,74,.6); }
.ribbon .r-tax { background: var(--saffron); }
.ribbon .r-bpjs { background: #9fb59f; }
.ribbon .r-other { background: #d0705f; }
.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: 31px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; margin-top: 4px; }
.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: linear-gradient(135deg, var(--sage-700), var(--accent)); border-color: var(--sage-700); color: #fff; box-shadow: 0 8px 20px -8px rgba(47,62,51,.7), inset 0 1px 0 rgba(255,255,255,.12); }
.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: #8a6d2c; }
.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(15,21,17,.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: #7a5f22; }
.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%, #3f5443 0%, var(--sage-900) 58%, var(--sage-950) 100%); color: #e2eadc;
  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: #b9c8b6; }
.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(169,204,74,.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: #c5e17a; text-shadow: 0 0 24px rgba(169,204,74,.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(95,122,97,.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-weight: 700; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.02em; }
.clock-hero .date { color: #b9c8b6; 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: #b9c8b6; 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: #3e7a8c; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(62,122,140,.3), 0 0 16px #3e7a8c; }
.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: #d7e1d3; 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(95,122,97,.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), #3e7a8c); 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; } }

/* ---------- Tema Hanna Consulting: motif logo pada hero & login ---------- */
.ledger-hero::before, .auth-art::before {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; bottom: -160px; pointer-events: none;
  background: url("../img/hcu-mark.png") center / contain no-repeat; opacity: .07; filter: saturate(1.2);
}
.auth-art::before { width: 620px; height: 620px; right: -180px; bottom: -200px; opacity: .09; }
.auth-art > * { position: relative; z-index: 1; }
.auth-hcu { display: flex; align-items: center; gap: 14px; margin-top: 18px; color: #b9c8b6; font-size: 13px; }
.auth-hcu img { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 0 26px -4px rgba(169,204,74,.75); }
.auth-hcu b { color: #fff; display: block; font-size: 14px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--lime-hi); }
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.app-foot { margin-top: auto; padding: 18px 28px 22px; font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.app-foot img { width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 10px -2px rgba(169,204,74,.7); }
.app-foot a { color: var(--sage-600); font-weight: 600; }
:root[data-theme="dark"] .app-foot a { color: var(--lime-hi); }

.auth-mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-mobile-brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 0 26px -4px rgba(169,204,74,.8); }
.auth-mobile-brand b { display: block; font-family: var(--font-fig); font-size: 22px; }
.auth-mobile-brand span { font-size: 12px; color: var(--sage-600); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 860px) { .auth-mobile-brand { display: flex; } }
