/* HRM Common Styles */
.hrm-employee-page {
  --sale-primary: #5b7cff;
  --sale-primary-dark: #4a66df;
  --sale-bg: #f4f6fb;
  --sale-panel: #ffffff;
  --sale-muted: #7a8aa0;
  --sale-border: #dfe6f2;
  --sale-shadow: 0 10px 30px rgba(25, 30, 54, 0.12);
  --sale-radius: 14px;
}
.hrm-employee-page {
  background: linear-gradient(180deg, #eef2ff 0%, #f8f9fc 40%, #f3f6fb 100%);
  border-radius: var(--sale-radius);
  padding: 18px;
}
.hrm-employee-page .dash-card {
  background: var(--sale-panel);
  border: 1px solid var(--sale-border);
  border-radius: var(--sale-radius);
  box-shadow: var(--sale-shadow);
}
.hrm-employee-page .dash-card .dash-title {
  flex: 1 1 auto;
  min-width: 0;
}
.hrm-employee-page .dash-card .header-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.hrm-employee-page .dash-card .header-actions .btn,
.hrm-employee-page .dash-card .header-actions .action-btn {
  white-space: nowrap;
}
@media (min-width: 768px) {
    
  .hrm-employee-page .dash-card {
    flex-wrap: nowrap;
  }
  .hrm-employee-page .dash-card > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  .hrm-employee-page .dash-card .header-actions {
    flex: 0 0 auto;
    align-self: center;
  }
}
.hrm-employee-page.hrm-leaves .dash-card {
  flex-wrap: nowrap;
}
.hrm-employee-page.hrm-leaves .dash-card .header-actions {
  flex: 0 0 auto;
  align-self: center;
  margin-left: auto;
}
.hrm-employee-page .panel-title {
  font-weight: 800;
  color: #1d2b4f;
  margin-bottom: 0;
  font-size: 1rem;
}
.hrm-employee-page .section-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid #c7d2e8;
  color: #4a66df;
  font-size: 11px;
  background: #f5f8ff;
  cursor: help;
  vertical-align: middle;
}
.hrm-employee-page .section-hint i {
  pointer-events: none;
}
.hrm-employee-page .header-actions .btn,
.hrm-employee-page .action-btn {
  border-radius: 10px;
  font-weight: 700;
}
.hrm-employee-page .action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  border: 0;
}
.hrm-employee-page .action-btn.primary {
  background: var(--sale-primary);
  color: #fff;
}
.hrm-employee-page .action-btn.outline {
  background: #fff;
  border: 1px solid var(--sale-border);
  color: #1d2b4f;
}

