/* shadcn-inspired design system — hr-payroll (indigo, document-style) */
:root {
  --background: 0 0% 100%;
  --foreground: 245 25% 16%;
  --card: 0 0% 100%;
  --card-foreground: 245 25% 16%;
  --popover: 0 0% 100%;
  --popover-foreground: 245 25% 16%;
  --primary: 245 60% 55%;
  --primary-foreground: 245 30% 98%;
  --secondary: 245 20% 96%;
  --secondary-foreground: 245 25% 20%;
  --muted: 245 18% 96%;
  --muted-foreground: 245 12% 46%;
  --accent: 245 26% 95%;
  --accent-foreground: 245 25% 20%;
  --destructive: 0 70% 48%;
  --destructive-foreground: 0 0% 98%;
  --success: 152 55% 38%;
  --success-foreground: 0 0% 98%;
  --warning: 32 92% 48%;
  --warning-foreground: 30 15% 12%;
  --border: 245 18% 89%;
  --input: 245 18% 89%;
  --ring: 245 60% 55%;
  --radius: 0.5rem;          /* squarer than pos */

  --row-height: 40px;          /* compact baseline */
  --card-padding: 16px;

  /* Accent (overridable via tweaks) */
  --accent-h: 245;
  --accent-s: 60%;
  --accent-l: 55%;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: hsl(var(--foreground));
  background: hsl(215 22% 97%);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01';
}

