.modal.employee-services-enabled {
  height: min(900px, calc(100dvh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.employee-services-enabled > .master-modal-head,
.employee-services-enabled > .master-modal-tabs,
.employee-services-enabled > .modal-footer { flex: 0 0 auto; }
.employee-services-enabled > .master-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.employee-services-enabled > .modal-footer { min-height: 70px; }
.employee-services-enabled > .modal-footer [data-company-employee-archive] { margin-right: auto; }
@media (max-width: 760px) {
  .modal.employee-services-enabled { height: 100dvh; }
  .employee-services-enabled > .modal-footer { height: 84px; display: flex; flex-wrap: nowrap; }
  .employee-services-enabled > .modal-footer .btn { min-width: 0; white-space: normal; line-height: 1.3; }
  .employee-services-enabled > .modal-footer [data-company-employee-archive] { flex: 1 1 0; margin-right: 0; }
  .employee-services-enabled > .modal-footer [data-company-employee-archive] + .btn { flex: 1 1 0; }
}
.employee-services { min-width: 0; }
.employee-services .employee-services-head h3 { margin: 0; font-size: 18px; }
.employee-services-placeholder { min-height: 300px; }
.employee-service-placeholder { display: grid; grid-template-columns: 2fr 1fr 1fr; align-items: center; gap: 16px; height: 100px; border-bottom: 1px solid var(--line); }
.employee-service-placeholder span { height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft, #f8fafc); }
.employee-service-placeholder span:first-child { height: 14px; width: 65%; }
.employee-services-branches { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.employee-services-branches .is-active { color: var(--primary-dark); border-color: var(--primary); background: var(--primary-soft); }
.employee-services-branch-label { margin: 16px 0; color: var(--text-secondary); }
.employee-services-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .5fr); gap: 16px; margin-top: 20px; }
.employee-services-selection { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 16px 0; color: var(--text-secondary); font-size: 13px; }
.employee-services-selection > div { display: flex; flex-wrap: wrap; gap: 8px; }
.employee-services-selection .btn { padding: 8px 12px; font-size: 13px; min-height: 40px; }
.employee-services-list { border-top: 1px solid var(--line); }
.employee-service-row { display: grid; grid-template-columns: minmax(200px, 1fr) 128px 128px 154px; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.employee-service-row[hidden] { display: none; }
.employee-service-choice { display: flex; gap: 12px; align-items: center; min-width: 0; min-height: 44px; cursor: pointer; }
.employee-service-choice input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--primary); cursor: pointer; }
.employee-service-choice span { min-width: 0; }
.employee-service-choice strong { display: block; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.employee-service-choice small { display: block; margin-top: 5px; font-size: 12px; color: var(--text-secondary); }
.employee-service-row .field { margin: 0; min-width: 0; }
.employee-service-row .field > span { font-size: 12px; }
.employee-service-value { position: relative; }
.employee-service-value .input { padding-right: 38px; width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.employee-service-value > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); font-size: 12px; pointer-events: none; }
.employee-service-value input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.employee-service-value input::-webkit-outer-spin-button, .employee-service-value input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.employee-service-value input:disabled { background: var(--surface-soft, #f8fafc); color: var(--text-secondary); }
.employee-service-standard { display: grid; gap: 5px; font-size: 12px; color: var(--text-secondary); }
.employee-service-standard .btn { font-size: 12px; text-align: left; padding: 4px 0; min-height: 32px; color: var(--primary-dark); justify-content: flex-start; }
.employee-service-standard [hidden] { display: none; }
.employee-services-error { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; color: var(--danger, #c34c40); }
.employee-services-error .btn { flex: 0 0 auto; }
@media (max-width: 1000px) {
  .employee-service-row { grid-template-columns: minmax(160px, 1fr) 110px 110px; gap: 12px; }
  .employee-service-standard { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
}
@media (max-width: 640px) {
  .employee-services-enabled .master-modal-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .employee-services-enabled .master-modal-tabs button { min-height: 44px; padding-inline: 4px; font-size: 13px; }
  .employee-services-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .employee-services h3 { font-size: 17px; }
  .employee-service-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 0; }
  .employee-service-choice { grid-column: 1 / -1; }
  .employee-service-standard { justify-content: space-between; }
  .employee-services-selection > div { width: 100%; }
  .employee-services-selection .btn { flex: 1; min-height: 44px; padding-inline: 8px; }
}