.hrm-employee-page.hrm-dashboard-page {
  background: linear-gradient(180deg, #edf2ff 0%, #f6f8fe 42%, #f2f5fb 100%);
}
.hrm-dashboard-page .dashboard-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
}
.hrm-dashboard-page .dashboard-title {
  color: #11284b;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.hrm-dashboard-page .dashboard-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.hrm-dashboard-page .dashboard-action-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.hrm-dashboard-page .dashboard-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.hrm-dashboard-page .dashboard-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.2);
  color: #fff;
}
.hrm-dashboard-page .dashboard-action-btn.action-a { background: linear-gradient(135deg, #4574f0, #3559c7); }
.hrm-dashboard-page .dashboard-action-btn.action-b { background: linear-gradient(135deg, #1ca465, #148a54); }
.hrm-dashboard-page .dashboard-action-btn.action-c { background: linear-gradient(135deg, #f59634, #dd6a12); }
.hrm-dashboard-page .dashboard-action-btn.action-d { background: linear-gradient(135deg, #45598f, #30426e); }
.hrm-dashboard-page .dashboard-filter-select {
  min-width: 150px;
  height: 38px;
  border: 1px solid #d5deef;
  border-radius: 20px;
  padding: 0 36px 0 12px;
  background: #fff;
  font-weight: 600;
  color: #1e2f55;
}
.hrm-dashboard-page .dashboard-filter-range {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hrm-dashboard-page .dashboard-filter-range input[type="date"] {
  height: 38px;
  border: 1px solid #d5deef;
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}
.hrm-dashboard-page .dashboard-filter-apply {
  padding: 8px 12px;
  line-height: 1;
}
.hrm-dashboard-page .dashboard-metric {
  border: 1px solid #d8e2f3;
  color: #0f172a;
  background: #fff;
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.08);
  border-radius: 12px;
  min-height: 100%;
  border-bottom-width: 3px;
}
.hrm-dashboard-page .dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}
.hrm-dashboard-page .dashboard-metric-grid.dashboard-metric-grid-employee {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.hrm-dashboard-page .dashboard-metric .metric-label {
  opacity: 1;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.hrm-dashboard-page .dashboard-metric .metric-value {
  line-height: 1.1;
  margin-top: 4px;
  font-size: 2rem;
}
.hrm-dashboard-page .dashboard-metric .metric-sub {
  opacity: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}
.hrm-dashboard-page .metric-blue { border-bottom-color: #4574f0; }
.hrm-dashboard-page .metric-blue .metric-value { color: #1d4ed8; }
.hrm-dashboard-page .metric-green { border-bottom-color: #1ca465; }
.hrm-dashboard-page .metric-green .metric-value { color: #059669; }
.hrm-dashboard-page .metric-orange { border-bottom-color: #f59634; }
.hrm-dashboard-page .metric-orange .metric-value { color: #ea580c; }
.hrm-dashboard-page .metric-red { border-bottom-color: #f24464; }
.hrm-dashboard-page .metric-red .metric-value { color: #ef4444; }
.hrm-dashboard-page .metric-violet { border-bottom-color: #6d5efc; }
.hrm-dashboard-page .metric-violet .metric-sub strong { color: #4f46e5; }

.hrm-dashboard-page .dashboard-panel {
  border-radius: 12px;
  border: 1px solid #d8e2f3;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.07);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.hrm-dashboard-page .dashboard-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(16, 24, 40, 0.1);
}
.hrm-dashboard-page .dashboard-four-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.hrm-dashboard-page .dashboard-four-card {
  min-width: 0;
}
.hrm-dashboard-page .dashboard-panel .fw-semibold {
  color: #1e2f55;
  font-size: 1.02rem;
  font-weight: 800 !important;
}
.hrm-dashboard-page .dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px 10px;
  border-bottom: 1px solid #e9eff8;
}
.hrm-dashboard-page .dashboard-pill {
  min-width: 28px;
  height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1e3a8a;
  background: #e8efff;
}
.hrm-dashboard-page .panel-head-tasks {
  background: linear-gradient(135deg, #eff6ff, #e0ecff);
  border-radius: 10px;
  padding: 8px 10px;
}
.hrm-dashboard-page .panel-head-holidays {
  background: linear-gradient(135deg, #ecfdf5, #dcfce7);
  border-radius: 10px;
  padding: 8px 10px;
}
.hrm-dashboard-page .panel-head-activities {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-radius: 10px;
  padding: 8px 10px;
}
.hrm-dashboard-page .panel-head-notices {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  border-radius: 10px;
  padding: 8px 10px;
}
.hrm-dashboard-page .dashboard-panel-tasks .dashboard-pill { background: #dbeafe; color: #1d4ed8; }
.hrm-dashboard-page .dashboard-panel-holidays .dashboard-pill { background: #dcfce7; color: #15803d; }
.hrm-dashboard-page .dashboard-panel-activities .dashboard-pill { background: #ffedd5; color: #c2410c; }
.hrm-dashboard-page .dashboard-panel-notices .dashboard-pill { background: #ede9fe; color: #6d28d9; }
.hrm-dashboard-page .dashboard-row-link span {
  font-weight: 600;
  color: #334155;
}
.hrm-dashboard-page .dashboard-activity-row {
  transition: background-color 0.12s ease;
}
.hrm-dashboard-page .dashboard-activity-row:hover {
  background: #f7faff;
}
.hrm-dashboard-page .dashboard-holiday-row span:first-child {
  font-weight: 600;
  color: #1f2f54;
}
.hrm-dashboard-page .workflow-chip {
  padding: 10px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}
.hrm-dashboard-page .workflow-chip .small {
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 700;
}
.hrm-dashboard-page .chip-blue { background: #0f69d7; color: #fff; }
.hrm-dashboard-page .chip-yellow { background: #ffbe3d; color: #1f2937; }
.hrm-dashboard-page .chip-indigo { background: #5b50bc; color: #fff; }

.hrm-dashboard-page .dashboard-legend .legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}
.hrm-dashboard-page .dashboard-legend .dot-green { background: #16a34a; }
.hrm-dashboard-page .dashboard-legend .dot-yellow { background: #f59e0b; }
.hrm-dashboard-page .dashboard-legend .dot-red { background: #ef4444; }
.hrm-dashboard-page .dashboard-legend .dot-blue { background: #2563eb; }
.hrm-dashboard-page .dashboard-legend .dot-purple { background: #7c3aed; }
.hrm-dashboard-page .dashboard-mini-graph .mini-row {
  display: grid;
  grid-template-columns: 40px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.hrm-dashboard-page .dashboard-mini-graph .mini-track {
  height: 8px;
  border-radius: 20px;
  background: #e8eef9;
  overflow: hidden;
}
.hrm-dashboard-page .dashboard-mini-graph .mini-fill {
  height: 100%;
  border-radius: 20px;
}
.hrm-dashboard-page .dashboard-mini-graph .mini-fill-blue { background: #2563eb; }
.hrm-dashboard-page .dashboard-mini-graph .mini-fill-purple { background: #7c3aed; }

@media (max-width: 767.98px) {
  .hrm-dashboard-page .dashboard-welcome {
    flex-direction: column;
    align-items: flex-start;
  }
  .hrm-dashboard-page .dashboard-title {
    font-size: 1.35rem;
  }
  .hrm-dashboard-page .dashboard-filter-wrap {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
  .hrm-dashboard-page .dashboard-action-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hrm-dashboard-page .dashboard-filter-select {
    width: 100%;
  }
  .hrm-dashboard-page .dashboard-metric-grid {
    grid-template-columns: 1fr;
  }
  .hrm-dashboard-page .dashboard-metric-grid.dashboard-metric-grid-employee {
    grid-template-columns: 1fr;
  }
  .hrm-dashboard-page .dashboard-four-cards {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  .hrm-dashboard-page .dashboard-action-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hrm-dashboard-page .dashboard-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hrm-dashboard-page .dashboard-metric-grid.dashboard-metric-grid-employee {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hrm-dashboard-page .dashboard-four-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.attendance-manage .select2-container .select2-selection--single,
.attendance-self .select2-container .select2-selection--single {
  min-height: 38px;
}
.attendance-manage .select2-container,
.attendance-self .select2-container {
  width: 100% !important;
}
.attendance-manage .select2-container--default .select2-selection--single,
.attendance-self .select2-container--default .select2-selection--single {
  border: 1px solid #dbe3f3;
  border-radius: 10px;
  background: #f9fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.attendance-manage .select2-container--default .select2-selection--single .select2-selection__rendered,
.attendance-self .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #1d2b4f;
  font-weight: 600;
  line-height: 36px;
  padding-left: 10px;
}
.attendance-manage .select2-container--default .select2-selection--single .select2-selection__placeholder,
.attendance-self .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.attendance-manage .select2-container--default .select2-selection--single .select2-selection__arrow,
.attendance-self .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px;
  right: 8px;
}
.attendance-manage .select2-dropdown,
.attendance-self .select2-dropdown {
  border: 1px solid #dbe3f3;
  border-radius: 10px;
  box-shadow: 0 16px 28px rgba(20, 35, 80, 0.18);
  overflow: hidden;
}
.attendance-manage .select2-search--dropdown,
.attendance-self .select2-search--dropdown {
  padding: 8px 10px;
  border-bottom: 1px solid #e6edf8;
  background: #ffffff;
}
.attendance-manage .select2-search--dropdown .select2-search__field,
.attendance-self .select2-search--dropdown .select2-search__field {
  border: 1px solid #dbe3f3;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.85rem;
  color: #1d2b4f;
  background: #f9fbff;
}
.attendance-manage .select2-search--dropdown .select2-search__field:focus,
.attendance-self .select2-search--dropdown .select2-search__field:focus {
  outline: none;
  border-color: #5b7cff;
  box-shadow: 0 0 0 2px rgba(91, 124, 255, 0.18);
  background: #ffffff;
}
.attendance-manage .select2-results__option,
.attendance-self .select2-results__option {
  padding: 8px 10px;
  font-size: 0.85rem;
}
.attendance-manage .select2-results__option--highlighted[aria-selected],
.attendance-self .select2-results__option--highlighted[aria-selected] {
  background: #edf2ff;
  color: #1d2b4f;
}
.attendance-manage .select2-results__group,
.attendance-self .select2-results__group {
  font-weight: 700;
  color: #111827;
  background: #f1f5f9;
  padding: 6px 10px;
}
.attendance-calendar-wrapper {
  position: relative;
  border: 3px solid #dee2e6;
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #ffffff;
}
.attendance-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid #dee2e6;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #0ea5e9;
}
.attendance-calendar > * {
  border-right: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  background: #ffffff;
}
.attendance-calendar > *:nth-child(7n) { border-right: none; }
.attendance-calendar > *:nth-last-child(-n + 7) { border-bottom: none; }
.attendance-calendar .day-name {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f1f5f9;
  background: #0ea5e9;
  border-right: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
}
.attendance-calendar .day-cell {
  min-height: 54px;
  padding: 0.35rem 0.3rem 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.25rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  background: #ffffff;
}
.attendance-calendar .day-cell[data-date] { cursor: pointer; }
.attendance-calendar .day-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(33, 37, 41, 0.12);
}
.attendance-calendar .day-cell.muted {
  background: #f8f9fa;
  color: #ced4da;
}
.attendance-calendar .day-cell .day-number {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  line-height: 1;
  background: #e9ecef;
  color: #495057;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.attendance-calendar .day-cell .day-number small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #2b2f36;
  margin-top: 1px;
  letter-spacing: 0.02em;
}
.attendance-calendar .day-cell.cal-present .day-number small,
.attendance-calendar .day-cell.cal-absent .day-number small,
.attendance-calendar .day-cell.cal-leave .day-number small,
.attendance-calendar .day-cell.cal-weekoff .day-number small,
.attendance-calendar .day-cell.cal-holiday .day-number small {
  color: rgba(255, 255, 255, 0.9);
}
.attendance-calendar .day-cell.cal-present .day-number {
  background: #198754;
  color: #ffffff;
}
.attendance-calendar .day-cell.cal-absent .day-number {
  background: #dc3545;
  color: #ffffff;
}
.attendance-calendar .day-cell.cal-leave .day-number {
  background: #fd7e14;
  color: #ffffff;
}
.attendance-calendar .day-cell.cal-weekoff .day-number {
  background: #4c6ef5;
  color: #ffffff;
}
.attendance-calendar .day-cell.cal-holiday .day-number {
  background: #d946ef;
  color: #ffffff;
}
.attendance-calendar .day-cell.cal-default .day-number {
  background: #ced4da;
  color: #495057;
}
.attendance-calendar .day-cell.today {
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.25), 0 4px 10px rgba(33, 37, 41, 0.12);
}
.attendance-calendar .day-cell.today .day-number {
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.35);
}
/* Salary summary badges */
.salary-badge {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.salary-badge.salary-base { background:#0d6efd; color:#fff; }
.salary-badge.salary-net  { background:#198754; color:#fff; }
.salary-badge + .salary-badge { margin-left: .5rem; }
#policyComplianceModal .modal-body {
  max-height: 380px;
  overflow-y: auto;
}
#policyComplianceModal .policy-compliance-row {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
}
#policyComplianceModal .policy-compliance-row:first-child {
  padding-top: 0;
}
#policyComplianceModal .policy-compliance-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
#policyComplianceModal .policy-compliance-row .metric-copy {
  font-size: 0.85rem;
  color: #475569;
}
#policyComplianceModal .policy-compliance-row .policy-title {
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: #0f172a;
}
#policyComplianceModal .policy-compliance-row .status-chip {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}
#policyComplianceModal .policy-compliance-row .status-chip.met {
  background: rgba(16, 185, 129, 0.15);
  color: #0f766e;
}
#policyComplianceModal .policy-compliance-row .status-chip.fail {
  background: rgba(248, 113, 113, 0.15);
  color: #b91c1c;
}
#policyComplianceModal .policy-compliance-row .status-chip.applied {
  background: rgba(129, 140, 248, 0.18);
  color: #4338ca;
}
#policyComplianceModal .policy-compliance-row .action-col {
  text-align: right;
  min-width: 150px;
}
.attendance-calendar .status-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(33, 37, 41, 0.68);
  display: none;
}
.attendance-calendar .status-label.blank { visibility: hidden; }
.attendance-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.attendance-calendar-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #495057;
  background: #f8f9fa;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  border: 1px solid #dee2e6;
}
.attendance-calendar-legend .legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.legend-present { background: #198754; }
.legend-absent { background: #dc3545; }
.legend-leave { background: #fd7e14; }
.legend-weekoff { background: #4c6ef5; }
.legend-holiday { background: #d946ef; }
.hrm-punch-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border-radius: 8px;
  overflow: visible;
  box-shadow: none;
}
.hrm-punch-actions .btn {
  border-radius: 8px !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 8px 10px;
  font-size: 0.82rem;
  box-shadow: none !important;
}
.hrm-punch-actions .btn-success { background: #11a34a; }
.hrm-punch-actions .btn-danger { background: #ef233c; }
.hrm-punch-actions .btn-warning { background: #f7b731; color: #1f2937 !important; }
.hrm-punch-actions .btn-info { background: #0ea5e9; color: #fff !important; }
.hrm-punch-actions .btn:hover {
  filter: brightness(0.95);
}
.hrm-punch-actions-admin {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hrm-punch-actions-admin .btn {
  width: 100%;
  border-radius: 10px !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 8px 10px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  border: 0 !important;
}
.hrm-punch-actions-admin .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 16px rgba(15, 23, 42, 0.16);
}
.attendance-manage .admin-punch-btn {
  width: 100%;
}
.attendance-manage .attendance-action-group {
  width: 100%;
}
.attendance-manage .attendance-action-btn {
  min-width: 150px;
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
@media (max-width: 575.98px) {
  .hrm-punch-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hrm-punch-actions .btn:nth-child(3),
  .hrm-punch-actions .btn:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  }
}
.attendance-manage .manual-punch-row {
  flex-direction: column;
}
.attendance-manage .manual-punch-row .col-sm-6 {
  width: 100%;
  max-width: 100%;
}
.attendance-manage .manual-punch-row .form-control {
  width: 100%;
}
.swal-punch-sm {
  width: 420px !important;
  font-size: 0.9rem;
}
.swal-punch-sm .swal2-title {
  font-size: 1.2rem;
}
.swal-punch-sm .swal2-icon {
  transform: scale(0.85);
  margin: 0.8rem auto 0.4rem;
}
.swal-punch-sm .swal2-input {
  margin: 0.4rem auto 0.2rem;
}
.attendance-inline-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 3vw, 24px);
  background: transparent;
  pointer-events: none;
  z-index: 1050;
}
.attendance-inline-modal.show { display: flex; }
.attendance-inline-modal .modal-dialog {
  margin: 0;
  width: min(420px, 100%);
  pointer-events: auto;
}
.attendance-inline-modal .modal-content {
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
  max-height: min(560px, calc(100vh - clamp(16px, 6vw, 72px)));
  overflow-y: auto;
}
.modal-header .modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #6c757d;
  cursor: pointer;
}
.modal-header .modal-close:hover,
.modal-header .modal-close:focus {
  color: #0d6efd;
  outline: none;
}
#attendanceTableModal .dataTable-wrapper {
  width: 100%;
  overflow-x: auto;
}
#attendanceTableModal .dataTable-top,
#attendanceTableModal .dataTable-bottom {
  gap: 0.75rem;
}
@media (max-width: 767.98px) {
  #attendanceTableModal .modal-dialog {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    margin: 0.75rem auto;
  }
  #attendanceTableModal .modal-content {
    border-radius: 16px;
  }
  #attendanceTableModal .dataTable-top,
  #attendanceTableModal .dataTable-bottom {
    flex-direction: column;
    align-items: stretch;
  }
  #attendanceTableModal .dataTable-top .dataTable-selector,
  #attendanceTableModal .dataTable-top .dataTable-search input {
    width: 100% !important;
  }
  #attendanceTableModal .dataTable-top .dataTable-search label,
  #attendanceTableModal .dataTable-top .dataTable-selector label {
    width: 100%;
  }
  #attendanceTableModal .table-responsive {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
  }
}
@media (max-width: 575.98px) {
  #attendanceTableModal table,
  #attendanceTableModal thead,
  #attendanceTableModal tbody,
  #attendanceTableModal th,
  #attendanceTableModal td,
  #attendanceTableModal tr {
    display: block;
  }
  #attendanceTableModal thead {
    display: none;
  }
  #attendanceTableModal tbody tr {
    border: 1px solid rgba(226, 232, 240, 0.45);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    background: #ffffff;
  }
  #attendanceTableModal tbody td {
    position: relative;
    padding: 0.55rem 0 0.55rem 48%;
    border: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.35);
    font-size: 0.85rem;
    word-break: break-word;
  }
  #attendanceTableModal tbody td:last-child {
    border-bottom: none;
  }
  #attendanceTableModal tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 0.75rem;
    top: 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    width: calc(45% - 1.5rem);
    white-space: normal;
  }
  #attendanceTableModal .dataTable-bottom {
    align-items: center;
  }
}
.hrm-employee-page .table-card {
  border-radius: var(--sale-radius);
  border: 1px solid var(--sale-border);
  background: var(--sale-panel);
  box-shadow: var(--sale-shadow);
  overflow: hidden;
}
.hrm-employee-page .hrm-select-card {
  overflow: visible;
}
.hrm-employee-page .hrm-select-card .ts-wrapper {
  z-index: 1200;
}
.hrm-employee-page .ts-panel {
  background: transparent;
  border: 0 !important;
  padding: 0 !important;
}
.hrm-employee-page .ts-wrapper {
  position: relative;
  z-index: 10;
}
.hrm-employee-page .ts-wrapper .ts-control {
  border: 1px solid #dbe3f3;
  border-radius: 10px;
  min-height: 38px;
  padding: 6px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  background: #f9fbff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.hrm-employee-page .ts-wrapper.single .ts-control {
  padding-right: 32px;
  position: relative;
}
.hrm-employee-page .ts-wrapper.single .ts-control::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #6c7aa5;
  transform: translateY(-35%);
  pointer-events: none;
}
.hrm-employee-page .ts-wrapper .ts-control .item {
  font-weight: 600;
  color: #1d2b4f;
}
.hrm-employee-page .ts-wrapper.focus .ts-control {
  border-color: #5b7cff;
  box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.22);
  background: #ffffff;
  z-index: 11;
}
.hrm-employee-page .ts-dropdown {
  border: 1px solid #dbe3f3;
  border-radius: 10px;
  box-shadow: 0 16px 28px rgba(20, 35, 80, 0.18);
  z-index: 3000 !important;
  overflow: hidden;
}
.hrm-employee-page .ts-dropdown .dropdown-input {
  padding: 8px 10px;
  border-bottom: 1px solid #e6edf8;
  background: #ffffff;
}
.hrm-employee-page .ts-dropdown .dropdown-input .ts-dropdown-input {
  width: 100%;
  border: 1px solid #dbe3f3;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.85rem;
  color: #1d2b4f;
  background: #f9fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.hrm-employee-page .ts-dropdown .dropdown-input .ts-dropdown-input:focus {
  outline: none;
  border-color: #5b7cff;
  box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.18);
  background: #ffffff;
}
.hrm-employee-page .ts-dropdown .option {
  padding: 8px 10px;
  font-size: 0.85rem;
}
.hrm-employee-page .ts-dropdown .option.active {
  background: #edf2ff;
  color: #1d2b4f;
}
.hrm-employee-page .ts-dropdown .ts-dropdown-content {
  max-height: 220px;
}
.modal .ts-wrapper {
  z-index: 1065;
}
.modal .ts-dropdown {
  z-index: 1065 !important;
}
body.modal-open .ts-dropdown {
  display: none;
}
body.modal-open .modal.show .ts-dropdown {
  display: block;
}
body.modal-open .ts-wrapper {
  visibility: hidden;
}
body.modal-open .modal.show .ts-wrapper {
  visibility: visible;
}
.hrm-employee-page .table-card .card-head {
  padding: 14px 18px;
  background: #e8eefc;
  border-bottom: 1px solid var(--sale-border);
  color: #1d2b4f;
  font-weight: 700;
}
.hrm-employee-page table thead th {
  background: #1d2b4f;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #ffffff;
  font-weight: 700;
}
.hrm-employee-page .action-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.hrm-employee-page .action-btn-uniform {
  min-width: 92px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.5rem;
  line-height: 1.1;
}
.hrm-employee-page .employee-card-list {
  display: none;
  gap: 12px;
  margin-top: 8px;
}
.hrm-employee-page .employee-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}
.hrm-employee-page .employee-card.is-loading,
.hrm-employee-page .employee-card.empty {
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}
.hrm-employee-page .employee-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.hrm-employee-page .employee-card-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 1rem;
}
.hrm-employee-page .employee-card-sub {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.hrm-employee-page .employee-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.hrm-employee-page .employee-card-field {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
}
.hrm-employee-page .employee-card-field span {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hrm-employee-page .employee-card-field strong {
  display: block;
  margin-top: 2px;
  font-weight: 600;
  color: #0f172a;
  font-size: 0.88rem;
  word-break: break-word;
}
.hrm-employee-page .employee-card-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hrm-employee-page .employee-card-actions .action-stack {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}
@media (max-width: 768px) {
  .hrm-employee-page .employee-card-list {
    display: grid;
  }
  .hrm-employee-page .employee-table-wrap table {
    display: none;
  }
  .hrm-employee-page .employee-table-wrap .dataTables_wrapper,
  .hrm-employee-page .employee-table-wrap .dataTable-wrapper {
    padding: 0;
  }
  .hrm-employee-page .employee-table-wrap .dataTables_filter,
  .hrm-employee-page .employee-table-wrap .dataTable-search {
    margin-bottom: 8px;
  }
  .hrm-employee-page .employee-mobile-controls-bottom {
    margin-top: 12px;
    display: block;
  }
  .hrm-employee-page .employee-mobile-controls-bottom .employee-mobile-controls-info {
    margin-bottom: 6px;
    text-align: center;
    color: #64748b;
    font-size: 0.78rem;
  }
  .hrm-employee-page .employee-mobile-controls-bottom .employee-mobile-controls-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .hrm-employee-page .employee-mobile-controls-bottom .mobile-page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #d7dfef;
    border-radius: 4px;
    background: #fff;
    color: #1d2b4f;
    font-size: 0.78rem;
    line-height: 1;
    flex: 0 0 auto;
  }
  .hrm-employee-page .employee-mobile-controls-bottom .mobile-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    color: #64748b;
    font-size: 0.78rem;
    flex: 0 0 auto;
  }
  .hrm-employee-page .employee-mobile-controls-bottom .mobile-page-btn.is-active {
    background: #eef2ff;
    border-color: #bccbff;
    color: #3050d8;
    font-weight: 700;
  }
  .hrm-employee-page .employee-mobile-controls-bottom .mobile-page-btn:disabled {
    opacity: 0.45;
    cursor: default;
  }
}
.hrm-employee-page .hrm-btn-edit,
.hrm-employee-page .hrm-btn-delete {
  min-width: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.6rem;
  font-weight: 600;
  border-radius: 4px;
  line-height: 1.1;
  border: 0;
  color: #fff;
}
.hrm-employee-page .hrm-btn-edit {
  background: #6c757d;
}
.hrm-employee-page .hrm-btn-edit:hover,
.hrm-employee-page .hrm-btn-edit:focus {
  background: #5a6268;
  color: #fff;
}
.hrm-employee-page .hrm-btn-delete {
  background: #dc3545;
}
.hrm-employee-page .hrm-btn-delete:hover,
.hrm-employee-page .hrm-btn-delete:focus {
  background: #c82333;
  color: #fff;
}
.employee-profile-card {
  --ink: #0e1a2b;
  --slate: #334155;
  --accent: #0f766e;
  --accent-2: #1d4ed8;
  --paper: #ffffff;
  --mist: #f2f6ff;
  --line: #e2e8f0;
  background:
    radial-gradient(1200px 240px at 80% -40%, rgba(29, 78, 216, 0.12), transparent 70%),
    radial-gradient(900px 240px at -10% 0%, rgba(15, 118, 110, 0.12), transparent 70%),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  font-family: "Manrope", "Poppins", "Segoe UI", sans-serif;
}
.employee-profile-header {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.employee-avatar {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(29, 78, 216, 0.18));
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid rgba(15, 118, 110, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.employee-name {
  font-weight: 800;
  color: var(--ink);
  font-size: 1.05rem;
}
.employee-subtitle {
  font-size: 0.78rem;
  color: var(--slate);
}
.employee-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.employee-field {
  background: var(--mist);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 12px 12px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.employee-field:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}
.employee-field span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin-bottom: 6px;
  font-weight: 700;
}
.employee-field strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
}

body.modal-open {
  overflow: hidden;
}
#leaveModal,
.hrm-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1060;
  padding: clamp(10px, 3vw, 28px);
}
#leaveModal.show,
.hrm-modal.show {
  display: flex;
}
.hrm-modal .modal-dialog {
  margin: 0;
  pointer-events: auto;
}
.hrm-modal .modal-content {
  border-radius: 20px;
}
.hrm-modal.hrm-modal-sm .modal-content,
.hrm-modal.hrm-modal-md .modal-content {
  border-radius: 16px;
}
#employeeFormModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1060;
  padding: clamp(10px, 3vw, 28px);
}
#employeeFormModal.show {
  display: flex;
}
#employeeFormModal .modal-dialog {
  margin: 0;
  width: min(960px, 100%);
  pointer-events: auto;
}
.purchase-detail-modal .modal-content {
  border-radius: 16px;
  border: 1px solid #dbe3f3;
  box-shadow: 0 20px 60px rgba(20, 35, 80, 0.25);
  background: #f5f8ff;
  max-height: calc(100vh - clamp(32px, 8vw, 96px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.purchase-detail-modal .modal-header {
  background: #f5f8ff;
  border-bottom: 1px solid #e3eaf7;
  padding: 0.9rem 1.25rem;
}
.purchase-detail-modal .modal-title {
  font-weight: 700;
  color: #1b2a4a;
}
.purchase-detail-modal .modal-body {
  overflow-y: auto;
  overflow-x: visible;
  position: relative;
  background: #fbfcff;
  max-height: calc(100vh - 220px);
}
.purchase-detail-modal .modal-footer {
  border-top: 1px solid #e3eaf7;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f5f8ff;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
#employeeFormModal .modal-close {
  border: none;
  background: transparent;
  background-image: none !important;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
}
#employeeFormModal .modal-close:hover,
#employeeFormModal .modal-close:focus {
  color: #2563eb;
  outline: none;
}
.hrm-modal .modal-close {
  border: none;
  background: transparent;
  background-image: none !important;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
}
.hrm-modal .modal-close:hover,
.hrm-modal .modal-close:focus {
  color: #2563eb;
  outline: none;
}
.hrm-modal .btn-close {
  background-image: none !important;
  opacity: 1;
  border: none;
  box-shadow: none;
  width: auto;
  height: auto;
  padding: 0;
}
.employee-form-modal .purchase-detail-card {
  background: #ffffff;
  border: 1px solid #e3eaf7;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 8px 18px rgba(20, 35, 80, 0.08);
}
.employee-form-modal .purchase-detail-card .card-title {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(90deg, #5b7cff 0%, #6c8cff 60%, #7d95ff 100%) !important;
  border-bottom: 1px solid #e3eaf7;
  padding: 8px 12px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.employee-form-modal .purchase-detail-card .card-body {
  padding: 12px;
}
.employee-form-modal .purchase-detail-card label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #2a3b5c;
  margin-bottom: 4px;
  display: block;
}
.employee-form-modal .purchase-detail-card .form-control,
.employee-form-modal .purchase-detail-card .form-select,
.employee-form-modal .purchase-detail-card textarea {
  border-radius: 10px;
  border: 1px solid #dbe3f3;
  min-height: 44px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.employee-form-modal .select2-container .select2-selection--single,
.employee-form-modal .select2-container .select2-selection--multiple {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #dbe3f3;
  background: #ffffff;
}
.employee-form-modal .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 42px;
  padding-left: 12px;
  padding-right: 36px;
}
.employee-form-modal .select2-container .select2-selection--single .select2-selection__arrow {
  height: 42px;
  right: 10px;
}
.employee-form-modal .select2-container .select2-selection--multiple .select2-selection__rendered {
  padding: 6px 10px;
}
.employee-form-modal .select2-container .select2-selection--multiple .select2-selection__choice {
  margin-top: 4px;
  margin-bottom: 4px;
}
.employee-form-modal .purchase-detail-card .form-control[readonly] {
  background: #eef2f7;
}
.employee-form-modal .purchase-detail-card .input-group > .btn {
  border-radius: 10px;
}
.employee-form-modal .purchase-detail-card .help-text {
  font-size: 0.7rem;
  color: #6b7a99;
  margin-top: 4px;
}
.employee-form-modal .info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid #c7d2e8;
  color: #4a66df;
  font-size: 10px;
  font-weight: 700;
  background: #f5f8ff;
  margin-left: 6px;
  cursor: help;
  position: relative;
  line-height: 1;
  text-transform: none;
  font-variant: normal;
  font-style: normal;
  letter-spacing: 0;
}
.employee-form-modal .info-icon:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(91, 124, 255, 0.2);
}
.employee-form-modal .info-icon::after {
  content: none !important;
  display: none !important;
}
.employee-form-modal .info-icon::before {
  content: none !important;
  display: none !important;
}
.employee-form-modal .ts-panel {
  background: transparent;
  border: 0;
  padding: 0;
}
.employee-form-modal .ts-wrapper {
  position: relative;
  z-index: 10;
}
.employee-form-modal .ts-wrapper .ts-control {
  border-color: #dbe3f3;
  border-radius: 10px;
  min-height: 38px;
  padding: 6px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  background: #f9fbff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.employee-form-modal .ts-wrapper .ts-control .item {
  font-weight: 600;
  color: #1d2b4f;
}
.employee-form-modal .ts-wrapper .ts-control input {
  color: #1d2b4f;
}
.employee-form-modal .ts-wrapper.focus .ts-control {
  border-color: #5b7cff;
  box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.22);
  background: #ffffff;
  z-index: 11;
}
.employee-form-modal .ts-dropdown {
  border: 1px solid #dbe3f3;
  border-radius: 10px;
  box-shadow: 0 16px 28px rgba(20, 35, 80, 0.18);
  z-index: 3000 !important;
  overflow: hidden;
}
.employee-form-modal .ts-dropdown .option {
  padding: 8px 10px;
  font-size: 0.85rem;
}
.employee-form-modal .ts-dropdown .option.active {
  background: #edf2ff;
  color: #1d2b4f;
}
.employee-form-modal select.form-select {
  background-color: #f9fbff;
  border-color: #dbe3f3;
  border-radius: 10px;
  min-height: 38px;
}
.employee-form-modal .form-control[type="file"] {
  padding: 6px 10px;
}
.employee-form-modal .form-control::placeholder,
.employee-form-modal textarea::placeholder {
  color: #94a3b8;
}
.employee-form-modal .select2-container {
  width: 100% !important;
}
.employee-form-modal .select2-container--default .select2-selection--single,
.employee-form-modal .select2-container--default .select2-selection--multiple {
  border: 1px solid #dbe3f3;
  border-radius: 10px;
  height: 44px;
  background: #f9fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.employee-form-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #1d2b4f;
  font-weight: 600;
  line-height: 42px;
  padding-left: 10px;
}
.employee-form-modal .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px;
  right: 6px;
}
.employee-form-modal .select2-container--default .select2-selection--multiple {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  overflow: hidden;
  min-height: 44px;
  height: 44px;
}
.employee-form-modal .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.employee-form-modal .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: #eef2ff;
  border: 1px solid #dbe3f3;
  border-radius: 8px;
  font-size: 0.72rem;
  margin-top: 2px;
  margin-bottom: 2px;
  white-space: nowrap;
}
.employee-form-modal .select2-container--default.select2-container--focus .select2-selection--single,
.employee-form-modal .select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: #5b7cff;
  box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.22);
  background: #ffffff;
}
.employee-form-modal .select2-dropdown {
  border: 1px solid #dbe3f3;
  border-radius: 10px;
  box-shadow: 0 16px 28px rgba(20, 35, 80, 0.18);
  overflow: hidden;
}
.employee-form-modal .select2-results__option {
  padding: 8px 10px;
  font-size: 0.85rem;
}
.employee-form-modal .select2-results__option--highlighted[aria-selected] {
  background: #edf2ff;
  color: #1d2b4f;
}
.employee-form-modal .image-preview {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  border: 1px solid #dbe3f3;
  object-fit: cover;
  background: #f8fafc;
}
.employee-form-modal .radius-input {
  max-width: 140px;
}
.employee-form-modal .employee-image-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.employee-form-modal .image-input {
  max-width: 220px;
}
.employee-form-modal .form-footer-bar {
  position: sticky;
  bottom: 0;
  background: #f5f8ff;
  padding: 12px 0 0;
  margin-top: 10px;
  border-top: 1px solid #e3eaf7;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  z-index: 5;
}
.employee-form-modal .form-footer-bar.in-modal {
  position: static;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Leave Rules Modal */
#leaveRuleModal .modal-body {
  padding: 21px;
}
#leaveRuleModal .leave-rule-section {
  padding-left: 0;
  padding-right: 0;
}
#leaveRuleModal .purchase-detail-card {
  margin: 0 0 16px;
  max-width: 100%;
  overflow: hidden;
  width: 100%;
}
#leaveRuleModal .purchase-detail-card:last-child {
  margin-bottom: 0;
}
#leaveRuleModal .purchase-detail-card .card-body {
  padding: 12px 14px;
}
#leaveRuleModal .label-hint {
  color: #64748b;
  margin-left: 0.35rem;
  cursor: help;
  font-size: 0.95em;
  position: relative;
  display: inline-flex;
  align-items: center;
}
#leaveRuleModal .label-hint i {
  pointer-events: none;
}
#leaveRuleModal .ts-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
#leaveRuleModal .ts-dropdown .optgroup-header {
  font-weight: 700;
  color: #111827;
}
#leaveRuleModal .ts-wrapper.multi .ts-control {
  min-height: 44px;
  height: auto;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 10px;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}
