/* SliceHub — Backoffice HR (vanilla, spójne z Settings / mobile shell) */
:root {
  --hr-bg: #0c0a09;
  --hr-surface: rgba(255, 255, 255, 0.04);
  --hr-border: rgba(255, 255, 255, 0.1);
  --hr-text: #e7e5e4;
  --hr-muted: #a8a29e;
  --hr-accent: #22c55e;
  --hr-danger: #f87171;
  --hr-font: "Inter", system-ui, sans-serif;
}

.hidden { display: none !important; }

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--hr-font);
  background: var(--hr-bg);
  color: var(--hr-text);
  -webkit-font-smoothing: antialiased;
}

.hr-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--hr-border);
  background: rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 40;
}
.hr-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #22c55e, #15803d);
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 13px;
  color: #fff;
}
.hr-title { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.hr-sub { font-size: 0.75rem; color: var(--hr-muted); margin-left: 0.25rem; }
.hr-spacer { flex: 1; }
.hr-links a {
  color: var(--hr-muted);
  text-decoration: none;
  font-size: 0.8rem;
  margin-right: 0.75rem;
}
.hr-links a:hover { color: var(--hr-accent); }

.hr-toolbar {
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.hr-btn {
  border: 1px solid var(--hr-border);
  background: var(--hr-surface);
  color: var(--hr-text);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.hr-btn:hover { border-color: rgba(34, 197, 94, 0.45); }
.hr-btn--danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}
.hr-btn--danger:hover { border-color: rgba(248, 113, 113, 0.75); }
.hr-btn--primary {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}
.hr-banner {
  margin: 0 1.25rem 1rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid var(--hr-border);
}
.hr-banner--warn {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fcd34d;
}
.hr-banner--error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
}

.hr-main { padding: 0 1.25rem 2rem; max-width: 1200px; margin: 0 auto; }

/* Tabs */
.hr-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.75rem 1.25rem 0;
  border-bottom: 1px solid var(--hr-border);
}
.hr-tab {
  border: 1px solid transparent;
  border-bottom: none;
  background: none;
  color: var(--hr-muted);
  padding: 0.5rem 0.95rem;
  border-radius: 10px 10px 0 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.hr-tab:hover { color: var(--hr-text); }
.hr-tab.active {
  color: #86efac;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
}

/* Segmented control (period filters) */
.hr-seg {
  display: inline-flex;
  border: 1px solid var(--hr-border);
  border-radius: 10px;
  overflow: hidden;
}
.hr-seg button {
  border: none;
  background: var(--hr-surface);
  color: var(--hr-muted);
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.hr-seg button + button { border-left: 1px solid var(--hr-border); }
.hr-seg button:hover { color: var(--hr-text); }
.hr-seg button.active { background: rgba(34, 197, 94, 0.15); color: #86efac; }

.hr-period-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hr-table--num td.num, .hr-table--num th.num { text-align: right; white-space: nowrap; }
.hr-table tfoot td {
  border-top: 1px solid rgba(34, 197, 94, 0.35);
  font-weight: 700;
  background: rgba(34, 197, 94, 0.06);
}
.hr-hint { font-size: 0.75rem; color: #78716c; margin: 0.75rem 0 0; }

.hr-table-wrap {
  overflow: auto;
  border: 1px solid var(--hr-border);
  border-radius: 12px;
}
table.hr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.hr-table th, .hr-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--hr-border);
}
.hr-table th {
  color: var(--hr-muted);
  font-weight: 600;
  white-space: nowrap;
}
.hr-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.hr-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
}
.hr-tag--ok { color: #86efac; background: rgba(34, 197, 94, 0.12); }
.hr-tag--off { color: var(--hr-muted); }

.hr-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.hr-actions button {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #a8a29e;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
}
.hr-actions button:hover { color: var(--hr-text); background: rgba(255, 255, 255, 0.1); }

/* Modal */
.hr-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 100;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem;
  overflow-y: auto;
}
.hr-modal-overlay.active { display: flex; }

.hr-modal {
  width: 100%;
  max-width: 480px;
  background: #141211;
  border: 1px solid var(--hr-border);
  border-radius: 14px;
  padding: 1.25rem;
}
.hr-modal h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}
.hr-field {
  margin-bottom: 0.85rem;
}
.hr-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hr-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hr-field input, .hr-field select, .hr-field textarea {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--hr-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--hr-text);
  font-family: inherit;
  font-size: 0.88rem;
}
.hr-field textarea { min-height: 64px; resize: vertical; }
.hr-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
@media (max-width: 520px) {
  .hr-row2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  #hr-view-history .hr-main {
    grid-template-columns: 1fr !important;
  }
}
.hr-modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.hr-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  border: 1px solid var(--hr-border);
  background: #1c1917;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: none;
}
.hr-toast.visible { display: block; }
.hr-toast.ok { border-color: rgba(34, 197, 94, 0.45); color: #bbf7d0; }
.hr-toast.err { border-color: rgba(248, 113, 113, 0.45); color: #fecaca; }

/* ============================================================================
   REDESIGN — Glass cards, avatars, progress bars, drawer, visual data
   ============================================================================ */

/* Avatar with initials, role-colored */
.hr-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 1rem;
  color: #fff; flex-shrink: 0;
  letter-spacing: -0.02em;
}
.hr-avatar--waiter   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.hr-avatar--cook     { background: linear-gradient(135deg, #f97316, #c2410c); }
.hr-avatar--owner    { background: linear-gradient(135deg, #eab308, #a16207); }
.hr-avatar--driver   { background: linear-gradient(135deg, #22c55e, #15803d); }
.hr-avatar--manager  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.hr-avatar--cashier  { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.hr-avatar--cleaner  { background: linear-gradient(135deg, #64748b, #334155); }
.hr-avatar--runner   { background: linear-gradient(135deg, #ec4899, #be185d); }
.hr-avatar--shift_lead { background: linear-gradient(135deg, #f59e0b, #b45309); }
.hr-avatar--team     { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.hr-avatar--lg { width: 56px; height: 56px; font-size: 1.2rem; }

/* Employee card grid */
.hr-emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}
.hr-emp-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.hr-emp-card:hover {
  border-color: rgba(34,197,94,0.35);
  transform: translateY(-2px);
}
.hr-emp-card-head {
  display: flex; align-items: center; gap: 0.65rem;
}
.hr-emp-card-name {
  font-weight: 700; font-size: 0.92rem;
  line-height: 1.2;
}
.hr-emp-card-role {
  font-size: 0.75rem; color: var(--hr-muted);
  display: flex; align-items: center; gap: 0.3rem;
}
.hr-emp-card-stats {
  display: flex; flex-direction: column; gap: 0.35rem;
}
.hr-emp-card-hrs {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.78rem; color: var(--hr-muted);
}
.hr-emp-card-hrs strong {
  font-size: 1.05rem; color: var(--hr-text);
  font-variant-numeric: tabular-nums;
}
.hr-emp-card-earn {
  font-size: 0.85rem; font-weight: 600;
  color: #86efac; font-variant-numeric: tabular-nums;
}
.hr-emp-card-status {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; color: var(--hr-muted);
}

/* Progress bar */
.hr-progress {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.hr-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.3s;
}
.hr-progress-fill--over {
  background: linear-gradient(90deg, #22c55e, #eab308);
}
.hr-progress-fill--low {
  background: linear-gradient(90deg, #78716c, #a8a29e);
}

/* Status dot */
.hr-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.hr-dot--active    { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.6); }
.hr-dot--suspended { background: #eab308; }
.hr-dot--terminated{ background: #ef4444; }
.hr-dot--on_leave  { background: #3b82f6; }

/* Stat cards (mini) */
.hr-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
.hr-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
}
.hr-stat-value {
  font-size: 1.3rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.hr-stat-label {
  font-size: 0.68rem; color: var(--hr-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

/* Glass card wrapper */
.hr-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
}
.hr-card-title {
  margin: 0 0 0.85rem;
  font-size: 0.92rem; font-weight: 600;
  display: flex; align-items: center; gap: 0.5rem;
}
.hr-card-title i { color: #60a5fa; font-size: 0.85rem; }

/* Slide-out drawer */
.hr-drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 85;
}
.hr-drawer-overlay.open { display: block; }
.hr-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(460px, 100%);
  height: 100vh;
  background: #141211;
  border-left: 1px solid rgba(255,255,255,0.08);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 90;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.hr-drawer.open { transform: translateX(0); }
.hr-drawer-head {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: flex-start; gap: 0.85rem;
}
.hr-drawer-close {
  margin-left: auto;
  background: none; border: none;
  color: var(--hr-muted); font-size: 1.2rem;
  cursor: pointer; padding: 0.25rem;
}
.hr-drawer-close:hover { color: var(--hr-text); }
.hr-drawer-body {
  padding: 1rem 1.25rem 2rem;
  display: flex; flex-direction: column; gap: 1rem;
  flex: 1;
}
.hr-drawer-name {
  font-weight: 700; font-size: 1.05rem;
  line-height: 1.2;
}
.hr-drawer-meta {
  font-size: 0.8rem; color: var(--hr-muted);
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 0.2rem;
}
.hr-drawer-actions {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 0.65rem;
}
.hr-drawer-actions button {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--hr-text);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem; font-weight: 600;
  cursor: pointer;
}
.hr-drawer-actions button:hover {
  border-color: rgba(34,197,94,0.35);
  color: #86efac;
}

/* Sub-tabs in drawer */
.hr-subtabs {
  display: flex; gap: 0.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 0.5rem;
}
.hr-subtab {
  border: none; background: none;
  color: var(--hr-muted);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font: inherit; font-size: 0.78rem; font-weight: 600;
  cursor: pointer;
}
.hr-subtab:hover { color: var(--hr-text); }
.hr-subtab.active {
  color: #86efac;
  background: rgba(34,197,94,0.1);
}
.hr-subpane { display: none; }
.hr-subpane.active { display: block; }

/* Ledger entries with bars */
.hr-ledger-list {
  display: flex; flex-direction: column; gap: 0.35rem;
}
.hr-ledger-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  font-size: 0.78rem;
}
.hr-ledger-amount {
  font-weight: 700; font-variant-numeric: tabular-nums;
  text-align: right;
}
.hr-ledger-amount--pos { color: #86efac; }
.hr-ledger-amount--neg { color: #fca5a5; }
.hr-ledger-bar {
  height: 16px; border-radius: 3px;
  min-width: 3px; max-width: 100%;
}
.hr-ledger-bar--pos { background: rgba(34,197,94,0.25); }
.hr-ledger-bar--neg { background: rgba(239,68,68,0.25); }
.hr-ledger-type {
  font-size: 0.72rem; color: var(--hr-muted);
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.hr-ledger-saldo {
  margin-top: 0.5rem; padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  font-weight: 700; font-size: 0.9rem;
  display: flex; justify-content: space-between;
  font-variant-numeric: tabular-nums;
}

/* Session timeline */
.hr-session-list {
  display: flex; flex-direction: column; gap: 0.3rem;
}
.hr-session-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  font-size: 0.75rem;
}
.hr-session-date {
  color: var(--hr-muted); font-variant-numeric: tabular-nums;
}
.hr-session-bar {
  height: 20px; border-radius: 5px;
  background: linear-gradient(90deg, rgba(34,197,94,0.15), rgba(34,197,94,0.35));
  display: flex; align-items: center;
  padding: 0 0.5rem;
  font-size: 0.68rem; color: #bbf7d0;
  white-space: nowrap;
}
.hr-session-bar--edited {
  background: linear-gradient(90deg, rgba(234,179,8,0.15), rgba(234,179,8,0.35));
  color: #fde68a;
}
.hr-session-hrs {
  font-weight: 600; font-variant-numeric: tabular-nums;
  text-align: right;
}
.hr-session-edit-btn {
  border: none; background: rgba(255,255,255,0.06);
  color: var(--hr-muted);
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  font-size: 0.68rem; cursor: pointer;
}
.hr-session-edit-btn:hover { color: var(--hr-text); background: rgba(255,255,255,0.1); }

/* Expandable payroll row */
.hr-pr-expand {
  background: rgba(0,0,0,0.2);
}
.hr-pr-expand td {
  padding: 0.5rem 0.65rem 0.65rem;
}
.hr-pr-expand-inner {
  display: flex; flex-direction: column; gap: 0.25rem;
}
.hr-pr-expand-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

/* Search input */
.hr-search {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  color: var(--hr-text);
  font-size: 0.85rem; font-family: inherit;
  min-width: 180px;
}
.hr-search:focus {
  outline: none;
  border-color: rgba(34,197,94,0.35);
}

/* ── Live counter (kto na zmianie) ── */

/* ── Drawer month picker ── */
.hr-dr-month-picker {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.4rem 0; margin-bottom: 0.2rem;
}
.hr-dr-month-btn {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #d6d3d1; cursor: pointer; transition: all 0.15s ease;
  font-size: 0.75rem;
}
.hr-dr-month-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2);
}
.hr-dr-month-btn:disabled {
  opacity: 0.3; cursor: default;
}
.hr-dr-month-label {
  font-size: 0.82rem; font-weight: 600; color: #d6d3d1;
  min-width: 160px; text-align: center;
}

.hr-live-counter {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; font-weight: 600; color: #22c55e;
  padding: 0.25rem 0.6rem; border-radius: 999px;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2);
}
.hr-live-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  animation: hr-pulse 1.5s ease-in-out infinite;
}
@keyframes hr-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}
.hr-live-dot {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 10px; height: 10px; border-radius: 50%; background: #22c55e;
  animation: hr-pulse 1.5s ease-in-out infinite;
  z-index: 1;
}

/* ── Role filter ── */
.hr-seg--roles {
  margin: 0 0 0.75rem 0;
  flex-wrap: wrap;
}
.hr-seg--roles button {
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
}

/* ── Skeleton shimmer ── */
.hr-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.hr-skeleton-card {
  height: 120px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: hr-shimmer 1.5s infinite;
  border: 1px solid rgba(255,255,255,0.04);
}
.hr-skeleton-row {
  height: 18px; margin: 6px 0; border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: hr-shimmer 1.5s infinite;
}
@keyframes hr-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Employee details in drawer ── */
.hr-dr-details {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 0.5rem 0 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0.5rem;
}
.hr-dr-detail-row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; color: #d6d3d1;
}
.hr-dr-detail-row i {
  width: 16px; text-align: center; color: #78716c; font-size: 0.75rem;
}
.hr-dr-detail-row .hr-dr-detail-code {
  font-family: 'SF Mono', 'Cascadia Code', monospace; font-size: 0.72rem;
  color: #a8a29e;
}
.hr-dr-detail-notes {
  font-size: 0.75rem; color: #a8a29e; font-style: italic;
  padding: 0.25rem 0.5rem; border-left: 2px solid rgba(34,197,94,0.3);
  margin-left: 0.25rem;
}

/* ── Advance stepper ── */
.hr-stepper {
  display: flex; align-items: center; gap: 0;
  margin: 0.25rem 0 0.5rem 0;
  padding: 0 0.25rem;
}
.hr-step {
  display: flex; align-items: center; gap: 0;
  flex: 1;
}
.hr-step-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}
.hr-step-dot--done {
  background: #22c55e; border-color: #22c55e;
}
.hr-step-dot--active {
  background: rgba(34,197,94,0.3); border-color: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.4);
}
.hr-step-dot--rejected,
.hr-step-dot--void {
  background: #ef4444; border-color: #ef4444;
}
.hr-step-line {
  flex: 1; height: 2px; background: rgba(255,255,255,0.08);
  margin: 0 2px;
}
.hr-step-line--done { background: #22c55e; }
.hr-step-label {
  font-size: 0.62rem; color: #78716c; text-transform: uppercase;
  letter-spacing: 0.03em; margin-top: 2px;
}
.hr-step-label--active { color: #22c55e; }
.hr-step-label--done { color: #22c55e; }

/* ── Period picker ── */
.hr-period-picker {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #d6d3d1;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem; font-weight: 600;
  padding: 0.35rem 0.6rem;
  color-scheme: dark;
  outline: none;
  cursor: pointer;
}
.hr-period-picker:focus {
  border-color: rgba(34,197,94,0.35);
}

/* ── Confirm danger modal ── */
.hr-modal--danger {
  border-color: rgba(239,68,68,0.3);
}
.hr-modal--danger h2 {
  color: #fca5a5;
}
.hr-modal--danger h2 i {
  margin-right: 0.35rem;
}

/* ── Card live dot positioning ── */
.hr-emp-card { position: relative; }

/* ── Rate timeline in drawer ── */
.hr-rate-row {
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.4rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.hr-rate-row--current {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.25);
}
.hr-rate-row-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.15rem;
}
.hr-rate-amount {
  font-size: 0.9rem; font-weight: 700; color: #d6d3d1;
}
.hr-rate-row--current .hr-rate-amount {
  color: #22c55e;
}
.hr-rate-period {
  font-size: 0.7rem; color: #78716c;
  font-family: 'SF Mono', 'Cascadia Code', monospace;
}
.hr-rate-reason {
  font-size: 0.72rem; color: #a8a29e;
}
.hr-rate-note {
  font-size: 0.72rem; color: #a8a29e; font-style: italic;
  margin-top: 0.2rem; padding-left: 0.5rem;
  border-left: 2px solid rgba(34,197,94,0.2);
}

/* ── Advance installments expand ── */
.hr-adv-row--expandable:hover {
  background: rgba(255,255,255,0.03);
}
.hr-adv-row--open .hr-adv-expand-icon {
  transform: rotate(180deg);
}
.hr-adv-expand-icon {
  transition: transform 0.2s ease;
  font-size: 0.65rem; margin-left: 0.3rem; color: #78716c;
}
.hr-adv-expand > td {
  padding: 0 !important;
  border-top: none;
}
.hr-adv-expand-inner {
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.15);
}
.hr-inst-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.78rem;
}
.hr-inst-table th {
  text-align: left; padding: 0.3rem 0.5rem;
  color: #78716c; font-weight: 600; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hr-inst-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.hr-inst-table td.num {
  font-family: 'SF Mono', 'Cascadia Code', monospace;
  text-align: right;
}
.hr-inst-status {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 600;
}
.hr-inst-status--pending {
  background: rgba(234,179,8,0.15); color: #facc15;
}
.hr-inst-status--applied {
  background: rgba(34,197,94,0.15); color: #22c55e;
}
.hr-inst-status--skipped {
  background: rgba(120,113,108,0.15); color: #a8a29e;
}
.hr-inst-status--void {
  background: rgba(239,68,68,0.15); color: #ef4444;
}
.hr-inst-repay-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 3px 10px; border-radius: 5px;
  font-size: 0.7rem; font-weight: 600;
  background: rgba(34,197,94,0.12); color: #22c55e;
  border: 1px solid rgba(34,197,94,0.3);
  cursor: pointer; transition: all 0.15s ease;
}
.hr-inst-repay-btn:hover {
  background: rgba(34,197,94,0.2);
  border-color: rgba(34,197,94,0.5);
}
.hr-inst-repay-btn:disabled {
  opacity: 0.5; cursor: default;
}

/* Responsive */
@media (max-width: 768px) {
  .hr-emp-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .hr-skeleton-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
  .hr-stat-row { grid-template-columns: 1fr; }
  .hr-drawer { width: 100%; }
  .hr-ledger-row { grid-template-columns: 60px 1fr auto; }
  .hr-seg--roles { font-size: 0.7rem; }
  .hr-seg--roles button { padding: 0.25rem 0.5rem; font-size: 0.7rem; }
  .hr-stepper { display: none; }
}
