/* THRS V14.36 — Employee Schedules Premium Polish.
   Same split-pane layout, employee selection, weekly pattern, exceptions,
   actions and APIs. Only styling and typographic fixes; scope to workspace. */
html[data-theme="light"] .work-schedules-pro {
  --wse36-bg:#fff;--wse36-soft:#f7f9fc;--wse36-tint:#eef3f8;
  --wse36-ink:#102d47;--wse36-muted:#5d748b;--wse36-line:#dbe5ef;
  --wse36-gold:#bd8d4a;--wse36-shadow:0 4px 12px rgba(12,44,73,.035),0 13px 30px rgba(12,44,73,.063);
}
html[data-theme="dark"] .work-schedules-pro {
  --wse36-bg:#13334e;--wse36-soft:#1c3c56;--wse36-tint:#244661;
  --wse36-ink:#f0f6fc;--wse36-muted:#c2d2e0;--wse36-line:#395a73;
  --wse36-gold:#e6be84;--wse36-shadow:0 5px 14px rgba(0,11,25,.15),0 18px 38px rgba(0,11,25,.25);
}
html[data-theme] .work-schedules-pro .ws-workspace {
  align-items:start !important;
  gap:16px !important;
  min-width:0 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace > .ws-panel {
  background:var(--wse36-bg) !important;
  border:1px solid var(--wse36-line) !important;
  border-radius:18px !important;
  box-shadow:var(--wse36-shadow) !important;
  min-width:0 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace > .ws-panel > .thrs-card-header {
  padding:18px 19px !important;
  min-height:59px !important;
  background:linear-gradient(120deg,var(--wse36-bg),var(--wse36-soft)) !important;
  border-bottom:1px solid var(--wse36-line) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace > .ws-panel > .thrs-card-header h3 {
  font-size:15px !important;font-weight:900 !important;
  line-height:1.4 !important;color:var(--wse36-ink) !important;
  letter-spacing:-.017em !important;
}
html[data-theme] .work-schedules-pro .ws-workspace > .ws-panel > .thrs-card-header + div {
  padding:16px !important;
}
/* Directory: same scrollable pane and click behavior; better density and line wrapping. */
html[data-theme] .work-schedules-pro .ws-workspace .ws-employee-list {
  max-height:665px !important;
  gap:9px !important;
  padding:2px 4px 3px 2px !important;
  scrollbar-width:thin !important;
  scrollbar-color:var(--wse36-gold) transparent !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-employee-card {
  display:grid !important;
  grid-template-columns:42px minmax(0,1fr) !important;
  width:100% !important;
  min-height:78px !important;
  padding:11px 12px !important;
  gap:11px !important;
  align-items:center !important;
  text-align:start !important;
  color:var(--wse36-ink) !important;
  border:1px solid var(--wse36-line) !important;
  border-radius:12px !important;
  background:var(--wse36-bg) !important;
  box-shadow:0 2px 6px rgba(13,43,71,.033) !important;
  transition:background-color .16s,border-color .16s,box-shadow .16s !important;
  overflow:hidden !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-employee-card:hover:not(.active) {
  transform:none !important;
  border-color:color-mix(in srgb,var(--wse36-gold) 50%,var(--wse36-line)) !important;
  background:var(--wse36-soft) !important;
  box-shadow:0 6px 15px rgba(11,45,72,.073) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-employee-card.active {
  background:linear-gradient(125deg,color-mix(in srgb,var(--wse36-gold) 13%,var(--wse36-bg)),var(--wse36-soft)) !important;
  border:1px solid color-mix(in srgb,var(--wse36-gold) 75%,var(--wse36-line)) !important;
  box-shadow:inset 3px 0 0 var(--wse36-gold),0 7px 17px rgba(12,42,72,.075) !important;
}
html[data-theme] .work-schedules-pro[dir="rtl"] .ws-workspace .ws-employee-card.active {
  box-shadow:inset -3px 0 0 var(--wse36-gold),0 7px 17px rgba(12,42,72,.075) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-avatar {
  display:grid !important;place-items:center !important;
  width:42px !important;height:42px !important;
  border:1px solid color-mix(in srgb,var(--wse36-gold) 30%,var(--wse36-line)) !important;
  border-radius:12px !important;
  background:color-mix(in srgb,var(--wse36-gold) 11%,var(--wse36-soft)) !important;
  color:var(--wse36-gold) !important;
  font-size:12px !important;font-weight:900 !important;letter-spacing:.02em !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-employee-card.active .ws-avatar {
  color:#163451 !important;
  background:linear-gradient(135deg,#f5dfbb,#d3a466) !important;
  border-color:#c99a60 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-employee-info {
  display:block;min-width:0 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-name-row {
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;justify-content:space-between !important;
  min-width:0 !important;gap:4px 7px !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-employee-name {
  display:-webkit-box !important;
  min-width:0 !important;
  flex:1 1 100px !important;
  white-space:normal !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  overflow:hidden !important;
  overflow-wrap:anywhere !important;
  line-height:1.4 !important;
  font-size:12.4px !important;
  font-weight:900 !important;
  color:var(--wse36-ink) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-name-row .ws-pill {
  flex:0 0 auto !important;
  max-width:100% !important;
  line-height:1.25 !important;
  white-space:normal !important;
  padding:4px 7px !important;
  font-size:9.5px !important;
  border-radius:7px !important;
  box-shadow:none !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-employee-meta {
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  overflow:hidden !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
  margin-top:5px !important;
  line-height:1.42 !important;
  font-size:10.5px !important;font-weight:670 !important;
  color:var(--wse36-muted) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace button.ws-employee-card:focus-visible {
  outline:2px solid var(--wse36-gold) !important;outline-offset:2px !important;
}
/* Keep schedule header location and actions, polish the identity and fix text spacing. */
html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-header {
  margin-bottom:15px !important;
  padding:17px 18px !important;
  min-width:0 !important;
  border:1px solid color-mix(in srgb,var(--wse36-gold) 34%,var(--wse36-line)) !important;
  background:linear-gradient(118deg,var(--wse36-bg),var(--wse36-soft)) !important;
  border-radius:15px !important;
  box-shadow:0 3px 12px rgba(11,42,70,.035) !important;
  gap:14px !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-identity {
  display:flex;align-items:center;gap:12px;min-width:0 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-avatar {
  display:grid;place-items:center;flex:0 0 44px;
  width:44px;height:44px;
  border-radius:13px;
  background:linear-gradient(140deg,#0f3d5c,#164b6b);
  color:#f7d8a6;border:1px solid #bd965c;
  font-size:13px;font-weight:930;
  box-shadow:0 4px 12px rgba(12,39,65,.12);
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-copy {
  flex:1;min-width:0;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-title {
  display:flex !important;align-items:baseline !important;
  flex-wrap:wrap !important;gap:4px 7px !important;
  color:var(--wse36-ink) !important;
  font-size:18px !important;
  font-weight:900 !important;letter-spacing:-.02em !important;
  line-height:1.4 !important;
  overflow-wrap:anywhere !important;
  margin:0 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-title-prefix {
  font-size:12px;font-weight:770;
  color:var(--wse36-muted);white-space:nowrap;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-person-name {
  min-width:0;font-size:18px;font-weight:930;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-sub {
  font-size:11px !important;font-weight:700 !important;
  color:var(--wse36-muted) !important;
  line-height:1.5 !important;margin-top:4px !important;
  overflow-wrap:anywhere !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-actions {
  display:flex;gap:8px !important;
  justify-content:flex-end !important;align-items:center !important;flex-wrap:wrap !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-actions .thrs-btn {
  min-height:39px !important;
  padding:9px 12px !important;border-radius:10px !important;
  line-height:1.2 !important;
  font-size:11.5px !important;font-weight:850 !important;
  gap:7px !important;
  white-space:nowrap !important;
  box-shadow:0 3px 9px rgba(12,43,72,.055) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-actions .thrs-btn-outline {
  background:var(--wse36-bg) !important;color:var(--wse36-ink) !important;
  border-color:var(--wse36-line) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-actions .thrs-btn-gold {
  color:#fff !important;
  background:linear-gradient(130deg,#123b58,#082a46) !important;
  border:1px solid #bb9160 !important;
}
/* KPI row retains all three cards. */
html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stats {
  gap:11px !important;margin-bottom:15px !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stat {
  position:relative;overflow:hidden;
  min-width:0;min-height:92px;
  padding:15px 16px !important;
  border:1px solid var(--wse36-line) !important;
  border-radius:13px !important;
  background:linear-gradient(140deg,var(--wse36-bg),var(--wse36-soft)) !important;
  box-shadow:0 2px 8px rgba(11,43,71,.028) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stat::before {
  content:'';position:absolute;inset-block-start:0;inset-inline-start:0;
  width:44px;height:3px;border-radius:0 0 8px 0;
  background:#2b7599;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stat:nth-child(2)::before {background:#c59657;}
html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stat:nth-child(3)::before {background:#6987a1;}
html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stat b {
  display:block;color:var(--wse36-ink) !important;
  font-size:24px !important;font-weight:930 !important;
  line-height:1.2 !important;font-variant-numeric:tabular-nums !important;
  margin-bottom:5px !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stat span {
  display:block;color:var(--wse36-muted) !important;
  font-size:11.5px !important;font-weight:740 !important;line-height:1.45 !important;
}
/* Same seven day cards, balanced rows instead of an orphan seventh card. */
html[data-theme] .work-schedules-pro .ws-workspace .ws-week-grid {
  display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:11px !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-day-card {
  display:flex !important;flex-direction:column !important;
  min-width:0 !important;min-height:135px !important;
  padding:14px 12px !important;
  border:1px solid var(--wse36-line) !important;
  border-radius:13px !important;
  background:linear-gradient(145deg,var(--wse36-bg),var(--wse36-soft)) !important;
  box-shadow:0 3px 10px rgba(11,43,71,.038) !important;
  overflow:hidden !important;
  opacity:1 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-day-card:hover {
  border-color:color-mix(in srgb,var(--wse36-gold) 48%,var(--wse36-line)) !important;
  box-shadow:0 7px 19px rgba(11,43,71,.08) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-day-card::before {width:3px !important;}
html[data-theme] .work-schedules-pro .ws-workspace .ws-day-card.off {
  border:1px dashed var(--wse36-line) !important;
  background:var(--wse36-tint) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-day-top {
  display:flex;align-items:center;flex-wrap:wrap;
  justify-content:space-between;gap:5px 7px !important;min-width:0 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-day-name {
  color:var(--wse36-ink) !important;font-size:12px !important;
  font-weight:900 !important;line-height:1.35 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-day-top .ws-pill {
  padding:4px 7px !important;
  border-radius:8px !important;
  font-size:10px !important;font-weight:840 !important;line-height:1.15 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-time {
  margin-top:15px !important;color:var(--wse36-ink) !important;
  font-size:17px !important;font-weight:920 !important;
  font-variant-numeric:tabular-nums !important;
  line-height:1.35 !important;white-space:normal !important;
  overflow-wrap:anywhere !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-mode {
  margin-top:auto !important;padding-top:10px !important;
  color:var(--wse36-muted) !important;
  font-size:10.6px !important;font-weight:740 !important;
  line-height:1.35 !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-mode .thrs-icon-text-row{
  display:inline-flex;align-items:center;gap:6px !important;
}
/* Upcoming exceptions panel stays where it is. */
html[data-theme] .work-schedules-pro .ws-workspace .ws-exceptions{
  margin-top:21px !important;padding-top:18px !important;
  border-top:1px solid var(--wse36-line) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-section-title {
  display:flex;align-items:center;gap:8px !important;
  font-size:14px !important;font-weight:900 !important;
  color:var(--wse36-ink) !important;margin:0 0 12px !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-section-title::before {
  content:'';display:block;width:3px;height:16px;
  border-radius:3px;background:var(--wse36-gold);
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-exception-list {
  gap:9px !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-exception-item {
  padding:13px 15px !important;
  border-radius:12px !important;background:var(--wse36-soft) !important;
  border:1px solid var(--wse36-line) !important;
  color:var(--wse36-ink) !important;
  align-items:center !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-exception-item strong {
  color:var(--wse36-ink) !important;
}
html[data-theme] .work-schedules-pro .ws-workspace .ws-empty-state {
  padding:26px 18px !important;min-height:97px !important;
  display:flex !important;align-items:center !important;justify-content:center !important;
  text-align:center !important;
  color:var(--wse36-muted) !important;
  background:var(--wse36-soft) !important;
  border:1px dashed color-mix(in srgb,var(--wse36-gold) 30%,var(--wse36-line)) !important;
  border-radius:12px !important;
  font-size:12px !important;font-weight:730 !important;
  line-height:1.6 !important;
}
/* Keep existing responsiveness; rebalance cards only at narrower widths. */
@media(max-width:1250px) {
  html[data-theme] .work-schedules-pro .ws-workspace .ws-week-grid {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}
@media(max-width:1180px) {
  html[data-theme] .work-schedules-pro .ws-workspace .ws-week-grid {
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}
@media(max-width:760px) {
  html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-header {
    padding:14px !important;
  }
  html[data-theme] .work-schedules-pro .ws-workspace .ws-selected-identity {
    gap:10px !important;
  }
  html[data-theme] .work-schedules-pro .ws-workspace .ws-actions {
    justify-content:stretch !important;
  }
  html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stats {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
  html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stat {
    padding:11px !important;min-height:86px !important;
  }
  html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stat b {
    font-size:21px !important;
  }
  html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stat span {
    font-size:10px !important;
  }
  html[data-theme] .work-schedules-pro .ws-workspace .ws-week-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:350px) {
  html[data-theme] .work-schedules-pro .ws-workspace .ws-mini-stats{
    grid-template-columns:1fr !important;
  }
  html[data-theme] .work-schedules-pro .ws-workspace .ws-week-grid{
    grid-template-columns:1fr !important;
  }
}
@media(prefers-reduced-motion:reduce){
  html[data-theme] .work-schedules-pro .ws-workspace :is(.ws-employee-card,.ws-day-card,.thrs-btn){
    transition:none !important;transform:none !important;
  }
}