#leaveRuleModal .ts-wrapper.multi {
  max-width: 100%;
  width: 100%;
}
#leaveRuleModal .ts-wrapper.multi .ts-control {
  width: 100%;
}
#leaveRuleModal .purchase-detail-card .ts-wrapper,
#leaveRuleModal .purchase-detail-card .ts-wrapper * {
  box-sizing: border-box;
}
#leaveRuleModal .purchase-detail-card .ts-wrapper {
  display: block;
  width: 100%;
  max-width: 100%;
}
#leaveRuleModal .purchase-detail-card .ts-wrapper .ts-control {
  display: flex;
  width: 100%;
  max-width: 100%;
}
#leaveRuleModal .ts-wrapper.multi .ts-control .item {
  margin: 0;
  white-space: nowrap;
}
#leaveRuleModal .ts-wrapper.multi .ts-control > input {
  min-width: 140px;
  flex: 1 1 140px;
}
#leaveRuleModal .label-hint[title]::after,
#leaveRuleModal .label-hint[title]::before {
  content: none !important;
  display: none !important;
}
@media (max-width: 767.98px) {
  #leaveRuleModal {
    padding: 0.75rem;
  }
  #leaveRuleModal .modal-dialog {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    margin: 0 auto;
  }
  #leaveRuleModal .modal-content {
    max-height: calc(100vh - 1.5rem);
    border-radius: 16px;
  }
  #leaveRuleModal .modal-body {
    padding: 12px;
  }
  #leaveRuleModal .purchase-detail-card .card-body {
    padding: 10px 12px;
  }
}

