/* ================= HR WORKSPACE ================= */

.hr-workspace {
  --hr-surface: #111a2d;
  --hr-surface-raised: #152139;
  --hr-border: rgba(148, 163, 184, .14);
  --hr-border-strong: rgba(96, 165, 250, .28);
  --hr-text: #f8fafc;
  --hr-muted: #91a0b8;
  --hr-blue: #4f8cff;
  --hr-green: #2dd4a3;
  --hr-amber: #f6b94b;
  --hr-red: #f87171;
  color: var(--hr-text);
  display: grid;
  gap: 14px;
  width: 100%;
}

.hr-page-header {
  align-items: center;
  background:
    radial-gradient(circle at 92% 0%, rgba(79, 140, 255, .12), transparent 34%),
    linear-gradient(135deg, #111b30, #0d1729);
  border: 1px solid var(--hr-border);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
  display: flex;
  justify-content: space-between;
  min-height: 104px;
  padding: 21px 23px;
}

.hr-page-header-compact {
  min-height: 94px;
  padding: 19px 22px;
}

.hr-eyebrow,
.hr-panel-heading > div > span {
  color: #6ea2ff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hr-page-header h1 {
  font-size: 24px;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 5px 0 6px;
}

.hr-page-header p {
  color: var(--hr-muted);
  font-size: 12px;
  margin: 0;
}

.hr-header-mark {
  align-items: center;
  background: rgba(79, 140, 255, .1);
  border: 1px solid rgba(79, 140, 255, .2);
  border-radius: 13px;
  color: #7aa8ff;
  display: flex;
  font-size: 22px;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.hr-module-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-module-card {
  align-items: center;
  background: linear-gradient(145deg, #152139, #101a2d);
  border: 1px solid var(--hr-border);
  border-radius: 13px;
  color: var(--hr-text);
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: 42px 1fr auto;
  min-height: 116px;
  padding: 18px;
  text-align: left;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.hr-module-card:hover {
  background: linear-gradient(145deg, #182640, #111d32);
  border-color: var(--hr-border-strong);
  transform: translateY(-2px);
}

.hr-module-icon {
  align-items: center;
  border: 1px solid;
  border-radius: 11px;
  display: flex;
  font-size: 16px;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.hr-module-icon-blue { background: rgba(79, 140, 255, .11); border-color: rgba(79, 140, 255, .2); color: #7aa8ff; }
.hr-module-icon-green { background: rgba(45, 212, 163, .1); border-color: rgba(45, 212, 163, .18); color: var(--hr-green); }
.hr-module-icon-amber { background: rgba(246, 185, 75, .1); border-color: rgba(246, 185, 75, .18); color: var(--hr-amber); }

.hr-module-copy strong,
.hr-module-copy small {
  display: block;
}

.hr-module-copy strong {
  font-size: 14px;
  margin-bottom: 6px;
}

.hr-module-copy small {
  color: var(--hr-muted);
  font-size: 10px;
  line-height: 1.5;
}

.hr-module-arrow {
  color: #63728a;
  font-size: 12px;
  transition: color .18s ease, transform .18s ease;
}

.hr-module-card:hover .hr-module-arrow {
  color: #91b5ff;
  transform: translateX(3px);
}

.hr-panel {
  background: linear-gradient(145deg, #111a2d, #0e1728);
  border: 1px solid var(--hr-border);
  border-radius: 13px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
}

.hr-panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.hr-panel-heading h2 {
  font-size: 16px;
  letter-spacing: -.015em;
  margin: 3px 0 0;
}

.hr-panel-heading-icon {
  color: #6ea2ff;
  font-size: 20px;
  opacity: .85;
}

.hr-back-button,
.hr-primary-button,
.hr-secondary-button,
.hr-clear-button,
.hr-row-button {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  gap: 7px;
  justify-content: center;
  text-decoration: none;
  transition: .18s ease;
}

.hr-back-button,
.hr-secondary-button,
.hr-clear-button,
.hr-row-button {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(148, 163, 184, .16);
  color: #cbd5e1;
}

.hr-back-button,
.hr-secondary-button {
  padding: 9px 12px;
}

.hr-back-button:hover,
.hr-secondary-button:hover,
.hr-clear-button:hover,
.hr-row-button:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(148, 163, 184, .27);
  color: #fff;
}

.hr-primary-button {
  background: linear-gradient(135deg, #4f8cff, #3474ea);
  border: 1px solid rgba(96, 165, 250, .35);
  color: #fff;
  padding: 9px 13px;
}

.hr-primary-button:hover {
  box-shadow: 0 8px 20px rgba(52, 116, 234, .26);
  transform: translateY(-1px);
}

.hr-toolbar-panel {
  padding: 15px 17px 17px;
}

.hr-action-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
}

.hr-action-row > div:first-child {
  display: flex;
  gap: 8px;
}

.hr-record-count {
  color: var(--hr-muted);
  font-size: 10px;
}

.hr-filter-grid {
  align-items: end;
  display: grid;
  gap: 10px;
}

.hr-user-filter-grid {
  grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(145px, 1fr)) auto;
}

.hr-team-filter-grid {
  grid-template-columns: minmax(240px, 440px) auto;
  justify-content: start;
}

.hr-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.hr-field > span {
  color: var(--hr-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.hr-field input,
.hr-field select,
.hr-input-with-icon,
.hr-member-search {
  background: #0a1323;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
  color: #e5edf9;
  font-family: inherit;
  font-size: 11px;
  height: 36px;
  min-width: 0;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  width: 100%;
}

.hr-field input,
.hr-field select,
.hr-member-search {
  padding: 0 10px;
}

.hr-field select option {
  background: #101a2d;
  color: #e5edf9;
}

.hr-field input:focus,
.hr-field select:focus,
.hr-input-with-icon:focus-within,
.hr-member-search:focus {
  border-color: rgba(79, 140, 255, .62);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, .1);
}

.hr-input-with-icon {
  align-items: center;
  display: flex;
  padding: 0 10px;
}

.hr-input-with-icon i {
  color: #66758e;
  font-size: 10px;
  margin-right: 8px;
}

.hr-input-with-icon input {
  background: transparent;
  border: 0;
  box-shadow: none;
  height: 34px;
  padding: 0;
}

.hr-input-with-icon input:focus { box-shadow: none; }

.hr-clear-button {
  height: 36px;
  padding: 0 11px;
}

.hr-table-panel {
  overflow: hidden;
}

.hr-table-heading {
  padding: 15px 17px;
}

.hr-table-wrap {
  border-top: 1px solid var(--hr-border);
  overflow: auto;
}

.hr-table {
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  min-width: 980px;
  width: 100%;
}

.hr-teams-table,
.hr-members-table {
  min-width: 680px;
}

.hr-table thead th {
  background: #101a2d;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  color: #8292aa;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .07em;
  padding: 11px 12px;
  position: sticky;
  text-align: left;
  text-transform: uppercase;
  top: 0;
  white-space: nowrap;
  z-index: 2;
}

.hr-table tbody tr {
  background: rgba(255, 255, 255, .012);
  transform: none;
  transition: background .16s ease;
}

.hr-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, .024);
}

.hr-table tbody tr:hover {
  background: rgba(79, 140, 255, .055);
  transform: none;
}

.hr-table tbody tr.disabled-row {
  opacity: .58;
}

.hr-table td {
  border-bottom: 1px solid rgba(148, 163, 184, .08);
  color: #cbd5e1;
  font-size: 11px;
  padding: 11px 12px;
  white-space: nowrap;
}

.hr-id-cell {
  color: #8292aa !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px !important;
}

.hr-primary-cell {
  color: #f1f5f9 !important;
  font-weight: 700;
}

.hr-role-badge,
.hr-file-status,
.hr-status-badge,
.hr-member-count {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 9px;
  font-weight: 700;
  gap: 5px;
  padding: 5px 8px;
  text-transform: uppercase;
}

.hr-role-badge {
  background: rgba(79, 140, 255, .1);
  border: 1px solid rgba(79, 140, 255, .2);
  color: #9fc2ff;
}

.hr-file-status.is-uploaded { color: #61deb8; }
.hr-file-status.is-missing { color: #f0a3a3; }

.hr-status-badge {
  background: rgba(148, 163, 184, .08);
  border: 1px solid rgba(148, 163, 184, .15);
  color: #aebbd0;
}

.hr-status-badge > span {
  background: currentColor;
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.hr-status-badge.is-active { color: #61deb8; }
.hr-status-badge.is-disabled { color: #f0a3a3; }

.hr-member-count {
  background: rgba(45, 212, 163, .08);
  border: 1px solid rgba(45, 212, 163, .16);
  color: #61deb8;
}

.hr-row-actions {
  display: flex;
  gap: 6px;
}

.hr-row-button {
  padding: 6px 8px;
}

.hr-row-button-danger {
  background: rgba(248, 113, 113, .08);
  border-color: rgba(248, 113, 113, .18);
  color: #f0a3a3;
}

.hr-row-button:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.hr-import-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr);
}

.hr-import-panel,
.hr-import-guide {
  padding: 18px;
}

.hr-file-drop {
  align-items: center;
  background: rgba(5, 11, 24, .4);
  border: 1px dashed rgba(96, 165, 250, .34);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 16px 0 13px;
  min-height: 175px;
  padding: 24px;
  text-align: center;
  transition: background .18s ease, border-color .18s ease;
}

.hr-file-drop:hover {
  background: rgba(79, 140, 255, .055);
  border-color: rgba(96, 165, 250, .58);
}

.hr-file-drop input {
  display: none;
}

.hr-file-icon {
  align-items: center;
  background: rgba(79, 140, 255, .11);
  border: 1px solid rgba(79, 140, 255, .2);
  border-radius: 11px;
  color: #7aa8ff;
  display: flex;
  font-size: 17px;
  height: 42px;
  justify-content: center;
  margin-bottom: 12px;
  width: 42px;
}

.hr-file-drop strong {
  font-size: 13px;
}

.hr-file-drop small {
  color: var(--hr-muted);
  font-size: 10px;
  margin-top: 5px;
}

.hr-import-actions {
  display: flex;
  justify-content: space-between;
}

.hr-checklist {
  display: grid;
  gap: 15px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.hr-checklist li {
  align-items: flex-start;
  color: #b8c4d7;
  display: grid;
  font-size: 10px;
  gap: 9px;
  grid-template-columns: 20px 1fr;
  line-height: 1.5;
}

.hr-checklist i {
  align-items: center;
  background: rgba(45, 212, 163, .1);
  border-radius: 50%;
  color: var(--hr-green);
  display: flex;
  font-size: 8px;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.hr-import-result:not(:empty) {
  margin-top: 13px;
}

.hr-result-card {
  border: 1px solid;
  border-radius: 10px;
  padding: 13px;
}

.hr-result-success {
  background: rgba(45, 212, 163, .07);
  border-color: rgba(45, 212, 163, .2);
}

.hr-result-error {
  background: rgba(248, 113, 113, .07);
  border-color: rgba(248, 113, 113, .2);
}

.hr-result-title {
  align-items: center;
  display: flex;
  font-size: 11px;
  gap: 7px;
}

.hr-result-success .hr-result-title { color: #61deb8; }
.hr-result-error .hr-result-title { color: #f0a3a3; }
.hr-result-error p { color: #d9a3a3; font-size: 10px; margin: 8px 0 0; }

.hr-result-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 11px;
}

.hr-result-metrics > div {
  background: rgba(5, 11, 24, .32);
  border-radius: 8px;
  padding: 9px;
}

.hr-result-metrics span,
.hr-result-metrics strong { display: block; }
.hr-result-metrics span { color: var(--hr-muted); font-size: 9px; }
.hr-result-metrics strong { font-size: 16px; margin-top: 3px; }

.hr-members-panel {
  overflow: hidden;
  padding-top: 15px;
}

.hr-members-panel > .hr-action-row {
  justify-content: flex-start;
  padding: 0 17px;
}

.hr-add-members {
  border-bottom: 1px solid var(--hr-border);
  border-top: 1px solid var(--hr-border);
  margin-bottom: 0;
  padding: 15px 17px;
}

.hr-member-search {
  margin-bottom: 11px;
  max-width: 360px;
}

.hr-user-grid {
  background: rgba(5, 11, 24, .35);
  border: 1px solid var(--hr-border);
  border-radius: 10px;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  max-height: 320px;
  overflow: auto;
  padding: 9px;
}

.hr-user-option {
  align-items: center;
  background: rgba(255, 255, 255, .025);
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  font-size: 10px;
  gap: 8px;
  padding: 9px;
}

.hr-user-option:hover {
  background: rgba(79, 140, 255, .06);
  border-color: rgba(79, 140, 255, .15);
}

.hr-user-option input {
  accent-color: var(--hr-blue);
}

.hr-member-actions {
  display: flex;
  gap: 7px;
  margin-top: 11px;
}

.hr-member-icon {
  color: #6ea2ff;
  font-size: 9px;
  margin-right: 7px;
}

#userModal .modal-content,
#teamModal .modal-content,
#userAccessModal .modal-content {
  border-radius: 14px;
}

@media (max-width: 1100px) {
  .hr-module-grid { grid-template-columns: 1fr; }
  .hr-user-filter-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .hr-clear-button { width: fit-content; }
  .hr-import-layout { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .hr-page-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .hr-header-mark { display: none; }
  .hr-back-button { width: 100%; }
  .hr-user-filter-grid,
  .hr-team-filter-grid { grid-template-columns: 1fr; }
  .hr-action-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .hr-import-actions { flex-direction: column; gap: 8px; }
  .hr-primary-button,
  .hr-secondary-button { width: 100%; }
  .hr-result-metrics { grid-template-columns: 1fr; }
}
