/* THRS EMPLOYEES V2 — Executive People Workspace
 * A second-pass compositional redesign, not merely color polish.
 * All selectors are scoped to Employees or its two body portals.
 * Do not fabricate employee data, mutate permissions, or change behavior.
 */
html[data-theme="light"] .thrs-page-employees {
  --e2-ink:#142d49;--e2-muted:#526c85;--e2-bg:#f4f7fc;
  --e2-white:#ffffff;--e2-line:#d2deeb;--e2-accent:#9a6b25;
  --e2-shadow:0 16px 42px rgba(12,42,72,.095);
  --e2-glow:0 7px 22px rgba(12,39,66,.08);
}
html[data-theme="dark"] .thrs-page-employees {
  --e2-ink:#f3f8ff;--e2-muted:#c4d5e9;--e2-bg:#0d2339;
  --e2-white:#13324d;--e2-line:#547591;--e2-accent:#f1cf87;
  --e2-shadow:0 18px 45px rgba(0,0,0,.37);
  --e2-glow:0 7px 22px rgba(0,0,0,.24);
}
html[data-theme] .thrs-page-employees {
  gap:clamp(16px,1.55vw,24px) !important;
  max-width:1720px !important;
  margin-inline:auto !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero {
  display:grid !important;
  grid-template-columns:minmax(0,1.17fr) minmax(360px,.85fr) !important;
  min-height:228px !important;
  padding:clamp(27px,2.75vw,43px) clamp(26px,3.3vw,52px) !important;
  gap:clamp(16px,2.3vw,35px) !important;
  border-radius:26px !important;
  border:1px solid #b3915b !important;
  box-shadow:0 28px 52px rgba(8,34,62,.23) !important;
  background:
    radial-gradient(ellipse at 76% 5%,rgba(208,174,103,.16),transparent 41%),
    linear-gradient(110deg,rgba(3,18,37,.23),transparent 48%),
    linear-gradient(119deg,#163f64 0%,#0c2a47 54%,#071b31 100%) !important;
}
html[data-theme="dark"] .thrs-page-employees .thrs-employee-central-hero {
  background:
    radial-gradient(ellipse at 79% 0%,rgba(219,179,100,.12),transparent 40%),
    linear-gradient(110deg,rgba(0,7,20,.24),transparent 51%),
    linear-gradient(119deg,#0d2b4b 0%,#081c33 61%,#061427 100%) !important;
  border-color:#876d4d !important;
  box-shadow:0 28px 60px rgba(0,0,0,.43) !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero::before {
  background:
    repeating-linear-gradient(90deg,transparent 0 78px,rgba(216,238,255,.045) 79px,transparent 80px),
    repeating-linear-gradient(0deg,transparent 0 60px,rgba(216,238,255,.03) 61px,transparent 62px) !important;
  opacity:.32 !important;
  mask-image:linear-gradient(100deg,transparent 12%,#000 88%) !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero::after {
  background:transparent !important;
  background-image:none !important;
  border-color:rgba(230,195,124,.12) !important;
  opacity:.55 !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-page-header-copy {
  display:flex !important;flex-direction:column !important;
  justify-content:center !important;align-items:flex-start !important;
  gap:9px !important;min-width:0 !important;
  padding-inline-start:18px !important;
  border-inline-start:3px solid #dcb36b !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-eyebrow {
  color:#f8ddaa !important;
  background:rgba(10,35,58,.59) !important;
  border:1px solid rgba(226,195,130,.57) !important;
  letter-spacing:.09em !important;
  min-height:29px !important;
  padding:6px 13px !important;
  margin:0 !important;
  font-size:11px !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero .page-title {
  font-size:clamp(36px,3.4vw,54px) !important;
  line-height:1.15 !important;
  margin:5px 0 !important;
  letter-spacing:-.035em !important;
  font-weight:900 !important;
  color:#fff !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-page-subtitle {
  font-size:14px !important;
  color:#dceaf8 !important;
  line-height:1.6 !important;
  font-weight:620 !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-page-header-actions {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  justify-content:stretch !important;
  gap:12px !important;
  min-width:0 !important;
  padding:15px !important;
  border-radius:19px !important;
  background:rgba(4,22,41,.62) !important;
  border:1px solid rgba(175,203,233,.28) !important;
  box-shadow:0 16px 31px rgba(0,12,28,.15),inset 0 1px 0 rgba(255,255,255,.08) !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero .emp-search-wrap {
  width:100% !important;
  flex:unset !important;
  max-width:none !important;
  min-width:0 !important;
  min-height:57px !important;
  padding-inline:13px !important;
  border-radius:13px !important;
  background:rgba(235,244,255,.10) !important;
  border:1px solid rgba(186,215,238,.46) !important;
  box-shadow:inset 0 2px 3px rgba(0,0,0,.08) !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero .emp-search-input {
  min-height:55px !important;
  font-size:13px !important;
  font-weight:650 !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-btn {
  min-width:160px !important;
  min-height:57px !important;
  justify-content:center !important;
  border-radius:13px !important;
  box-shadow:0 9px 20px rgba(0,9,19,.20) !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-btn .thrs-btn-label {
  font-size:13px !important;
  letter-spacing:0 !important;
}

/* Filter station as an integrated enterprise command band. */
html[data-theme] .thrs-page-employees .thrs-filter-command-bar {
  min-height:84px !important;
  padding:16px clamp(17px,1.9vw,26px) !important;
  gap:clamp(10px,1.4vw,17px) !important;
  grid-template-columns:minmax(170px,.72fr) repeat(3,minmax(140px,1fr)) auto !important;
  border-radius:19px !important;
  box-shadow:var(--e2-shadow) !important;
  border-inline-start:4px solid #d0a45b !important;
}
html[data-theme="light"] .thrs-page-employees .thrs-filter-command-bar {
  background:linear-gradient(120deg,#ffffff,#f6f9fd) !important;
}
html[data-theme="dark"] .thrs-page-employees .thrs-filter-command-bar {
  background:linear-gradient(120deg,#183a56,#112b44) !important;
}
html[data-theme] .thrs-page-employees .thrs-filter-title {
  font-size:14px !important;
  font-weight:840 !important;
  line-height:1.45 !important;
  gap:9px !important;
}
html[data-theme] .thrs-page-employees .thrs-filter-command-bar .form-select {
  min-height:49px !important;
  padding-inline:15px 30px !important;
  font-weight:690 !important;
  font-size:13px !important;
  border-radius:12px !important;
}
html[data-theme] .thrs-page-employees .thrs-clear-filter-btn {
  min-height:49px !important;
  padding-inline:15px !important;
}
/* Staff command dashboard: metrics become more legible, with restrained light/dark tints. */
html[data-theme] .thrs-page-employees .emp-stats-grid {
  gap:14px !important;
}
html[data-theme] .thrs-page-employees .emp-stat-card {
  grid-template-columns:60px minmax(0,1fr) !important;
  gap:6px 15px !important;
  min-height:174px !important;
  padding:25px 22px !important;
  border-radius:20px !important;
  box-shadow:var(--e2-shadow) !important;
  border-top-width:4px !important;
}
html[data-theme] .thrs-page-employees .emp-stat-card::before {
  width:148px !important;height:148px !important;
  top:-103px !important;inset-inline-end:-82px !important;
  opacity:.24 !important;
}
html[data-theme] .thrs-page-employees .emp-stat-card::after {
  height:3px !important;opacity:.8 !important;
}
html[data-theme] .thrs-page-employees .emp-stat-icon {
  width:57px !important;height:57px !important;
  border-radius:17px !important;
}
html[data-theme] .thrs-page-employees .emp-stat-value {
  font-size:clamp(40px,3vw,53px) !important;
  letter-spacing:-.055em !important;
  font-weight:900 !important;
  line-height:1 !important;
}
html[data-theme] .thrs-page-employees .emp-stat-label {
  font-size:13.5px !important;
  font-weight:775 !important;
  line-height:1.45 !important;
}

/* Directory view: navy board header, crisp row cards, usable action panel. */
html[data-theme] .thrs-page-employees .thrs-employee-table-card {
  border-radius:23px !important;
  box-shadow:0 17px 42px rgba(10,34,61,.12) !important;
  position:relative !important;
  overflow:hidden !important;
}
html[data-theme="dark"] .thrs-page-employees .thrs-employee-table-card {
  box-shadow:0 17px 45px rgba(0,0,0,.42) !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-table-wrap {
  max-height:min(72vh,850px) !important;
  border-radius:22px 22px 0 0 !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-table {
  min-width:1040px !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-table thead th {
  height:66px !important;
  padding:19px 18px !important;
  font-size:12px !important;
  font-weight:870 !important;
  letter-spacing:.063em !important;
  color:#e7effa !important;
  background:linear-gradient(120deg,#173d5f,#0d2a46) !important;
  border-block-end:2px solid #ba9251 !important;
  box-shadow:none !important;
}
html[data-theme="dark"] .thrs-page-employees .thrs-employee-table thead th {
  background:linear-gradient(120deg,#244968,#173652) !important;
  color:#f4f8ff !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-table tbody tr {
  height:94px !important;
  transition:box-shadow .18s ease;
}
html[data-theme] .thrs-page-employees .thrs-employee-table tbody td {
  padding:15px 18px !important;
  min-height:93px !important;
  font-size:13px !important;
}
html[data-theme="light"] .thrs-page-employees .thrs-employee-table tbody tr:nth-child(2n) td {
  background:#f4f8fd !important;
}
html[data-theme="dark"] .thrs-page-employees .thrs-employee-table tbody tr:nth-child(2n) td {
  background:#1a3b56 !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-table tbody tr:hover td:first-child {
  box-shadow:inset 4px 0 0 #d6a85c !important;
}
html[dir="rtl"][data-theme] .thrs-page-employees .thrs-employee-table tbody tr:hover td:first-child {
  box-shadow:inset -4px 0 0 #d6a85c !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-avatar {
  width:53px !important;height:53px !important;flex-basis:53px !important;
  border-radius:16px !important;
  font-size:14px !important;
  box-shadow:0 8px 18px rgba(130,99,45,.12) !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-identity-cell {
  gap:14px !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-name {
  font-size:15px !important;
  line-height:1.4 !important;
  font-weight:870 !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-meta {
  font-size:11.5px !important;
  letter-spacing:.02em;
  font-weight:730 !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-email {
  font-size:12.5px !important;
  max-width:260px;
}
html[data-theme] .thrs-page-employees .thrs-employee-department {
  font-size:14px !important;
  font-weight:790 !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-position {
  font-size:12.5px !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-role-chip {
  font-size:11px !important;
  border-radius:9px !important;
  padding-inline:10px !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-table .badge {
  min-height:28px !important;
  border-radius:10px !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-actions {
  gap:8px !important;
}
html[data-theme="light"] .thrs-page-employees .thrs-employee-actions .action-btn-edit {
  background:linear-gradient(120deg,#163d60,#103251) !important;
  border-color:#426786 !important;
}
html[data-theme="dark"] .thrs-page-employees .thrs-employee-actions .action-btn-edit {
  background:linear-gradient(120deg,#2c71a9,#205786) !important;
  border-color:#6b9fc4 !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-actions .action-btn-edit {
  min-height:42px !important;
  padding:9px 14px !important;
  font-size:12px !important;
  border-radius:11px !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-more-btn {
  width:42px !important;height:42px !important;
  min-height:42px !important;
}
html[data-theme] .thrs-page-employees .thrs-employee-table-card .pagination-bar {
  min-height:82px !important;
  padding-inline:25px !important;
}
html[data-theme] .thrs-page-employees .pagination-btn {
  min-width:39px !important;height:39px !important;
}
html[data-theme] .thrs-page-employees .pagination-info {
  font-size:13px !important;
  font-weight:670 !important;
}
html[data-theme="light"] .thrs-page-employees .thrs-table-empty-cell {
  background:#f6f9fd !important;
}
html[data-theme="dark"] .thrs-page-employees .thrs-table-empty-cell {
  background:#112e49 !important;
}
/* Form: a more polished wizard-like document, without adding steps or hiding required fields. */
html[data-theme] .thrs-modal-overlay > .employee-edit-modal-card {
  border-radius:26px !important;
  box-shadow:0 36px 90px rgba(0,13,31,.44) !important;
}
html[data-theme] .employee-edit-modal-card .employee-edit-modal-body {
  scrollbar-width:thin;
}
html[data-theme] .employee-edit-modal-card .employee-edit-hero {
  min-height:119px !important;
  padding:24px !important;
  border-radius:20px !important;
  border-inline-start:4px solid #d9ad63 !important;
}
html[data-theme] .employee-edit-modal-card .employee-edit-avatar {
  width:68px !important;height:68px !important;
  border-radius:20px !important;
  font-size:19px !important;
}
html[data-theme] .employee-edit-modal-card .employee-form-section {
  padding:22px !important;
  border-radius:19px !important;
}
html[data-theme] .employee-edit-modal-card .employee-form-section-head {
  padding-bottom:16px !important;
}
html[data-theme] .employee-edit-modal-card .employee-form-section-head > span {
  min-width:42px !important;
  width:42px !important;height:42px !important;
  border-radius:13px !important;
}
html[data-theme] .employee-edit-modal-card .employee-form-section-head h4 {
  font-size:17px !important;
}
html[data-theme] .employee-edit-modal-card .form-group .form-label {
  font-size:13px !important;
}
html[data-theme] .employee-edit-modal-card :is(.form-input,.form-select,.form-textarea) {
  min-height:48px !important;
  border-radius:12px !important;
  padding-inline:13px !important;
  font-size:13px !important;
}
html[data-theme] .employee-edit-modal-card .employee-form-grid {
  column-gap:18px !important;
  row-gap:19px !important;
}
html[data-theme] .employee-edit-modal-card .employee-edit-footer {
  padding-block:18px !important;
}
html[data-theme] .employee-edit-modal-card .employee-edit-footer .thrs-btn {
  min-height:48px !important;
}
/* Maintain no toolbar or body overflow in Arabic and on smaller devices. */
@media(max-width:1430px) {
  html[data-theme] .thrs-page-employees .thrs-employee-central-hero {
    grid-template-columns:minmax(0,1fr) !important;
    gap:18px !important;
  }
  html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-page-header-actions {
    max-width:920px !important;
  }
}
@media(max-width:1210px) {
  html[data-theme] .thrs-page-employees .thrs-filter-command-bar {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
  html[data-theme] .thrs-page-employees .thrs-filter-title,
  html[data-theme] .thrs-page-employees .thrs-clear-filter-btn {
    grid-column:1/-1 !important;
  }
}
@media(max-width:1040px) {
  html[data-theme] .thrs-page-employees .emp-stats-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:760px) {
  html[data-theme] .thrs-page-employees .thrs-employee-central-hero {
    min-height:0 !important;
    padding:22px 18px !important;
    gap:18px !important;
    border-radius:19px !important;
  }
  html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-page-header-copy {
    padding-inline-start:12px !important;
  }
  html[data-theme] .thrs-page-employees .thrs-employee-central-hero .page-title {
    font-size:clamp(31px,6.8vw,38px) !important;
  }
  html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-page-header-actions {
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
    padding:11px !important;
  }
  html[data-theme] .thrs-page-employees .thrs-employee-central-hero .thrs-btn {
    width:100% !important;
  }
  html[data-theme] .thrs-page-employees .thrs-filter-command-bar {
    grid-template-columns:minmax(0,1fr) !important;
  }
  html[data-theme] .thrs-page-employees .thrs-filter-title,
  html[data-theme] .thrs-page-employees .thrs-clear-filter-btn {
    grid-column:1 !important;
  }
  html[data-theme] .thrs-page-employees .emp-stat-card {
    min-height:135px !important;
    padding:14px !important;
    grid-template-columns:44px minmax(0,1fr) !important;
    gap:6px 10px !important;
  }
  html[data-theme] .thrs-page-employees .emp-stat-icon {
    width:43px !important;height:43px !important;
  }
  html[data-theme] .thrs-page-employees .emp-stat-value {
    font-size:clamp(28px,6.6vw,38px) !important;
  }
  html[data-theme] .thrs-page-employees .emp-stat-label {
    font-size:11.5px !important;
  }
  html[data-theme] .employee-edit-modal-card .employee-edit-hero {
    min-height:0 !important;
    padding:16px !important;
  }
  html[data-theme] .employee-edit-modal-card .employee-form-section {padding:15px !important;}
  html[data-theme] .employee-edit-modal-card .employee-form-grid {grid-template-columns:minmax(0,1fr) !important;}
}
@media(prefers-reduced-motion:reduce) {
  html[data-theme] .thrs-page-employees :is(.emp-stat-card,.thrs-employee-table tbody tr),
  html[data-theme] .employee-edit-modal-card :is(input,button,select) {
    transition:none !important;
  }
}

/* Intermediate widths retain the directory in one view when space permits.
   Smaller screens still scroll the table within its own panel. */
@media(min-width:761px) and (max-width:1210px) {
  html[data-theme] .thrs-page-employees .thrs-employee-table {
    min-width:990px !important;
  }
}