/* Leave Modals (index) */
#leaveModal .modal-content {
  box-shadow: 0 25px 45px rgba(15, 23, 42, 0.25);
  max-height: calc(100vh - clamp(32px, 8vw, 96px));
  display: flex;
  flex-direction: column;
}
#leaveModal .modal-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#leaveModal .modal-close,
#grantEarnedModal .modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}
#leaveModal .modal-body,
#grantEarnedModal .modal-body {
  overflow-y: auto;
  padding: 1.25rem;
}
#leaveModalFooter {
  display: none;
  background: #f5f8ff;
  border-top: 1px solid #e3eaf7;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  justify-content: flex-end;
  gap: 10px;
}
#leaveModal .modal-footer {
  border-top: 1px solid #e3eaf7;
  background: #f5f8ff;
}
#grantEarnedModal .modal-content {
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.18);
  max-height: calc(100vh - clamp(32px, 8vw, 96px));
  display: flex;
  flex-direction: column;
}
#grantEarnedModal .modal-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#grantEarnedModal .modal-footer {
  background: #f5f8ff;
  border-top: 1px solid #e3eaf7;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  justify-content: flex-end;
  gap: 10px;
}
#grantEarnedModal textarea {
  min-height: 90px;
  resize: vertical;
}
#grantEarnedModal .btn {
  border-radius: 10px;
  font-weight: 700;
}