button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.mono { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.tabular, .tnum { font-variant-numeric: tabular-nums; }

/* App shell */
.app {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: hsl(215 28% 99%);
  border-right: 1px solid hsl(var(--border));
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 16px;
}
.sidebar-brand-text { min-width: 0; flex: 1; overflow: hidden; }
.sidebar-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  color: white;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 13px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.sidebar-brand-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.sidebar-brand-sub {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.sidebar-section {
  font-size: 11px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 10px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: hsl(var(--foreground));
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: hsl(var(--accent)); }
.nav-item.active {
  background: hsl(var(--accent-h) var(--accent-s) var(--accent-l) / 0.1);
  color: hsl(var(--accent-h) var(--accent-s) calc(var(--accent-l) - 10%));
}
.nav-item .icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-item.active .icon { opacity: 1; }
.nav-item-tail {
  margin-left: auto;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}

/* User badge in sidebar footer */
.sidebar-user {
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-text { min-width: 0; flex: 1; }
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main content */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(0 0% 100% / 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-title { font-weight: 600; font-size: 15px; }
.topbar-crumb { color: hsl(var(--muted-foreground)); font-size: 13px; }
.topbar-spacer { flex: 1; }

.content { padding: 28px; max-width: 1400px; width: 100%; }
.content h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; letter-spacing: -0.015em; }
.content .lede { color: hsl(var(--muted-foreground)); margin: 0 0 24px; font-size: 14px; }

/* Card */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 18px 20px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
.card-desc { font-size: 13px; color: hsl(var(--muted-foreground)); margin: 2px 0 0; }
.card-body { padding: 0 20px 20px; }
.card-body.flush { padding: 0; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  color: white;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease;
}
.btn:hover { background: hsl(var(--accent-h) var(--accent-s) calc(var(--accent-l) - 6%)); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}
.btn.secondary:hover { background: hsl(var(--accent)); }
.btn.outline {
  background: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}
.btn.outline:hover { background: hsl(var(--accent)); }
.btn.ghost { background: transparent; color: hsl(var(--foreground)); }
.btn.ghost:hover { background: hsl(var(--accent)); }
.btn.destructive {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}
.btn.destructive:hover { background: hsl(0 72% 44%); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 5px; }
.btn.lg { height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn .icon { width: 14px; height: 14px; }

/* Input */
.input, .select, .textarea {
  display: inline-flex;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid hsl(var(--input));
  border-radius: 6px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 13.5px;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.textarea { padding: 8px 12px; height: auto; min-height: 70px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  box-shadow: 0 0 0 3px hsl(var(--accent-h) var(--accent-s) var(--accent-l) / 0.15);
}
.input::placeholder { color: hsl(var(--muted-foreground)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; color: hsl(var(--foreground)); }
.field-help { font-size: 12px; color: hsl(var(--muted-foreground)); }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.neutral { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border-color: hsl(var(--border)); }
.badge.success { background: hsl(152 50% 94%); color: hsl(152 60% 26%); border-color: hsl(152 35% 80%); }
.badge.warning { background: hsl(38 95% 94%); color: hsl(28 80% 32%); border-color: hsl(38 80% 80%); }
.badge.destructive { background: hsl(0 80% 96%); color: hsl(0 72% 38%); border-color: hsl(0 60% 86%); }
.badge.accent { background: hsl(var(--accent-h) var(--accent-s) 95%); color: hsl(var(--accent-h) var(--accent-s) 30%); border-color: hsl(var(--accent-h) var(--accent-s) 85%); }
.badge.dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Table */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  color: hsl(var(--muted-foreground));
  padding: 10px 16px;
  background: hsl(220 22% 98%);
  border-bottom: 1px solid hsl(var(--border));
  white-space: nowrap;
}
.table td {
  padding: 10px 16px;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: middle;
  height: var(--row-height);
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 80ms; }
.table tbody tr:hover { background: hsl(var(--accent) / 0.5); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; }
.table .code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: hsl(var(--muted-foreground)); }

/* Tabs */
.tabs {
  display: inline-flex;
  padding: 3px;
  background: hsl(var(--muted));
  border-radius: 7px;
  gap: 2px;
}
.tab {
  padding: 6px 14px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
  transition: background 120ms, color 120ms;
}
.tab.active {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tab:hover:not(.active) { color: hsl(var(--foreground)); }

/* Stat / KPI */
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat {
  padding: 18px 20px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}
.stat-label {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-sub {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 6px;
}
.stat-delta { font-size: 12px; color: hsl(var(--muted-foreground)); margin-top: 4px; }
.stat-delta.up { color: hsl(var(--success)); }
.stat-delta.down { color: hsl(var(--destructive)); }

/* Avatar */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  background: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

/* Dialog */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 25, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade-in 150ms ease;
}
.dialog {
  background: hsl(var(--card));
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 18px 60px rgba(0,0,0,0.18);
  animation: pop-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dialog-header { padding: 22px 24px 14px; }
.dialog-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
.dialog-desc { font-size: 13.5px; color: hsl(var(--muted-foreground)); margin: 0; }
.dialog-body { padding: 6px 24px 18px; }
.dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: hsl(220 22% 98%);
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Toast */
.toast-stack {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: hsl(220 18% 14%);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  animation: toast-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast.success { background: hsl(152 60% 26%); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Layout helpers */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.muted { color: hsl(var(--muted-foreground)); }
.text-sm { font-size: 12.5px; } .text-lg { font-size: 16px; }
.flex-1 { flex: 1; }
.right { text-align: right; }

/* Progress bar */
.progress {
  width: 100%;
  height: 6px;
  background: hsl(var(--muted));
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  transition: width 240ms ease;
}
.progress-bar.success { background: hsl(var(--success)); }
.progress-bar.warning { background: hsl(var(--warning)); }
.progress-bar.destructive { background: hsl(var(--destructive)); }

/* Density variants */
.density-compact { --row-height: 32px; --card-padding: 16px; }
.density-compact .table td { padding: 6px 14px; }
.density-compact .table th { padding: 6px 14px; }
.density-compact .card-header { padding: 14px 16px 10px; }
.density-compact .card-body { padding: 0 16px 16px; }
.density-compact .stat { padding: 14px 16px; }

.density-spacious { --row-height: 52px; --card-padding: 24px; }
.density-spacious .table td { padding: 14px 20px; }
.density-spacious .table th { padding: 12px 20px; }
.density-spacious .card-header { padding: 22px 24px 16px; }
.density-spacious .card-body { padding: 0 24px 24px; }
.density-spacious .stat { padding: 22px 24px; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(220 10% 80%); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: hsl(220 10% 65%); border: 2px solid transparent; background-clip: content-box; }

/* ── Akuntansi-specific ─────────────────────────────────────────────────── */

/* Period selector */
.period-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 12px;
  background: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: hsl(var(--foreground));
  cursor: pointer;
  height: 32px;
}
.period-selector:hover { background: hsl(var(--accent)); }
.period-selector .icon { color: hsl(var(--muted-foreground)); width: 14px; height: 14px; }

/* Composition bar (stacked horizontal bar for revenue/expense breakdowns) */
.composition-bar {
  display: flex;
  height: 8px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: hsl(var(--muted));
}
.composition-bar-segment { height: 100%; transition: width 240ms ease; }

/* Cashflow chart (simple svg-friendly container) */
.cashflow-chart {
  width: 100%;
  height: 220px;
  display: block;
}

/* Account / journal row helpers */
.acct-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  letter-spacing: -0.01em;
  display: inline-block;
  min-width: 56px;
  margin-right: 10px;
}
.acct-name { font-weight: 500; }

/* Balance sheet sectioning inside a card-body */
.balance-section {
  border-top: 1px solid hsl(var(--border));
}
.balance-section:first-child { border-top: none; }
.balance-section-header,
.balance-section-title {
  padding: 12px 20px 8px;
  background: hsl(220 22% 98%);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.balance-row {
  display: grid;
  grid-template-columns: 1fr 140px 140px;
  gap: 16px;
  align-items: baseline;
  padding: 7px 20px;
  font-size: 13.5px;
  border-top: 1px dashed hsl(var(--border));
}
.balance-row:first-of-type { border-top: none; }
.balance-row-label { min-width: 0; }
.balance-row-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.balance-row-value.muted { color: hsl(var(--muted-foreground)); }
.balance-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.balance-subtotal {
  display: grid;
  grid-template-columns: 1fr 140px 140px;
  gap: 16px;
  padding: 10px 20px;
  background: hsl(220 22% 97%);
  border-top: 1px solid hsl(var(--border));
  font-weight: 600;
  font-size: 13.5px;
}
.balance-subtotal .num { text-align: right; font-variant-numeric: tabular-nums; }
.balance-grand {
  display: grid;
  grid-template-columns: 1fr 140px 140px;
  gap: 16px;
  padding: 14px 20px;
  background: hsl(var(--accent-h) var(--accent-s) 96%);
  border-top: 2px solid hsl(var(--accent-h) var(--accent-s) 80%);
  font-weight: 700;
  font-size: 14px;
}
.balance-grand .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Two-column report layout (Neraca = aset / liabilitas+ekuitas) */
.report-cols { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .report-cols { grid-template-columns: 1fr; } }

/* Hairline divider */
.hairline { height: 1px; background: hsl(var(--border)); margin: 12px 0; }

/* Status pill (alias) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
}

/* Empty / placeholder */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: 13.5px;
}

/* Command palette */
.cmdk-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,18,25,0.35);
  backdrop-filter: blur(4px);
  z-index: 110;
  display: grid; place-items: start center;
  padding-top: 12vh;
  animation: fade-in 120ms ease;
}
.cmdk {
  width: 100%; max-width: 560px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.18);
  overflow: hidden;
  animation: pop-in 160ms cubic-bezier(0.2,0.8,0.2,1);
}
.cmdk-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid hsl(var(--border));
}
.cmdk-input-wrap .icon { color: hsl(var(--muted-foreground)); }
.cmdk-input {
  border: none; outline: none; background: transparent;
  width: 100%; font-size: 14px; color: hsl(var(--foreground));
}
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.cmdk-section {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: hsl(var(--muted-foreground));
  padding: 10px 10px 4px;
}
.cmdk-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 13.5px; color: hsl(var(--foreground));
  cursor: pointer;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
}
.cmdk-item:hover, .cmdk-item.active { background: hsl(var(--accent)); }
.cmdk-item .icon { color: hsl(var(--muted-foreground)); }
.cmdk-item-tail { margin-left: auto; font-size: 11px; color: hsl(var(--muted-foreground)); }

/* ── POS-specific styles ──────────────────────────────────────────────────── */

/* Kasir terminal layout: left = product picker, right = cart */
.pos-shell {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 14px;
  min-height: calc(100vh - 140px);
}
.pos-search {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  margin-bottom: 12px;
}
.pos-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: hsl(var(--foreground));
}
.pos-cat-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.pos-cat-tab {
  padding: 6px 12px; border-radius: 999px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all 120ms ease;
}
.pos-cat-tab.active {
  background: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  color: white; border-color: transparent;
}
.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.pos-product {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: all 120ms ease;
  text-align: left;
  font-family: inherit;
}
.pos-product:hover {
  border-color: hsl(var(--accent-h) var(--accent-s) 60%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,18,25,0.06);
}
.pos-product-thumb {
  aspect-ratio: 1;
  background: hsl(220 22% 96%);
  border-radius: 6px;
  margin-bottom: 8px;
  display: grid; place-items: center;
  font-size: 28px; font-weight: 700;
  color: hsl(var(--muted-foreground));
}
.pos-product-name { font-size: 12.5px; font-weight: 500; line-height: 1.3; min-height: 32px; }
.pos-product-price { font-size: 13px; font-weight: 700; margin-top: 4px; }
.pos-product-stock { font-size: 10.5px; color: hsl(var(--muted-foreground)); margin-top: 2px; }
.pos-product-stock.low { color: hsl(var(--destructive)); }

