/* HR module styles */

.hr-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.hr-toolbar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.hr-toolbar .form-control { min-width: 180px; }
.hr-toolbar .hr-year { min-width: 100px; width: 100px; }
.hr-toolbar-spacer { flex: 1; }

.hr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.hr-stat {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.hr-stat span { display: block; color: var(--muted); font-size: 12px; }
.hr-stat strong { font-size: 20px; }
.hr-stat.is-warning { border-color: #f0d18a; background: #fffaf0; }
.hr-stat.is-good strong { color: #146b43; }
.hr-stat.is-locked { border-color: #b8dccb; background: #f2fbf6; }

.hr-hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.hr-empty { padding: 32px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; background: var(--paper); }

.hr-timesheet-table .hr-time { min-width: 110px; padding: 4px 8px; min-height: 32px; }
.hr-day-sunday td { background: #f6f7f9; color: var(--muted); }
.hr-day-holiday td { background: #fff6ec; }
.hr-day.is-future td { opacity: 0.6; }
.hr-row-actions { white-space: nowrap; text-align: right; }
.hr-row-actions .btn + .btn { margin-left: 4px; }

.hr-chip {
  display: inline-block;
  margin: 2px 4px 2px 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hr-chip-ot { color: #23628a; background: #e3f1fb; }
.hr-chip-leave { color: #805a0e; background: #fff0c9; }
.hr-chip-event { color: #146b43; background: #def4e8; }
.hr-chip-wfh { color: #5b3f9a; background: #efe8fb; }
.hr-chip.is-pending { outline: 1px dashed currentColor; background: transparent; }

.hr-reason { max-width: 260px; white-space: pre-wrap; }

/* .modal .form-group sets display:grid, which would beat [hidden]. */
.modal .form-group[hidden] { display: none; }

.hr-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.hr-form-note { font-size: 12px; }
.hr-checkbox { display: flex !important; align-items: center; gap: 8px; font-weight: 600; }

.hr-tabs { display: flex; gap: 6px; }
.hr-tab {
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 600;
}

.hr-tab.active { border-color: var(--brand); color: #fff; background: var(--brand); }

.hr-inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.hr-inline-form .form-control { width: auto; min-width: 180px; }
.hr-inline-form input[name="name"] { flex: 1; min-width: 220px; }

.hr-payslip-detail { min-width: 0 !important; }
.hr-payslip-detail th { width: 45%; font-size: 12px; text-transform: none; letter-spacing: normal; }
.hr-payslip-detail .hr-net th, .hr-payslip-detail .hr-net td { font-size: 16px; font-weight: 800; color: var(--ink); }
.hr-subtitle { margin: 18px 0 8px; font-size: 14px; }

@media (max-width: 768px) {
  .hr-toolbar .form-control, .hr-inline-form .form-control { min-width: 0; width: 100%; }
  .hr-toolbar label { flex: 1 1 140px; }
}