/* Leave modal select/tom-select */
#leaveModal .ts-panel {
  background: transparent;
  border: 0;
  padding: 0 !important;
  border-radius: 0;
}
#leaveModal .ts-panel.border {
  border: 0 !important;
}
#leaveModal .ts-panel.rounded {
  border-radius: 0 !important;
}
#leaveModal .ts-wrapper .ts-control {
  min-height: 38px;
  border-color: #ced4da;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  border-radius: 0.375rem;
}
#leaveModal .ts-wrapper.focus .ts-control {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
#leaveModal .ts-dropdown {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #dbe3f3;
  border-radius: 10px;
  box-shadow: 0 16px 28px rgba(20, 35, 80, 0.18);
  background: #ffffff;
  z-index: 2000;
}
#leaveModal .ts-dropdown .option {
  padding: 8px 10px;
  font-size: 0.85rem;
}
#leaveModal .ts-dropdown .option.active {
  background: #edf2ff;
  color: #1d2b4f;
}

/* Select2 in leave/grant modals */
#leaveModal .select2-container,
#grantEarnedModal .select2-container {
  width: 100% !important;
}
#leaveModal .select2-container--default .select2-selection--single,
#grantEarnedModal .select2-container--default .select2-selection--single {
  border-radius: 10px;
  border: 1px solid #dbe3f3;
  min-height: 42px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  outline: none;
}
#leaveModal .select2-container--default .select2-selection--single .select2-selection__rendered,
#grantEarnedModal .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px;
  padding-left: 12px;
  color: #1d2b4f;
  font-weight: 600;
}
#leaveModal .select2-container--default .select2-selection--single .select2-selection__arrow,
#grantEarnedModal .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px;
  right: 8px;
}
#leaveModal .select2-dropdown,
#grantEarnedModal .select2-dropdown {
  border: 1px solid #dbe3f3;
  border-radius: 10px;
  box-shadow: 0 16px 28px rgba(20, 35, 80, 0.18);
}
#leaveModal .select2-results__option,
#grantEarnedModal .select2-results__option {
  padding: 8px 10px;
  font-size: 0.85rem;
}
#leaveModal .select2-results__option--highlighted[aria-selected],
#grantEarnedModal .select2-results__option--highlighted[aria-selected] {
  background: #edf2ff;
  color: #1d2b4f;
}
#leaveModal .select2-container--default .select2-selection--single .select2-selection__rendered,
#leaveModal .select2-container--default .select2-selection--single .select2-selection__arrow,
#grantEarnedModal .select2-container--default .select2-selection--single .select2-selection__rendered,
#grantEarnedModal .select2-container--default .select2-selection--single .select2-selection__arrow {
  border: 0 !important;
}
#leaveModal .select2-container--default.select2-container--focus .select2-selection--single,
#leaveModal .select2-container--default.select2-container--open .select2-selection--single,
#grantEarnedModal .select2-container--default.select2-container--focus .select2-selection--single,
#grantEarnedModal .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #5b7cff;
  box-shadow: 0 0 0 2px rgba(91, 124, 255, 0.18);
}