.pos-cart {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.pos-cart-header {
  padding: 12px 14px;
  border-bottom: 1px solid hsl(var(--border));
  display: flex; justify-content: space-between; align-items: center;
}
.pos-cart-items { flex: 1; overflow-y: auto; padding: 8px; }
.pos-cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px;
  border-radius: 6px;
}
.pos-cart-item:hover { background: hsl(220 22% 97%); }
.pos-cart-item-name { font-size: 13px; font-weight: 500; }
.pos-cart-item-price { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.pos-cart-item-qty {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: hsl(var(--muted-foreground));
}
.pos-qty-btn {
  width: 22px; height: 22px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  border-radius: 4px;
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 14px; line-height: 1;
}
.pos-qty-btn:hover { background: hsl(220 22% 95%); }
.pos-cart-summary {
  border-top: 1px solid hsl(var(--border));
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 6px;
  background: hsl(220 22% 98%);
}
.pos-cart-row { display: flex; justify-content: space-between; font-size: 13px; }
.pos-cart-row.total {
  font-size: 17px; font-weight: 700;
  padding-top: 8px; margin-top: 4px;
  border-top: 1px dashed hsl(var(--border));
}
.pos-cart-actions {
  padding: 12px 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  border-top: 1px solid hsl(var(--border));
}
.pos-tender-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.pos-tender {
  padding: 14px 12px;
  border: 1.5px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--card));
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.pos-tender:hover { border-color: hsl(var(--accent-h) var(--accent-s) 60%); }
.pos-tender.active {
  border-color: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  background: hsl(var(--accent-h) var(--accent-s) 96%);
}
.pos-tender-label { font-size: 12.5px; font-weight: 600; }

