.ws-workspace {
  --ws-ink: var(--ink, #15203e);
  --ws-muted: var(--muted, #667594);
  --ws-line: var(--line, #e6ebf4);
  --ws-surface: var(--surface, #fff);
  --ws-purple: var(--brand-700, #5624b4);
  --ws-violet: var(--brand-600, #882cff);
  --ws-cyan: var(--brand-cyan, #39d5ff);
  --ws-radius: var(--radius, 14px);
  --ws-shadow: var(--shadow, 0 8px 26px rgb(15 10 61 / .055));
  display: grid;
  gap: 16px;
  color: var(--ws-ink);
  direction: rtl;
  text-align: right;
  font-family: inherit;
}
.ws-workspace{direction:rtl;text-align:right}

.ws-workspace button,
.ws-workspace input,
.ws-workspace select { font-family: inherit; }

.ws-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
}

.ws-page-heading > div > span,
.ws-section-header > div > span,
.ws-modal-header span,
.ws-preview > span {
  color: var(--ws-purple);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.ws-page-heading h2 {
  margin: 3px 0 2px;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 800;
}

.ws-page-heading p,
.ws-section-header p {
  margin: 0;
  color: var(--ws-muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
}

.ws-page-heading time {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  background: var(--ws-surface);
  color: #34425f;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgb(15 10 61 / .02);
}

.ws-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ws-kpis button {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 12px;
  align-items: center;
  min-height: 126px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  background: var(--ws-surface);
  color: var(--ws-ink);
  text-align: right;
  box-shadow: var(--ws-shadow);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ws-kpis button::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--ws-purple), var(--ws-violet), var(--ws-cyan));
  content: '';
  opacity: .78;
}

.ws-kpis button:hover:not(:disabled),
.ws-kpis button:focus-visible {
  border-color: #c7b5f4;
  box-shadow: 0 10px 28px rgb(15 10 61 / .085);
  outline: 0;
  transform: translateY(-1px);
}

.ws-kpis button.is-active,
.ws-kpis button[aria-pressed='true'] {
  border-color: #8b63df;
  background: linear-gradient(145deg, #fff, #f7f3ff);
  box-shadow: 0 0 0 3px rgb(108 65 193 / .10), 0 10px 28px rgb(15 10 61 / .08);
}

.ws-kpis button.is-active::before,
.ws-kpis button[aria-pressed='true']::before { height: 4px; opacity: 1; }

.ws-kpis button > i {
  grid-row: 1 / 4;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: #f1edff;
  color: var(--ws-purple);
}

.ws-kpis button > i svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ws-kpis button > span,
.ws-kpis button > b,
.ws-kpis button > small { grid-column: 2; }
.ws-kpis button > span { color: var(--ws-muted); font-size: 13px; font-weight: 600; }
.ws-kpis button > b { color: var(--ws-ink); font-size: 23px; line-height: 1.15; font-weight: 800; }
.ws-kpis button > small { color: #7b89a0; font-size: 12px; font-weight: 500; }
.ws-kpis .is-assigned > i { background: #edf9f1; color: #129a52; }
.ws-kpis .is-missing > i { background: #fff6e8; color: #c76a10; }
.ws-kpis .is-attention > i { background: #fff0f1; color: #d83a48; }

.ws-workspace-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  background: var(--ws-surface);
  box-shadow: 0 4px 14px rgb(15 10 61 / .04);
  direction: rtl;
}

.ws-workspace-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 178px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #66758d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ws-workspace-tabs button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ws-workspace-tabs button.is-active {
  background: linear-gradient(105deg, var(--ws-purple), var(--ws-violet));
  color: #fff;
  box-shadow: 0 6px 15px rgb(86 36 180 / .16);
}

.ws-workspace-tabs button:focus-visible {
  outline: 3px solid rgb(136 44 255 / .14);
  outline-offset: 2px;
}

.ws-section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius);
  background: var(--ws-surface);
  box-shadow: var(--ws-shadow);
  scroll-margin-top: 112px;
}

.ws-section::before {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--ws-purple), var(--ws-violet), var(--ws-cyan));
  content: '';
  opacity: .78;
}

.ws-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 84px;
  padding: 17px 18px 15px;
  border-bottom: 1px solid #edf1f6;
}

.ws-section-header h3 {
  margin: 2px 0 3px;
  color: var(--ws-ink);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
}

.ws-heading-actions { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; direction: rtl; }

.ws-workspace .primary-btn,
.ws-workspace .secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ws-workspace .primary-btn {
  border: 0;
  background: linear-gradient(105deg, var(--ws-purple), var(--ws-violet));
  color: #fff;
  box-shadow: 0 6px 15px rgb(86 36 180 / .16);
}

.ws-workspace .secondary-btn {
  border: 1px solid #dce4f0;
  background: #fff;
  color: var(--ws-ink);
  box-shadow: none;
}

.ws-workspace .secondary-btn:hover {
  border-color: #bca7ff;
  background: #fbfaff;
  color: var(--ws-purple);
}

.ws-workspace button:disabled { opacity: .46; cursor: not-allowed; }

.ws-schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.ws-schedule-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  min-width: 0;
  min-height: 286px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(15 10 61 / .035);
}

.ws-schedule-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--ws-purple), var(--ws-violet), var(--ws-cyan));
  content: '';
}