#grantEarnedModal .modal-body .form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1d2b4f;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
#grantEarnedModal .modal-body .form-text {
  color: #6b7aa5;
  font-size: 0.75rem;
}

#applyRuleSummary {
  gap: 0.25rem;
  display: flex;
  flex-wrap: wrap;
}

/* Leave modal table + form card design */
#leaveModal .table-card {
  border: 1px solid #e3eaf7;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(20, 35, 80, 0.08);
  overflow: hidden;
}
#leaveModal .table-card .card-head {
  padding: 0.7rem 1rem;
  font-weight: 700;
  color: #ffffff;
  border-bottom: 1px solid #e3eaf7;
  background: linear-gradient(90deg, #5b7cff 0%, #6c8cff 60%, #7d95ff 100%);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}
#leaveModal .table-card .card-body {
  background: #fbfcff;
}
#leaveModal .table-responsive {
  border-radius: 0 0 16px 16px;
}
#leaveModal table.table {
  margin-bottom: 0;
}

/* Penalty modal sizing (match week-off modal feel) */
#penaltyModal .modal-dialog {
  max-width: 640px;
}
#penaltyModal .modal-content {
  max-height: calc(100vh - 120px);
}

/* HR policy modal field ordering */
.policy-detail-fields > [data-field="policy_type_code"] {
  order: 1;
}
.policy-detail-fields > [data-field="policy_name"] {
  order: 2;
}
.policy-detail-fields > [data-field="shift_id"] {
  order: 3;
}
.policy-detail-fields > [data-field="calculation_type"] {
  order: 4;
}
.policy-detail-fields > [data-field="metric_value"] {
  order: 5;
}
.policy-detail-fields > [data-field="is_active"] {
  order: 6;
}
.policy-detail-fields > [data-field="penalty_basis"] {
  order: 7;
}
.policy-detail-fields > [data-field="remarks"] {
  order: 8;
}
.policy-detail-fields > [data-field="start_day"] {
  order: 9;
}
.policy-detail-fields.policy-detail-fields--starting > [data-field="start_day"] {
  order: 4;
}
.policy-detail-fields.policy-detail-fields--starting > [data-field="is_active"] {
  order: 5;
}
.policy-detail-fields.policy-detail-fields--starting > [data-field="remarks"] {
  order: 6;
}

