/* ============================================================
   EMPLOYEES PAGE STYLES
   ============================================================ */

/* Sticky Monitoring Toolbar */
.monitoring-toolbar {
  position: sticky;
  top: var(--topbar-height, 64px);
  z-index: 40;
  background-color: var(--bg, #f8fafc);
  border-bottom: 1px solid var(--border);
  margin: 48px 0 24px 0;
  padding: 16px 0;
}

/* Cover the margin-top gap when sticky so rows don't show through */
.monitoring-toolbar::before {
  content: '';
  position: absolute;
  top: -48px;
  left: 0;
  right: 0;
  height: 48px;
  background-color: var(--bg, #f8fafc);
  z-index: -1;
}

.monitoring-toolbar .filter-bar {
  margin-bottom: 12px;
}

/* Sticky Table Headers & Wrap */
.employee-table-wrap {
  overflow: visible;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.employee-table {
  border-collapse: separate !important;
  border-spacing: 0 6px !important;
}

.employee-table thead th {
  position: sticky;
  top: 0;
  background-color: var(--bg, #f8fafc) !important;
  z-index: 10;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Cover the transparent gap caused by border-spacing when scrolling */
.employee-table thead th::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 8px;
  background-color: var(--bg, #f8fafc);
  z-index: -1;
}

/* Make Entire Row Clickable - Premium Card Style */
.employee-table tbody tr {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  background-color: var(--surface, #ffffff);
  border-bottom: none !important;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.03), 0 1px 3px -1px rgba(0, 0, 0, 0.02);
  border-radius: 12px;
}

.employee-table tbody td {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: transparent;
  transition: all 0.3s ease;
}

.employee-table tbody td:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.employee-table tbody td:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.employee-table tbody tr:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.12), 0 4px 8px -4px rgba(0, 0, 0, 0.08);
  z-index: 2; /* To elevate the shadow */
}

/* Critical Employee Visualization */
.employee-table tbody tr.row-critical td {
  background-color: rgba(220, 38, 38, 0.05);
  border-top-color: rgba(220, 38, 38, 0.15);
  border-bottom-color: rgba(220, 38, 38, 0.15);
}
.employee-table tbody tr.row-critical td:last-child {
  border-right-color: rgba(220, 38, 38, 0.15);
}
.employee-table tbody tr.row-critical td:first-child {
  border-left: 3px solid var(--danger) !important;
}
.employee-table tbody tr.row-critical:hover td {
  background-color: rgba(220, 38, 38, 0.08);
}

/* Arrow Reveal Animation */
.row-arrow {
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.2s ease;
  color: var(--text-tertiary);
}
.employee-table tbody tr:hover .row-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Cell Alignments */
.employee-table .col-actions {
  text-align: right;
  width: 120px;
}

.nat-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nat-flag {
  font-size: 16px;
}

.doc-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.doc-number {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.doc-expiry {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* Compliance Health Indicator */
.compliance-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.comp-icon {
  display: flex;
  align-items: center;
}

.comp-healthy {
  background-color: rgba(13, 159, 110, 0.1);
  color: var(--secondary);
}
.comp-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}
.comp-critical {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.comp-score {
  opacity: 0.7;
  font-weight: 500;
  margin-left: 4px;
}

/* Contextual Button */
.visa-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  white-space: nowrap;
  background-color: var(--primary-muted, rgba(11, 46, 131, 0.08));
  color: var(--primary);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.visa-app-btn:hover {
  background-color: var(--primary-subtle, #EEF2FF);
  border-color: rgba(11, 46, 131, 0.15);
  transform: translateY(-1px);
}

.visa-app-btn svg {
  flex-shrink: 0;
}

/* Enterprise Pagination */
.enterprise-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}
.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-num-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.page-num-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.page-num-btn.active {
  background: var(--primary);
  color: white;
}