/* Receipt preview */
.receipt {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  background: white;
  padding: 18px;
  border: 1px dashed hsl(var(--border));
  border-radius: 6px;
  white-space: pre-wrap;
  line-height: 1.55;
}

/* Heatmap (jam ramai) */
.heatmap {
  display: grid;
  grid-template-columns: 36px repeat(14, 1fr);
  gap: 2px;
  font-size: 10.5px;
}
.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: hsl(220 22% 95%);
  display: grid; place-items: center;
  font-size: 9.5px;
  color: white;
  font-weight: 600;
}
.heatmap-row-label, .heatmap-col-label {
  font-size: 10px;
  color: hsl(var(--muted-foreground));
  text-align: center;
  display: grid; place-items: center;
}

/* Leaderboard rows */
.leaderboard-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid hsl(var(--border));
  font-size: 13px;
}
.leaderboard-row:first-of-type { border-top: none; }
.leaderboard-rank {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: hsl(220 22% 95%);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  color: hsl(var(--muted-foreground));
}
.leaderboard-rank.gold   { background: hsl(45 90% 90%);  color: hsl(45 80% 35%); }
.leaderboard-rank.silver { background: hsl(220 15% 88%); color: hsl(220 15% 35%); }
.leaderboard-rank.bronze { background: hsl(25 70% 90%);  color: hsl(25 70% 35%); }

/* ── Layout & utility classes used across pos-toko pages ─────────────────── */

.card-pad { padding: 18px 20px; }
body.density-compact  .card-pad { padding: 14px 16px; }
body.density-spacious .card-pad { padding: 22px 24px; }

.stack-6 { display: flex; flex-direction: column; gap: 18px; }
body.density-compact  .stack-6 { gap: 12px; }
body.density-spacious .stack-6 { gap: 24px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.gap-1 { gap: 6px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 14px; }
.mb-6 { margin-bottom: 22px; }

.row.between { justify-content: space-between; }

.table.compact th, .table.compact td { padding: 7px 10px; font-size: 12.5px; }
.table tfoot td { padding: 10px 12px; border-top: 1px solid hsl(var(--border)); background: hsl(var(--muted) / 0.4); }

.badge.dot::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: currentColor; margin-right: 4px; vertical-align: 1px; opacity: 0.85;
}