@media (min-width: 768px) {
  .policy-detail-fields.policy-detail-fields--compact-remarks > [data-field="remarks"] {
    flex: 0 0 auto;
    width: 33.333333%;
  }
}
@media (max-width: 767.98px) {
  #policyModal {
    padding: 0.75rem;
  }
  #policyModal .modal-dialog {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    margin: 0 auto;
  }
  #policyModal .modal-content {
    max-height: calc(100vh - 1.5rem);
    border-radius: 16px;
  }
  #policyModal .modal-body {
    padding: 12px;
  }
  #policyModal .purchase-detail-card .card-body {
    padding: 10px 12px;
  }
  #weekOffModal {
    padding: 0.75rem;
  }
  #weekOffModal .modal-dialog {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    margin: 0 auto;
  }
  #weekOffModal .modal-content {
    max-height: calc(100vh - 1.5rem);
    border-radius: 16px;
  }
  #weekOffModal .modal-body {
    padding: 12px;
  }
  #weekOffModal .purchase-detail-card .card-body {
    padding: 10px 12px;
  }
  #holidayModal {
    padding: 0.75rem;
  }
  #holidayModal .modal-dialog {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    margin: 0 auto;
  }
  #holidayModal .modal-content {
    max-height: calc(100vh - 1.5rem);
    border-radius: 16px;
  }
  #holidayModal .modal-body {
    padding: 12px;
  }
  #penaltyModal {
    padding: 0.75rem;
  }
  #penaltyModal .modal-dialog {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    margin: 0 auto;
  }
  #penaltyModal .modal-content {
    max-height: calc(100vh - 1.5rem);
    border-radius: 16px;
  }
  #penaltyModal .modal-body {
    padding: 12px;
  }
}
#leaveModal table.table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e2e8f0;
  background: #1f2937;
  border-bottom: 1px solid #0f172a;
  padding: 0.6rem 0.75rem;
  white-space: nowrap;
}
#leaveModal table.table tbody td {
  padding: 0.7rem 0.75rem;
  vertical-align: middle;
}
#leaveModal table.table tbody tr {
  border-color: #f1f5f9;
}
#leaveModal table.table tbody tr:hover {
  background: #f8fafc;
}
#leaveModal table.table .badge {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}
#leaveModal table.table td .text-muted.small {
  font-size: 0.75rem;
}
#leaveModal table.table td .btn {
  min-width: 96px;
}
#leaveModal table.table td:last-child {
  min-width: 140px;
}
#leaveModal table.table td:last-child form {
  margin: 0;
}
#leaveModal table.table td:last-child .form-control {
  min-width: 120px;
}
#leaveModal .table-card .form-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #2a3b5c;
  margin-bottom: 4px;
  display: block;
}
#leaveModal .table-card .form-control,
#leaveModal .table-card .form-select,
#leaveModal .table-card textarea {
  border-radius: 10px;
  border: 1px solid #dbe3f3;
  min-height: 42px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
