.staff-settings-chip, .staff-settings-chip:focus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  color: #4b5563;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.staff-settings-chip:hover,
.staff-settings-chip:focus-visible {
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.staff-settings-chip.active {
  background-color: #2563eb;
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 10px 20px -12px rgba(37, 99, 235, 0.65);
}

.staff-settings-password-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}

.staff-settings-password-badge.is-set {
  background-color: #ecfdf5;
  color: #047857;
  border-color: rgba(16, 185, 129, 0.25);
}

.staff-settings-password-badge.is-unset {
  background-color: #fef2f2;
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.25);
}

#staffSettingsTable {
  table-layout: fixed;
  width: 100%;
  min-width: 1440px;
}

#staffSettingsTable th,
#staffSettingsTable td {
  text-align: center !important;
  vertical-align: middle;
}

#staffSettingsTable thead th {
  position: relative;
}

#staffSettingsTable thead th button.staff-settings-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

#staffSettingsTable thead th button.staff-settings-sort .sort-icon {
  font-size: 14px;
  color: #94a3b8;
  transition: color 0.2s ease;
}

#staffSettingsTable thead th button.staff-settings-sort.active .sort-icon {
  color: #2563eb;
}

#staffSettingsTable tbody tr:hover {
  background-color: rgba(59, 130, 246, 0.05);
  transition: background-color 0.15s ease;
}

#staffSettingsTable td,
#staffSettingsTable th {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  vertical-align: middle;
}

.staff-settings-checkbox-cell {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  padding: 4px 6px !important;
  text-align: center !important;
}

#staffSettingsTable th.staff-settings-name-cell,
#staffSettingsTable td.staff-settings-name-cell {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
}

#staffSettingsTable th.staff-settings-company-cell,
#staffSettingsTable td.staff-settings-company-cell {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
}

#staffSettingsTable th.staff-settings-department-cell,
#staffSettingsTable td.staff-settings-department-cell,
#staffSettingsTable th.staff-settings-date-cell,
#staffSettingsTable td.staff-settings-date-cell,
#staffSettingsTable th.staff-settings-id-cell,
#staffSettingsTable td.staff-settings-id-cell,
#staffSettingsTable th.staff-settings-password-cell,
#staffSettingsTable td.staff-settings-password-cell {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
}

#staffSettingsTable th.staff-settings-permission-cell,
#staffSettingsTable td.staff-settings-permission-cell {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
}

#staffSettingsTable th.staff-settings-memo-cell,
#staffSettingsTable td.staff-settings-memo-cell {
  min-width: 200px !important;
}

.staff-settings-row-checkbox,
#staffSettingsSelectAll {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

#staff-settings-content .staff-settings-checkbox-cell input[type="checkbox"],
#staff-settings-content thead th input[type="checkbox"] {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  transform: none !important;
}

#staffSettingsTable th.staff-settings-actions-cell,
#staffSettingsTable td.staff-settings-actions-cell {
  width: 80px !important;
  min-width: 80px !important;
  max-width: 80px !important;
  text-align: center !important;
}

#staffSettingsTable td.staff-settings-actions-cell .staff-settings-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

#staffSettingsTable tbody td:first-child {
  vertical-align: middle !important;
}

.staff-settings-id-cell {
  white-space: normal;
}

.staff-settings-id-reason {
  margin-top: 2px;
  font-size: 12px;
  color: #ef4444;
  line-height: 1.3;
}

#employeeTableBasic th,
#employeeTableBasic td,
#employeeTableContact th,
#employeeTableContact td,
#employeeTableWorkdate th,
#employeeTableWorkdate td,
#employeeTableCertificate th,
#employeeTableCertificate td {
  text-align: center !important;
  vertical-align: middle;
}

#employeeTableWorkdate td[id^="employee-work-days-"] {
  text-align: right !important;
}

#employeeTableWorkdate th[data-column="insa_work_days"] {
  text-align: center !important;
}

#staffSettingsModalRoot .ss-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2500;
  backdrop-filter: blur(2px);
}

#staffSettingsModalRoot .ss-modal {
  width: min(520px, 100%);
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 40px 70px -32px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#staffSettingsModalRoot .ss-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#staffSettingsModalRoot .ss-modal-body {
  padding: 20px 24px;
  display: grid;
  gap: 18px;
}

#staffSettingsModalRoot .ss-modal-footer {
  padding: 18px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
#staffSettingsModalRoot .ss-fixed-value-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

#staffSettingsModalRoot .ss-fixed-value-confirm {
  min-width: 70px;
  height: 38px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 10px 20px -12px rgba(37, 99, 235, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#staffSettingsModalRoot .ss-fixed-value-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -14px rgba(37, 99, 235, 0.7);
}

#staffSettingsModalRoot label.ss-field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

#staffSettingsModalRoot input.ss-input,
#staffSettingsModalRoot textarea.ss-input {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #1f2937;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  background-color: #ffffff;
}

#staffSettingsModalRoot input.ss-input:focus,
#staffSettingsModalRoot textarea.ss-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

#staffSettingsModalRoot .ss-modal-actions-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#staffSettingsModalRoot .ss-modal-actions-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.6);
}

#staffSettingsModalRoot .ss-modal-actions-secondary {
  background: #f1f5f9;
  color: #475569;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#staffSettingsModalRoot .ss-modal-actions-secondary:hover {
  background: #e2e8f0;
}

#staffSettingsModalRoot .ss-inline-hint {
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 640px) {
  #staffSettingsModalRoot .ss-modal {
    width: 100%;
    max-height: 90vh;
  }

  #staffSettingsModalRoot .ss-modal-body {
    overflow-y: auto;
  }
}

.staff-bulk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  z-index: 1050;
}

.staff-bulk-overlay.is-open {
  display: flex;
}

.staff-bulk-modal {
  width: 100%;
  max-width: 920px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.staff-bulk-modal__header {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.staff-bulk-modal__body {
  padding: 24px;
  overflow-y: auto;
}

.staff-bulk-modal__footer {
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.staff-bulk-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background: #f9fafb;
}

.staff-bulk-section--primary {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.staff-bulk-entry-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.staff-bulk-entry {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  display: flex;
  gap: 10px;
  font-size: 13px;
}

.staff-bulk-entry--error {
  border-color: #fca5a5;
  background: #fef2f2;
}

.staff-bulk-entry__checkbox {
  margin-top: 2px;
}

.staff-bulk-entry__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.staff-bulk-entry__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1f2937;
}

.staff-bulk-entry__meta {
  color: #4b5563;
}

.staff-bulk-entry__note {
  color: #2563eb;
  font-size: 12px;
}

.staff-bulk-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #1f2937;
}

.staff-bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