/* KPI card decorations */
.kpi-icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: hsl(var(--accent-h) var(--accent-s) 95%);
  color: hsl(var(--accent-h) var(--accent-s) 35%);
  display: grid; place-items: center;
}
.kpi-icon[data-tone="warn"]   { background: hsl(38 95% 92%); color: hsl(35 80% 38%); }
.kpi-icon[data-tone="danger"] { background: hsl(0 80% 94%);  color: hsl(0 70% 42%); }
.kpi-icon[data-tone="success"]{ background: hsl(152 60% 92%); color: hsl(152 60% 32%); }

.kpi-progress {
  margin-top: 10px; height: 4px; border-radius: 999px;
  background: hsl(var(--muted)); overflow: hidden;
}
.kpi-progress > div {
  height: 100%; border-radius: 999px;
  background: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  transition: width 200ms ease;
}

/* Generic horizontal bar */
.bar-h { height: 6px; border-radius: 999px; background: hsl(var(--muted)); overflow: hidden; }
.bar-h > div { height: 100%; background: hsl(var(--accent-h) var(--accent-s) var(--accent-l)); border-radius: 999px; }

/* Info cell (drawer + summary panels) */
.info-cell {
  padding: 10px 12px; background: hsl(var(--muted) / 0.4);
  border: 1px solid hsl(var(--border)); border-radius: 6px;
}
.info-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: hsl(var(--muted-foreground)); font-weight: 600; }
.info-value { font-size: 16px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Leaderboard wrapper + bar */
.leaderboard { display: flex; flex-direction: column; }
.leaderboard-bar {
  height: 5px; border-radius: 999px; background: hsl(var(--muted)); overflow: hidden;
}
.leaderboard-bar > div {
  height: 100%; background: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  border-radius: 999px; transition: width 250ms ease;
}

/* Heatmap grid */
.heatmap-grid { display: grid; gap: 3px; }
.heatmap-row-label, .heatmap-col-label {
  font-size: 10px; color: hsl(var(--muted-foreground));
  display: grid; place-items: center; min-width: 20px;
}
.heatmap-cell { aspect-ratio: 1; border-radius: 3px; min-height: 18px; }
.heatmap-legend {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; font-size: 11px; color: hsl(var(--muted-foreground));
  justify-content: flex-end;
}
.heatmap-scale { display: flex; gap: 2px; }
.heatmap-scale > div { width: 16px; height: 10px; border-radius: 2px; }

/* Member grid */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.member-card {
  padding: 14px; border: 1px solid hsl(var(--border));
  border-radius: 8px; background: hsl(var(--card));
  transition: all 120ms ease;
}
.member-card:hover { border-color: hsl(var(--accent-h) var(--accent-s) 70%); transform: translateY(-1px); }

/* Slide-in drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(15,18,25,0.42);
  display: flex; justify-content: flex-end; z-index: 100;
  animation: fadeIn 120ms ease;
}
.drawer {
  width: min(540px, 92vw); height: 100%; background: hsl(var(--background));
  display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,0.18);
  animation: slideIn 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid hsl(var(--border));
}
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }

/* Receipt (POS terminal & trx detail) — JetBrains Mono */
.receipt {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px; line-height: 1.5;
  white-space: pre; color: hsl(var(--foreground));
  background: hsl(45 30% 97%);
  padding: 14px;
  border: 1px dashed hsl(var(--border));
  border-radius: 4px;
}

/* Avatar (simple) */
.avatar {
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: white;
  background: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  flex-shrink: 0;
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }

/* ── inventory-gudang specifics ────────────────────────────────────────── */

/* Compact baseline overrides (since density-compact is default expected) */
body.density-compact .table th, body.density-compact .table td { padding: 5px 8px; font-size: 11.5px; }
body.density-compact .card { padding: 12px; }
body.density-compact .nav-item { padding: 5px 9px; font-size: 12px; }
body.density-compact .topbar { padding: 8px 16px; }
body.density-compact .row { gap: 8px; }
body.density-compact .kpi { padding: 12px; }

/* SKU/barcode mono styling */
.sku-tag {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; padding: 1px 6px;
  background: hsl(215 20% 95%);
  border: 1px solid hsl(var(--border));
  border-radius: 3px;
  letter-spacing: -0.01em;
  color: hsl(215 22% 26%);
}

.barcode {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; color: hsl(var(--muted-foreground));
  letter-spacing: 0.04em;
}

/* Barcode "strip" — visual barcode-like horizontal lines */
.barcode-strip {
  display: flex; align-items: flex-end; gap: 1px;
  height: 28px; padding: 4px 6px;
  background: white; border: 1px solid hsl(var(--border));
  border-radius: 3px;
}
.barcode-strip > span { display: block; background: hsl(245 25% 20%); width: 2px; height: 100%; }
.barcode-strip > span.thin   { width: 1px; }
.barcode-strip > span.thick  { width: 3px; }
.barcode-strip > span.gap    { background: transparent; width: 1px; }
.barcode-strip > span.short  { height: 80%; align-self: flex-start; }

/* Bin location badge */
.bin-loc {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; padding: 2px 6px;
  background: hsl(var(--accent-h) var(--accent-s) 95%);
  color: hsl(var(--accent-h) var(--accent-s) 32%);
  border-radius: 3px;
  font-weight: 600; letter-spacing: -0.01em;
}

/* Floor map (warehouse SVG) */
.floor-map {
  background: hsl(215 22% 98%);
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  padding: 12px;
}
.floor-map svg { display: block; width: 100%; height: auto; }
.floor-zone rect {
  fill: hsl(var(--accent-h) var(--accent-s) 92%);
  stroke: hsl(var(--accent-h) var(--accent-s) 60%);
  stroke-width: 0.4;
  transition: all 150ms ease;
  cursor: pointer;
}
.floor-zone:hover rect { stroke-width: 1; filter: brightness(0.95); }
.floor-zone.staging rect { fill: hsl(38 60% 92%); stroke: hsl(35 60% 60%); stroke-dasharray: 1.5 1; }
.floor-zone-label {
  font-family: 'Manrope', sans-serif;
  font-size: 2px; font-weight: 600;
  fill: hsl(215 22% 22%); pointer-events: none;
}
.floor-zone-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 4px; font-weight: 700;
  fill: hsl(var(--accent-h) var(--accent-s) 28%);
  pointer-events: none;
}
.floor-zone-occ {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2px; fill: hsl(215 14% 38%);
  pointer-events: none;
}
.floor-occ-bar { fill: hsl(var(--muted)); }
.floor-occ-fill {
  fill: hsl(var(--accent-h) var(--accent-s) 55%);
  transition: width 250ms ease;
}
.floor-occ-fill.warn   { fill: hsl(38 90% 50%); }
.floor-occ-fill.danger { fill: hsl(0 70% 52%); }