#leaveModal .table-card .form-control::placeholder,
#leaveModal .table-card textarea::placeholder {
  color: #94a3b8;
}
#leaveModal .table-card .form-control[readonly] {
  background: #f1f5f9;
}
#leaveModal .table-card .btn {
  border-radius: 10px;
  font-weight: 700;
}
#leaveModal .table-card .btn-outline-danger {
  border-width: 1px;
}
#leaveModal .table-card .form-control.border-0 {
  border: 0 !important;
  box-shadow: none;
  background: transparent;
  min-height: 36px;
  padding: 4px 6px;
}
#leaveModal .table-card input[type="date"].form-control {
  padding: 6px 10px;
}
#leaveModal .table-card textarea.form-control {
  min-height: 80px;
  resize: vertical;
}
#leaveModal .employee-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}
#leaveModal .employee-card.is-loading,
#leaveModal .employee-card.empty {
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}
#leaveModal .employee-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
#leaveModal .employee-card-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 1rem;
}
#leaveModal .employee-card-sub {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
#leaveModal .employee-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
#leaveModal .employee-card-field {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
}
#leaveModal .employee-card-field span {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#leaveModal .employee-card-field strong {
  display: block;
  margin-top: 2px;
  font-weight: 600;
  color: #0f172a;
  font-size: 0.88rem;
  word-break: break-word;
}
#leaveModal .employee-card-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#leaveModal .employee-card-actions .action-stack {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}
#leaveModal .employee-card-list {
  display: none;
}
#leaveModal .employee-mobile-controls-bottom {
  display: none;
}
#leaveModal .employee-table-wrap table {
  display: table;
}

/* Apply same dark header style to Leave Balances card outside modal */
#leaveBalancesCard table.table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e2e8f0;
  background: #1f2937;
  border-bottom: 1px solid #0f172a;
  padding: 0.6rem 0.75rem;
  white-space: nowrap;
}
@media (max-width: 767.98px) {
  #employeeFormModal .modal-dialog {
    width: calc(100vw - 1.5rem);
  }
  .purchase-detail-modal .modal-content {
    border-radius: 16px;
    background: #f5f8ff;
    border: 1px solid #dbe3f3;
    box-shadow: 0 20px 60px rgba(20, 35, 80, 0.25);
    max-height: calc(100vh - clamp(32px, 8vw, 96px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #leaveModal .employee-card-list {
    display: grid;
    margin-top: 8px;
    padding: 0 10px 10px;
    gap: 12px;
  }
  #leaveModal .employee-table-wrap table {
    display: none;
  }
  #leaveModal .employee-mobile-controls-bottom {
    display: block;
    margin-top: 8px;
    padding: 0 10px 10px;
  }
  #leaveModal .employee-card-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  #leaveModal .employee-card-field {
    background: #fff;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 8px 0;
  }
}
@media (max-width: 768px) {
.hrm-employee-page .employee-card-field {
    background: #fff;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0px;
    padding: 8px;
}
.hrm-employee-page .employee-card-grid { gap: 5px;}
.hrm-employee-page{padding: 0;}
.hrm-employee-page .action-btn-uniform {min-width: 80px;}
.hrm-employee-page.hrm-leaves .dash-card .header-actions {
    flex: 0 auto;
    align-self: center;
    margin-top: 10px;
    justify-content: space-between;
}
#leaveRulesTable td{white-space: nowrap;  
  overflow: hidden;    
  text-overflow: ellipsis; 
  max-width: 100px; }
}
