/* D8F HR & People Workspace v0.53.92 — Complete Base + Dark & Light Theme Parity + Pop-up Profile Modal */
.hr-people-workspace { width: 100%; min-width: 0; }
.hr-people-workspace .page-head { align-items: center; gap: 16px; }
.hr-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hr-people-workspace .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--btn-secondary-border, #334361);
  border-radius: 8px;
  background: var(--btn-secondary-bg, #182234);
  color: var(--btn-secondary-color, #f8fafc);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hr-people-workspace .ghost:hover:not(:disabled) {
  background: var(--color-primary-soft, rgba(79, 70, 229, 0.16));
  border-color: var(--color-primary, #4f46e5);
  color: var(--color-foreground, #f8fafc);
}
.hr-people-workspace .ghost.compact {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
}
.hr-people-workspace .ghost.icon-only {
  min-width: 36px;
  min-height: 36px;
  padding: 4px;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.hr-people-workspace .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.hr-directory-metrics,
.hr-profile-metrics {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 14px !important;
}
.hr-metric {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 4px !important;
  padding: 14px 16px !important;
  border-radius: 12px !important;
  background: var(--card-bg, #151e2e) !important;
  border: 1px solid var(--card-border, #26334d) !important;
  box-shadow: var(--shadow-card, 0 6px 20px rgba(0, 0, 0, 0.18)) !important;
}
.hr-metric span {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--color-muted, #94a3b8) !important;
}
.hr-metric strong {
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  color: var(--color-foreground, #f8fafc) !important;
  line-height: 1.2 !important;
  font-variant-numeric: tabular-nums !important;
}
.hr-metric small {
  font-size: 11.5px !important;
  color: var(--color-muted, #94a3b8) !important;
}

/* Directory Filter Bar & Avatar Identity */
.hr-directory-filters {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  gap: 12px !important;
  margin: 14px 0 !important;
}
.hr-directory-filters label,
.hr-range-form label {
  display: grid !important;
  gap: 6px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: var(--label-color, #cbd5e1) !important;
  margin: 0 !important;
}
.hr-directory-filters .hr-search {
  flex: 1 1 260px !important;
  min-width: 220px !important;
}
.hr-directory-filters label:not(.hr-search) {
  flex: 0 1 190px !important;
  min-width: 155px !important;
}
.hr-directory-filters input,
.hr-directory-filters select,
.hr-range-form input {
  min-height: 38px !important;
  height: 38px !important;
  width: 100% !important;
  padding: 6px 12px !important;
  border: 1px solid var(--input-border, #2e3d59) !important;
  border-radius: 8px !important;
  background: var(--input-bg, #0f1726) !important;
  color: var(--input-color, #f8fafc) !important;
}
.hr-directory table .person-identity,
.person-identity {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.hr-directory .person-identity > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.hr-directory table td {
  vertical-align: middle;
}
.hr-directory tr[hidden],
.hr-people-workspace [hidden] {
  display: none !important;
}
.hr-person-panel .person-heading {
  display: flex !important;
  gap: 14px !important;
  align-items: center !important;
  min-width: 0 !important;
}
.hr-person-panel .person-heading h2 {
  margin: 2px 0 !important;
}
.hr-avatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(59, 130, 246, 0.18) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.35) !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
}
.hr-avatar-large {
  width: 52px !important;
  height: 52px !important;
  font-size: 1.25rem !important;
  border-radius: 14px !important;
}

/* Employee Profile Detail Pop-up Modal */
.hr-person-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: var(--modal-backdrop, rgba(5, 8, 17, 0.76)) !important;
  backdrop-filter: blur(5px) !important;
  z-index: 1150 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}
.hr-person-panel.is-modal-panel,
.plan-editor.is-modal-panel {
  width: min(980px, 94vw) !important;
  max-height: 88vh !important;
  overflow-y: auto !important;
  background: var(--modal-bg, #151e2e) !important;
  color: var(--color-foreground, #f8fafc) !important;
  border: 1px solid var(--card-border, #26334d) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48) !important;
  padding: 22px 26px !important;
  margin: 0 !important;
  z-index: 1151 !important;
}
.hr-person-modal-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border, #26334d);
  margin-bottom: 12px;
}
.hr-profile-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  background: var(--color-surface-elevated, #1e293b);
  border-radius: 10px;
  border: 1px solid var(--color-border, #26334d);
  margin-bottom: 16px;
}
.hr-profile-tabs .tab {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted, #94a3b8);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.hr-profile-tabs .tab:hover {
  color: var(--color-foreground, #f8fafc);
  background: rgba(148, 163, 184, 0.12);
}
.hr-profile-tabs .tab.active {
  background: var(--btn-primary-bg, #315ce9) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(49, 92, 233, 0.3) !important;
}
.hr-overview-layout,
.hr-finance-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.hr-detail-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--color-surface-elevated, #1e293b);
  border: 1px solid var(--color-border, #26334d);
}
.hr-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}
.hr-facts > div {
  padding: 8px 10px;
  background: var(--card-bg, #151e2e);
  border: 1px solid var(--color-border, #26334d);
  border-radius: 8px;
}
.hr-facts dt {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted, #94a3b8);
  text-transform: uppercase;
}
.hr-facts dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-foreground, #f8fafc);
  overflow-wrap: anywhere;
}

/* Bank Cards, Compensation Rows, Assignments & Schedules inside HR */
.hr-assignment-stack,
.hr-schedule-stack {
  display: grid;
  gap: 10px;
}
.hr-assignment {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--card-bg, #151e2e);
  border: 1px solid var(--color-border, #26334d);
  border-radius: 10px;
}
.hr-schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card-bg, #151e2e);
  border: 1px solid var(--color-border, #26334d);
  border-radius: 10px;
  font-size: 0.85rem;
}
.hr-compensation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--color-border, #26334d);
  border-radius: 10px;
  background: var(--card-bg, #151e2e);
  margin-bottom: 8px;
}
.hr-compensation-row p {
  margin: 4px 0 0;
}
.hr-bank-card {
  border: 1px solid var(--color-border, #26334d);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0;
  background: var(--card-bg, #151e2e);
}
.hr-bank-card.is-default {
  border-color: rgba(59, 130, 246, 0.48);
  background: rgba(59, 130, 246, 0.08);
}
.hr-bank-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.hr-bank-main > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.hr-bank-main p {
  margin: 4px 0 8px;
  color: var(--color-muted, #94a3b8);
}
.hr-bank-symbol {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  font-weight: 700;
}
.hr-bank-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hr-bank-card > .hr-actions {
  margin-top: 10px;
}
.hr-default-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  font-weight: 600;
}
.hr-bank-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--color-warning, #fbbf24);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.83rem;
  margin-bottom: 10px;
}
.hr-receiver-qr {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--color-border, #26334d);
}
.hr-receiver-qr img {
  width: 148px;
  height: 148px;
  flex-shrink: 0;
  object-fit: contain;
  background: #ffffff;
  padding: 6px;
  border-radius: 8px;
}
.hr-receiver-qr figcaption {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.hr-range-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 14px;
}

/* Ensure creation/edit modals opened from inside Profile Modal sit on top */
details.hr-editor[open]::before {
  z-index: 1250 !important;
}
details.hr-editor[open] > :not(summary) {
  z-index: 1251 !important;
}
details.hr-editor[open] > summary::after {
  z-index: 1252 !important;
}

.hr-editor .people-operations {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}
.hr-editor .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hr-editor .span-all {
  grid-column: 1 / -1;
}

@media (max-width: 960px) {
  .hr-directory-metrics,
  .hr-profile-metrics,
  .hr-overview-layout,
  .hr-finance-layout,
  .hr-editor .people-operations {
    grid-template-columns: 1fr !important;
  }
}