.floor-legend {
  display: flex; gap: 16px; font-size: 11px;
  color: hsl(var(--muted-foreground)); margin-top: 10px;
  justify-content: flex-end; flex-wrap: wrap;
}
.floor-legend-swatch {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; margin-right: 4px; vertical-align: middle;
}

/* Inbound / outbound flow chart bars */
.flow-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 100px; padding: 6px 0;
  border-bottom: 1px solid hsl(var(--border));
}
.flow-bar { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.flow-bar > .in  { background: hsl(var(--accent-h) var(--accent-s) 55%); border-radius: 1px 1px 0 0; }
.flow-bar > .out { background: hsl(var(--accent-h) var(--accent-s) 75%); border-radius: 1px 1px 0 0; }
.flow-bar.today > .in  { background: hsl(var(--accent-h) var(--accent-s) 38%); }
.flow-bar.today > .out { background: hsl(var(--accent-h) var(--accent-s) 60%); }

/* Status pill row tones for inventory */
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 999px; margin-right: 5px; vertical-align: 1px; }

/* Activity / timeline */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid; grid-template-columns: 60px 12px 1fr; align-items: flex-start;
  gap: 10px; padding: 10px 0; border-bottom: 1px solid hsl(var(--border));
}
.timeline-item:last-child { border-bottom: none; }
.timeline-time {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: hsl(var(--muted-foreground)); padding-top: 1px;
}
.timeline-marker {
  width: 8px; height: 8px; border-radius: 999px;
  background: hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  margin-top: 5px; flex-shrink: 0; justify-self: center;
}
.timeline-marker.urgent { background: hsl(0 72% 50%); animation: pulse 1.6s infinite; }
.timeline-text { font-size: 12px; line-height: 1.4; }
.timeline-who { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: 2px; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 hsl(0 72% 50% / 0.5); }
  50%      { box-shadow: 0 0 0 5px hsl(0 72% 50% / 0); }
}