.ws-schedule-card > header { display: flex; justify-content: space-between; gap: 12px; }
.ws-schedule-card h4 { margin: 4px 0 0; color: var(--ws-ink); font-size: 16px; line-height: 1.35; font-weight: 800; }
.ws-schedule-card header span { color: var(--ws-purple); font-size: 11px; font-weight: 700; }
.ws-schedule-card header > strong {
  height: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf9f1;
  color: #0a8245;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.ws-schedule-boundary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 12px;
  padding: 11px 12px;
  border: 1px solid #ebe5fb;
  border-radius: 9px;
  background: #fbfaff;
}

.ws-schedule-boundary b { font-size: 15px; font-weight: 800; }
.ws-schedule-boundary i { color: var(--ws-violet); font-style: normal; }
.ws-schedule-boundary span { color: #5137a5; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ws-schedule-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0; }
.ws-schedule-card dl div { min-width: 0; padding: 10px; border-radius: 9px; background: #f8f9fc; }
.ws-schedule-card dt { color: var(--ws-muted); font-size: 11px; font-weight: 600; }
.ws-schedule-card dd { margin: 4px 0 0; color: #34425f; font-size: 12px; font-weight: 700; line-height: 1.45; }
.ws-schedule-card > p { min-height: 35px; margin: 10px 0 12px; color: var(--ws-muted); font-size: 11px; line-height: 1.55; }
.ws-schedule-card footer { display: flex; gap: 8px; }
.ws-schedule-card footer button,
.ws-row-action {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #dce4f0;
  border-radius: 9px;
  background: #fff;
  color: var(--ws-purple);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.ws-schedule-card footer button:first-child { flex: 1; }
.ws-schedule-card footer button:hover,
.ws-row-action:hover { border-color: #bca7ff; background: #fbfaff; }
.ws-schedule-card details { margin-top: 8px; color: var(--ws-muted); font-size: 10px; }
.ws-schedule-card summary,
.ws-advanced summary { cursor: pointer; font-weight: 700; }

.ws-filters {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ws-line);
  background: #fff;
  direction: rtl;
}

.ws-active-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 16px;
  border-bottom: 1px solid #e9e4f7;
  background: #faf8ff;
  color: #563aa0;
  font-size: 12px;
  font-weight: 700;
}

.ws-active-filter button,
.ws-empty button {
  border: 1px solid #cab8f4;
  border-radius: 8px;
  background: #fff;
  padding: 7px 11px;
  color: #563aa0;
  font: 700 11px inherit;
  cursor: pointer;
}

.ws-active-filter button:hover,
.ws-active-filter button:focus-visible,
.ws-empty button:hover,
.ws-empty button:focus-visible { border-color: var(--ws-purple); outline: 3px solid rgb(108 65 193 / .10); }

.ws-field { display: grid; gap: 6px; min-width: 0; color: #465570; font-size: 12px; font-weight: 700; }
.ws-field > small { color: var(--ws-muted); font-size: 11px; font-weight: 500; line-height: 1.45; }
.ws-field input,
.ws-field select,
.ws-form-grid input,
.ws-form-grid select {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: #fff;
  padding: 0 11px;
  color: var(--ws-ink);
  font: 500 13px inherit;
}
.ws-field input:focus,
.ws-field select:focus,
.ws-form-grid input:focus,
.ws-form-grid select:focus {
  border-color: #a883ff;
  box-shadow: 0 0 0 3px rgb(136 44 255 / .10);
  outline: 0;
}

.ws-table-wrap{overflow:auto}
.ws-table-wrap { width: 100%; }
.ws-table-wrap table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  direction: rtl;
}
.ws-table-wrap th {
  height: 56px;
  padding: 0 12px;
  border-bottom: 1px solid var(--ws-line);
  background: #fafbfe;
  color: #52627f;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.ws-table-wrap td {
  height: 68px;
  overflow: hidden;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #263755;
  font-size: 13px;
  font-weight: 500;
  vertical-align: middle;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.ws-table-wrap th:first-child,
.ws-table-wrap td:first-child,
.ws-table-wrap th:last-child,
.ws-table-wrap td:last-child { text-align: center; }
.ws-table-wrap tbody tr:hover { background: #fcfbff; }
.ws-table-wrap tr.is-selected { background: #f8f5ff; }
.ws-table-wrap th:nth-child(1) { width: 50px; }
.ws-table-wrap th:nth-child(2) { width: 290px; }
.ws-table-wrap th:nth-child(3) { width: 135px; }
.ws-table-wrap th:nth-child(4) { width: 220px; }
.ws-table-wrap th:nth-child(5) { width: 145px; }
.ws-table-wrap th:nth-child(6) { width: 200px; }
.ws-table-wrap th:nth-child(7) { width: 110px; }
.ws-table-wrap input[type='checkbox'] { width: 17px; height: 17px; accent-color: var(--ws-purple); }

.ws-employee-identity { display: flex; align-items: center; justify-content: flex-start; gap: 11px; min-width: 0; direction: rtl; text-align: right; }
.ws-employee-identity > span:last-child { min-width: 0; }
.ws-employee-identity b {
  display: block;
  overflow: hidden;
  color: var(--ws-ink);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
}
.ws-employee-identity small { display: block; margin-top: 2px; color: var(--ws-muted); font-size: 11px; font-weight: 500; direction: ltr; text-align: left; }
.ws-avatar {
  display: grid !important;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #f0eff9;
  border-radius: 50%;
  background: linear-gradient(135deg, #eeebff, #e9f8ff);
  color: var(--ws-purple);
  font-size: 11px;
  font-weight: 800;
}
.ws-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.ws-status { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.ws-status.is-assigned { background: #edf9f1; color: #0a8245; }
.ws-status.is-missing { background: #fff6e8; color: #a55a0c; }
.ws-status.is-attention { background: #fff0f1; color: #c52d4d; }
.ws-setup { color: #a55a0c; font-weight: 700; }
.ws-row-actions { display: flex; align-items: center; justify-content: center; gap: 7px; }
.ws-icon-action {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #dfe6f1;
  border-radius: 9px;
  background: #fff;
  color: var(--ws-purple);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ws-icon-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ws-icon-action:hover,
.ws-icon-action:focus-visible { border-color: var(--ws-purple); background: var(--ws-purple); color: #fff; outline: 0; }
.ws-empty { display: grid; justify-items: center; gap: 12px; padding: 30px; color: var(--ws-muted); text-align: center; }
.ws-check-row,[data-work-schedule-assignment-end]{display:none!important}

.ws-issues .ws-section-header { border-bottom: 0; }
.ws-issue-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; padding: 0 16px 14px; }
.ws-issue-summary button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  background: #fafbfe;
  padding: 10px 11px;
  color: #465570;
  text-align: right;
}
.ws-issue-summary button.is-active { border-color: #bca7ff; background: #f5f1ff; color: var(--ws-purple); }
.ws-issue-summary b { font-size: 17px; }
.ws-issue-list { padding: 0 16px 16px; }
.ws-issue-list article { display: grid; grid-template-columns: 1.1fr 1.5fr auto; align-items: center; gap: 16px; padding: 13px 0; border-top: 1px solid #edf0f5; }
.ws-issue-list small { display: block; margin-top: 3px; color: var(--ws-muted); }
.ws-issue-list details { grid-column: 1 / -1; padding: 8px; border-radius: 8px; background: #f7f9fc; color: var(--ws-muted); font-size: 10px; }
.ws-historical-notice {
  margin: 12px 0 0;
  padding: 14px 16px;
  border: 1px solid #e7eaf0;
  border-radius: var(--ws-radius,14px);
  background: #fbfcfe;
  color: var(--ws-muted);
}
.ws-historical-notice h3{margin:0 0 8px;color:var(--ws-ink);font-size:16px}
.ws-historical-notice p{margin:0 0 8px;line-height:1.8;font-size:14px}
.ws-historical-notice small{display:block;overflow-wrap:anywhere}

.ws-overlay {
  position: fixed;
  z-index: var(--app-layer-modal-backdrop, 20000);
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(9 16 38 / .48);
  backdrop-filter: blur(2px);
}
.ws-overlay[hidden],
.ws-modal [hidden] { display: none !important; }
.ws-overlay > [data-work-schedule-dialog] { width: min(780px, 96vw); max-height: calc(100dvh - 36px); }
.ws-modal {
  display: flex;
  max-height: calc(100dvh - 36px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 78px rgb(8 16 38 / .30);
  direction: rtl;
  text-align: right;
}
.ws-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 14px; border-bottom: 1px solid #edf0f5; }
.ws-modal-header h3 { margin: 3px 0; color: var(--ws-ink); font-size: 20px; font-weight: 800; }
.ws-modal-header p { max-width: 580px; margin: 0; color: var(--ws-muted); font-size: 12px; line-height: 1.55; }
.ws-close {
  display: grid;
  flex: 0 0 33px;
  width: 33px;
  height: 33px;
  place-items: center;
  border: 1px solid #e2e7f0;
  border-radius: 8px;
  background: #fff;
  color: #64718a;
  font-size: 21px;
  cursor: pointer;
}
.ws-close:hover { border-color: #bca7ff; color: var(--ws-purple); }
.ws-modal-body { display: grid; gap: 12px; overflow: auto; padding: 16px 20px; background: #fbfcff; }
.ws-form-section { padding: 14px; border: 1px solid #e5eaf2; border-radius: 12px; background: #fff; }
.ws-form-section > header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ws-form-section > header > span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #f1edff;
  color: var(--ws-purple);
  font-size: 11px;
  font-weight: 800;
}
.ws-form-section h4 { margin: 0; font-size: 14px; font-weight: 700; }
.ws-form-section header p { margin: 2px 0 0; color: var(--ws-muted); font-size: 11px; }
.ws-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.ws-form-grid .is-wide,
.ws-selected-employees.is-wide { grid-column: 1 / -1; }
.ws-time-row { display: grid; grid-template-columns: 1fr auto 1fr 1fr; align-items: end; gap: 11px; }
.ws-time-row > i { padding-bottom: 12px; color: var(--ws-violet); font-style: normal; }
.ws-time-row output { display: grid; height: 42px; place-items: center; border: 1px solid #e6defb; border-radius: 9px; background: #fbfaff; color: #5533a6; font-size: 13px; font-weight: 800; }
.ws-chip-group { display: flex; flex-wrap: wrap; gap: 7px; border: 0; margin: 0; padding: 0; }
.ws-chip-group label { cursor: pointer; }
.ws-chip-group input { position: absolute; opacity: 0; pointer-events: none; }
.ws-chip-group span { display: grid; min-width: 52px; height: 36px; place-items: center; border: 1px solid #dce4ef; border-radius: 9px; background: #fff; color: #52617a; font-size: 11px; font-weight: 700; }
.ws-chip-group input:checked + span { border-color: #9a77e8; background: #f1edff; color: var(--ws-purple); }
.ws-chip-group input:focus-visible + span { outline: 3px solid rgb(136 44 255 / .12); }
.ws-toggle-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ws-toggle { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; padding: 11px; border: 1px solid #e1e6ef; border-radius: 10px; }
.ws-toggle input { position: absolute; opacity: 0; }
.ws-toggle > i { position: relative; grid-row: 1 / 3; width: 38px; height: 22px; border-radius: 999px; background: #cbd5e1; transition: .15s; }
.ws-toggle > i::after { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; content: ''; transition: .15s; }
.ws-toggle input:checked + i { background: var(--ws-purple); }
.ws-toggle input:checked + i::after { transform: translateX(-16px); }
.ws-toggle input:focus-visible + i { outline: 3px solid rgb(136 44 255 / .14); }
.ws-toggle b { font-size: 12px; }
.ws-toggle small { color: var(--ws-muted); font-size: 10px; }
.ws-advanced { padding: 11px 13px; border: 1px dashed #cfd8e7; border-radius: 10px; background: #fff; color: #53627b; font-size: 11px; }
.ws-advanced[open] summary { margin-bottom: 11px; }
.ws-preview,
.ws-current-version,
.ws-impact,
.ws-dry-run { display: grid; gap: 7px; padding: 14px; border: 1px solid #ddd4f8; border-radius: 11px; background: linear-gradient(135deg, #fbfaff, #f5fbff); }
.ws-preview > strong,
.ws-current-version > strong { font-size: 16px; }
.ws-preview > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.ws-preview > div b { font-size: 14px; }
.ws-preview > div em { color: #5b36b0; font-style: normal; font-weight: 800; }
.ws-preview p,
.ws-preview small,
.ws-current-version p,
.ws-current-version small,
.ws-impact small,
.ws-dry-run p { margin: 0; color: var(--ws-muted); font-size: 11px; }
.ws-preview dl,
.ws-dry-run dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 3px 0 0; }
.ws-preview dl div,
.ws-dry-run dl div { padding: 9px; border-radius: 9px; background: #fff; }
.ws-preview dt,
.ws-dry-run dt { color: var(--ws-muted); font-size: 10px; }
.ws-preview dd,
.ws-dry-run dd { margin: 4px 0 0; font-size: 12px; font-weight: 800; }
.ws-dry-run .is-safe { color: #0a8245; }
.ws-dry-run .is-danger { color: #c52d4d; }
.ws-selected-employees { display: grid; gap: 8px; padding: 11px; border-radius: 10px; background: #f7f9fc; }
.ws-selected-employees > div { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-selected-employees span { padding: 5px 8px; border-radius: 999px; background: #f1edff; font-size: 10px; }
.ws-before-after { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center !important; gap: 10px; }
.ws-before-after article { padding: 11px; border-radius: 9px; background: #fff; }
.ws-before-after article small { display: block; }
.ws-before-after article b { display: block; margin-top: 5px; }
.ws-before-after article p { margin-top: 5px; }
.ws-before-after > i { color: var(--ws-purple); font-style: normal; }
.ws-modal-footer { position:sticky;bottom:0; display: flex; justify-content: flex-start; gap: 8px; padding: 14px 20px 16px; border-top: 1px solid #e5eaf2; background: rgb(255 255 255 / .98); }
.ws-modal-footer button { min-width: 120px; }
.ws-modal-footer .ws-assignment-save-restriction { flex: 1 1 240px; align-self: center; margin: 0; color: #475569; font-size: 13px; font-weight: 600; line-height: 1.75; overflow-wrap: anywhere; }
.ws-form-error { min-width: 0; min-height: 0; max-width: 100%; flex-shrink: 0; box-sizing: border-box; margin: 0; padding: 0 20px 12px; color: #b91c1c; font-size: 13px; line-height: 1.65; font-weight: 700; white-space: normal; overflow-wrap: anywhere; }
.ws-assignment-details { display: grid; gap: 15px; padding: 2px; }
.ws-assignment-details > .ws-employee-identity { padding: 13px; border: 1px solid #e5eaf2; border-radius: 11px; background: #fff; }
.ws-assignment-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
.ws-assignment-details dl div { padding: 12px; border: 1px solid #e5eaf2; border-radius: 10px; background: #fff; }
.ws-assignment-details dt { color: var(--ws-muted); font-size: 11px; }
.ws-assignment-details dd { margin: 5px 0 0; font-size: 13px; font-weight: 700; }
.ws-loading,
.ws-load-error { margin: 20px; padding: 22px; border: 1px solid var(--ws-line); border-radius: var(--ws-radius); background: #fff; text-align: center; }
.ws-load-error { display: grid; gap: 8px; border-color: #f0c4ca; background: #fff7f8; color: #912f3c; }
.ws-load-error button { justify-self: center; border: 1px solid #dca1aa; border-radius: 9px; background: #fff; padding: 8px 14px; cursor: pointer; }

@media (max-width: 1100px) {
  .ws-kpis,
  .ws-schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-issue-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .ws-workspace { gap: 13px; }
  .ws-page-heading,
  .ws-section-header { align-items: flex-start; flex-direction: column; }
  .ws-page-heading { min-height: 0; }
  .ws-page-heading h2 { font-size: 24px; }
  .ws-page-heading time { width: 100%; justify-content: center; }
  .ws-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ws-kpis button { min-height: 112px; padding: 14px; grid-template-columns: 38px minmax(0, 1fr); column-gap: 9px; }
  .ws-kpis button > i { width: 38px; height: 38px; border-radius: 10px; }
  .ws-kpis button > b { font-size: 20px; }
  .ws-kpis button > small { font-size: 10px; }
  .ws-workspace-tabs { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
  .ws-workspace-tabs button { min-width: 0; width: 100%; padding: 0 8px; font-size: 12px; }
  .ws-section-header { min-height: 0; padding: 16px; }
  .ws-heading-actions { width: 100%; }
  .ws-heading-actions button { flex: 1; }
  .ws-schedule-grid,
  .ws-filters,
  .ws-issue-summary { grid-template-columns: 1fr; }
  .ws-schedule-grid { padding: 12px; }
  .ws-schedule-card { min-height: 0; }
  .ws-schedule-card dl { grid-template-columns: 1fr; }
  .ws-schedule-card footer { flex-direction: column; }
  .ws-overlay { padding: 7px; }
  .ws-overlay > [data-work-schedule-dialog] { width: 100%; max-height: calc(100dvh - 14px); }
  .ws-modal { max-height: calc(100dvh - 14px); }
  .ws-modal-header { padding: 15px; }
  .ws-modal-body { padding: 12px; }
  .ws-form-grid,
  .ws-toggle-list { grid-template-columns: 1fr; }
  .ws-form-grid .is-wide { grid-column: 1; }
  .ws-time-row { grid-template-columns: 1fr auto 1fr; }
  .ws-time-row output { grid-column: 1 / -1; }
  .ws-preview dl,
  .ws-dry-run dl { grid-template-columns: 1fr; }
  .ws-before-after { grid-template-columns: 1fr !important; }
  .ws-before-after > i { transform: rotate(90deg); text-align: center; }
  .ws-modal-footer { display: grid; grid-template-columns: 1fr; padding: 12px; }
  .ws-modal-footer button { width: 100%; }
  .ws-assignment-details dl { grid-template-columns: 1fr; }
  .ws-issue-list article { grid-template-columns: 1fr; }
  .ws-issue-list details { grid-column: 1; }
  .ws-table-wrap { max-width: calc(100vw - 30px); }
}

@media (max-width: 430px) {
  .ws-kpis { grid-template-columns: 1fr; }
  .ws-workspace-tabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Historical review extends the existing HR workspace; no corrective mutation controls. */
.ws-historical-review .ws-review-table-wrap{overflow-x:auto;border:1px solid #e2e8f0;border-radius:14px}
.ws-historical-review table{width:100%;border-collapse:collapse;font-size:14px}
.ws-historical-review th{background:#f7f8fc;text-align:start;padding:12px}
.ws-historical-review td{padding:12px;vertical-align:top;border-block-start:1px solid #e8edf5;max-width:300px}
.ws-historical-review td small{display:block;color:#64748b;margin-block-start:5px;overflow-wrap:anywhere}
.ws-historical-review td p{margin:0 0 8px}
.ws-historical-review details{margin-block-start:8px}
.ws-historical-review summary{cursor:pointer;color:#6541c9}
.ws-review-category{margin-block-start:20px}
.ws-review-category>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ws-review-category h4{margin:0;font-size:16px}
.ws-review-category>p{color:var(--ws-muted,#64748b);font-size:14px;line-height:1.8;margin:8px 0 12px}
.ws-historical-review>.ws-section-header>b small{display:block;color:var(--ws-muted,#64748b);font-weight:400;margin-block-start:5px}
.ws-review-empty{padding:14px;color:#64748b}
@media(max-width:760px){.ws-historical-review table,.ws-historical-review tbody,.ws-historical-review tr,.ws-historical-review td{display:block}.ws-historical-review thead{display:none}.ws-historical-review td{max-width:none}.ws-historical-review tr{border-block-end:2px solid #cbd5e1}}