/* Stock level cell (in tables) */
.stock-cell {
  display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.stock-bar {
  position: relative; width: 60px; height: 4px;
  background: hsl(var(--muted)); border-radius: 999px; overflow: hidden;
}
.stock-bar > div { height: 100%; border-radius: 999px; }
.stock-bar > .normal { background: hsl(var(--accent-h) var(--accent-s) 55%); }
.stock-bar > .warn   { background: hsl(38 90% 50%); }
.stock-bar > .danger { background: hsl(0 72% 52%); }

/* Master SKU grid (alternative compact view) */
.sku-card {
  padding: 10px 12px; border: 1px solid hsl(var(--border));
  border-radius: 6px; background: hsl(var(--card));
  display: flex; flex-direction: column; gap: 6px;
  transition: all 120ms ease;
}
.sku-card:hover {
  border-color: hsl(var(--accent-h) var(--accent-s) 65%);
  box-shadow: 0 1px 3px hsl(var(--accent-h) var(--accent-s) 50% / 0.06);
}

/* Document/voucher header strip (for GR/DO/TR detail) */
.doc-header {
  background: linear-gradient(to right, hsl(var(--accent-h) var(--accent-s) 96%), hsl(var(--accent-h) var(--accent-s) 99%));
  border-left: 3px solid hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.doc-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 600;
  color: hsl(var(--accent-h) var(--accent-s) 28%);
  letter-spacing: -0.01em;
}

/* Smaller utility: numeric monospaced cell */
.num { font-variant-numeric: tabular-nums; text-align: right; }
.num-mono {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Section divider line */
.divider-x { height: 1px; background: hsl(var(--border)); margin: 12px 0; }

/* Page header for inventory (override card padding for tighter feel) */
.inv-page-header {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex; align-items: flex-end; gap: 16px;
}

/* Filter row */
.filter-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 12px; background: hsl(var(--card));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius);
}
.filter-bar input, .filter-bar select {
  height: 30px; padding: 0 8px;
  border: 1px solid hsl(var(--border)); border-radius: 4px;
  background: hsl(var(--background));
  font-size: 12px;
  outline: none;
}
.filter-bar input:focus, .filter-bar select:focus {
  border-color: hsl(var(--accent-h) var(--accent-s) 60%);
  box-shadow: 0 0 0 2px hsl(var(--accent-h) var(--accent-s) 60% / 0.15);
}
.filter-bar .filter-search { flex: 1; min-width: 200px; }

/* Aging color band for stock pages */
.age-band {
  display: inline-block; padding: 1px 6px;
  border-radius: 3px; font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}
.age-band.fresh { background: hsl(152 50% 92%); color: hsl(152 50% 28%); }
.age-band.warn  { background: hsl(38 92% 92%);  color: hsl(35 80% 32%); }
.age-band.stale { background: hsl(0 72% 94%);   color: hsl(0 70% 38%); }

/* HR/payroll signature utilities */
.grid { display: grid; gap: 14px; }
.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)); }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.text-sm { font-size: 12.5px; }
.muted { color: hsl(var(--muted-foreground)); }
.num { font-variant-numeric: tabular-nums; }

.emp-avatar {
  width: 38px; height: 38px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
  color: hsl(var(--accent-h) var(--accent-s) 24%);
  background: linear-gradient(135deg, hsl(var(--accent-h) var(--accent-s) 94%), hsl(var(--accent-h) var(--accent-s) 84%));
  border: 1px solid hsl(var(--accent-h) var(--accent-s) 78%);
  box-shadow: inset 0 1px 0 hsl(0 0% 100% / 0.55);
}
.emp-avatar.sm { width: 28px; height: 28px; border-radius: 10px; font-size: 10px; }
.emp-avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 19px; }
.emp-stack { display: flex; align-items: center; }
.emp-stack .emp-avatar { margin-left: -8px; box-shadow: 0 0 0 2px hsl(var(--card)); }
.emp-stack .emp-avatar:first-child { margin-left: 0; }

.pill-soft {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid hsl(var(--border));
  font-size: 11px; font-weight: 650; line-height: 1.2;
}
.pill-soft.indigo { background: hsl(var(--accent-h) var(--accent-s) 95%); color: hsl(var(--accent-h) var(--accent-s) 34%); border-color: hsl(var(--accent-h) var(--accent-s) 84%); }
.pill-soft.green  { background: hsl(152 58% 95%); color: hsl(152 58% 30%); border-color: hsl(152 45% 82%); }
.pill-soft.amber  { background: hsl(38 90% 95%); color: hsl(38 84% 32%); border-color: hsl(38 80% 80%); }
.pill-soft.rose   { background: hsl(0 75% 96%); color: hsl(0 70% 40%); border-color: hsl(0 70% 86%); }
.pill-soft.gray   { background: hsl(245 12% 96%); color: hsl(245 10% 38%); border-color: hsl(245 12% 88%); }

.payroll-hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; align-items: stretch;
  margin-bottom: 18px;
}
.payroll-run-card {
  padding: 20px 22px;
  border: 1px solid hsl(var(--accent-h) var(--accent-s) 82%);
  background:
    radial-gradient(circle at top right, hsl(var(--accent-h) var(--accent-s) 90% / 0.9), transparent 34%),
    linear-gradient(135deg, hsl(var(--accent-h) var(--accent-s) 98%), hsl(var(--card)) 58%);
}
.payroll-run-total {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 34px; font-weight: 800; letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.payroll-stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.payroll-step {
  position: relative; padding: 10px 10px 10px 12px; border-radius: 10px;
  border: 1px solid hsl(var(--border)); background: hsl(var(--card)); font-size: 11.5px;
}
.payroll-step.done { background: hsl(152 60% 96%); border-color: hsl(152 45% 84%); color: hsl(152 58% 26%); }
.payroll-step.active { background: hsl(var(--accent-h) var(--accent-s) 95%); border-color: hsl(var(--accent-h) var(--accent-s) 78%); color: hsl(var(--accent-h) var(--accent-s) 30%); }
.payroll-step-title { font-weight: 750; margin-bottom: 2px; }
.payroll-step-sub { color: hsl(var(--muted-foreground)); font-size: 10.5px; }

.payslip-doc {
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: 12px; padding: 22px; position: relative;
  box-shadow: 0 18px 50px hsl(245 35% 20% / 0.09);
}
.payslip-doc::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, hsl(var(--accent-h) var(--accent-s) var(--accent-l)), hsl(272 65% 63%));
}
.payslip-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid hsl(var(--border)); }
.payslip-title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.payslip-code { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; font-size: 11px; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.payslip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; }
.payslip-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--muted-foreground)); font-weight: 800; margin-bottom: 8px; }
.payslip-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed hsl(var(--border)); font-size: 12.5px; }
.payslip-line:last-child { border-bottom: none; }
.payslip-line b { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.payslip-total {
  margin-top: 16px; padding: 14px 16px; border-radius: 10px;
  background: hsl(var(--accent-h) var(--accent-s) 95%);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.payslip-total .value { font-family: 'Inter', sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: hsl(var(--accent-h) var(--accent-s) 30%); }

.attendance-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; margin-right: 7px; }
.attendance-dot.masuk { background: hsl(152 60% 45%); }
.attendance-dot.telat { background: hsl(38 90% 52%); }
.attendance-dot.cuti  { background: hsl(var(--accent-h) var(--accent-s) var(--accent-l)); }
.attendance-dot.sakit { background: hsl(199 70% 50%); }
.attendance-dot.alpha { background: hsl(0 70% 50%); }

.dept-card {
  padding: 14px; border: 1px solid hsl(var(--border)); border-radius: 12px; background: hsl(var(--card));
}
.dept-bar { height: 7px; border-radius: 999px; background: hsl(var(--muted)); overflow: hidden; margin-top: 10px; }
.dept-bar > div { height: 100%; border-radius: 999px; background: hsl(var(--accent-h) var(--accent-s) var(--accent-l)); }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline-item { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: flex-start; }
.timeline-time { font-family: 'Inter', sans-serif; font-variant-numeric: tabular-nums; font-size: 11px; color: hsl(var(--muted-foreground)); padding-top: 2px; }
.timeline-body { border-left: 2px solid hsl(var(--border)); padding: 0 0 10px 12px; font-size: 12.5px; line-height: 1.45; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid hsl(var(--border)); background: hsl(var(--muted)); }
.callout.accent { background: hsl(var(--accent-h) var(--accent-s) 96%); border-color: hsl(var(--accent-h) var(--accent-s) 84%); color: hsl(var(--accent-h) var(--accent-s) 28%); }
.callout.warn { background: hsl(38 90% 96%); border-color: hsl(38 80% 80%); color: hsl(38 80% 30%); }
.callout.danger { background: hsl(0 72% 97%); border-color: hsl(0 72% 86%); color: hsl(0 72% 40%); }

@media (max-width: 1100px) {
  .payroll-hero, .payslip-grid { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .g-2, .g-3, .g-4, .form-grid { grid-template-columns: 1fr; }
  .payroll-stepper { grid-template-columns: 1fr 1fr; }
  .payslip-doc { padding: 18px; }
}
