.system-paid-leave-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 auto;
  max-width: 1320px;
  padding: 18px 20px 96px;
}

.system-paid-leave-workbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e1e7;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.system-paid-leave-filters,
.system-paid-leave-actions,
.system-paid-leave-summary {
  align-items: end;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.system-paid-leave-filters {
  flex-wrap: wrap;
}

.system-paid-leave-actions {
  margin-left: auto;
}

.system-paid-leave-summary {
  align-items: center;
  flex: 0 0 auto;
}

.system-paid-leave-metric {
  align-items: center;
  background: #f5f8fa;
  border: 1px solid #d8e1e7;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
}

.system-paid-leave-metric span,
.system-paid-leave-search span,
.system-paid-leave-filter span {
  color: #5b6b76;
  font-size: 12px;
  font-weight: 700;
}

.system-paid-leave-metric strong {
  color: #1d2b34;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.system-paid-leave-search,
.system-paid-leave-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.system-paid-leave-search input,
.system-paid-leave-filter input,
.system-paid-leave-filter select {
  background: #ffffff;
  border: 1px solid #c8d3db;
  border-radius: 6px;
  color: #1f2d36;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 10px;
}

.system-paid-leave-search input {
  width: 260px;
}

.system-paid-leave-filter input {
  width: 150px;
}

.system-paid-leave-filter select {
  width: 128px;
}

.system-paid-leave-search input:focus,
.system-paid-leave-filter input:focus,
.system-paid-leave-filter select:focus {
  border-color: #1f7a6c;
  box-shadow: 0 0 0 3px rgba(31, 122, 108, 0.16);
  outline: none;
}

.system-paid-leave-icon-button {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0;
  width: 38px;
}

.system-paid-leave-icon-button svg,
.system-paid-leave-row-button svg,
.system-paid-leave-dialog-close svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.system-paid-leave-icon-button svg {
  height: 18px;
  width: 18px;
}

.system-paid-leave-table-section {
  background: #ffffff;
  border: 1px solid #c8d3db;
  border-radius: 8px;
  overflow: hidden;
}

.system-paid-leave-section-header {
  align-items: center;
  background: #eef6f3;
  border-bottom: 1px solid #c4d7d1;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.system-paid-leave-section-controls,
.system-paid-leave-auto-summary {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.system-paid-leave-auto-summary {
  align-items: center;
  border-bottom: 1px solid #d4dee5;
  padding: 10px 12px;
}

.system-paid-leave-section-header h2 {
  align-items: center;
  color: #173f38;
  display: flex;
  font-size: 17px;
  gap: 8px;
  margin: 0;
}

.system-paid-leave-section-header h2::before,
.system-paid-leave-dialog-header h2::before {
  background: #1f7a6c;
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 18px;
  width: 4px;
}

.system-paid-leave-table-wrap,
.system-paid-leave-lot-table-wrap {
  overflow-x: auto;
}

.system-paid-leave-table,
.system-paid-leave-lot-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.system-paid-leave-table {
  min-width: 920px;
}

.system-paid-leave-auto-table {
  min-width: 1100px;
}

.system-paid-leave-lot-table {
  min-width: 980px;
}

.system-paid-leave-table th,
.system-paid-leave-table td,
.system-paid-leave-lot-table th,
.system-paid-leave-lot-table td {
  border-bottom: 1px solid #d4dee5;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}

.system-paid-leave-table th:not(:last-child),
.system-paid-leave-table td:not(:last-child),
.system-paid-leave-lot-table th:not(:last-child),
.system-paid-leave-lot-table td:not(:last-child) {
  border-right: 1px solid #d4dee5;
}

.system-paid-leave-table th,
.system-paid-leave-lot-table th {
  background: #f5f8fa;
  color: #4f606c;
  font-size: 12px;
  font-weight: 800;
  position: static;
  top: auto;
  white-space: nowrap;
  z-index: auto;
}

.system-paid-leave-table td,
.system-paid-leave-lot-table td {
  color: #22313b;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.system-paid-leave-table th:nth-child(1),
.system-paid-leave-table td:nth-child(1) {
  width: 92px;
}

.system-paid-leave-table th:nth-child(2),
.system-paid-leave-table td:nth-child(2) {
  width: 138px;
}

.system-paid-leave-table th:nth-child(3),
.system-paid-leave-table td:nth-child(3) {
  width: 86px;
}

.system-paid-leave-table th:nth-child(4),
.system-paid-leave-table td:nth-child(4) {
  width: 92px;
}

.system-paid-leave-table th:nth-child(5),
.system-paid-leave-table td:nth-child(5) {
  width: 92px;
}

.system-paid-leave-table th:nth-child(6),
.system-paid-leave-table td:nth-child(6) {
  width: 108px;
}

.system-paid-leave-table th:nth-child(7),
.system-paid-leave-table td:nth-child(7) {
  width: 112px;
}

.system-paid-leave-table th:nth-child(8),
.system-paid-leave-table td:nth-child(8) {
  width: 66px;
}

.system-paid-leave-auto-table th:nth-child(1),
.system-paid-leave-auto-table td:nth-child(1) {
  width: 92px;
}

.system-paid-leave-auto-table th:nth-child(2),
.system-paid-leave-auto-table td:nth-child(2) {
  width: 132px;
}

.system-paid-leave-auto-table th:nth-child(3),
.system-paid-leave-auto-table td:nth-child(3) {
  width: 92px;
}

.system-paid-leave-auto-table th:nth-child(4),
.system-paid-leave-auto-table td:nth-child(4) {
  width: 82px;
}

.system-paid-leave-auto-table th:nth-child(5),
.system-paid-leave-auto-table td:nth-child(5),
.system-paid-leave-auto-table th:nth-child(7),
.system-paid-leave-auto-table td:nth-child(7) {
  width: 104px;
}

.system-paid-leave-auto-table th:nth-child(6),
.system-paid-leave-auto-table td:nth-child(6) {
  width: 96px;
}

.system-paid-leave-auto-table th:nth-child(8),
.system-paid-leave-auto-table td:nth-child(8) {
  width: 280px;
}

.system-paid-leave-auto-table th:nth-child(9),
.system-paid-leave-auto-table td:nth-child(9) {
  width: 72px;
}

.system-paid-leave-table td:nth-child(1) {
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
}

.system-paid-leave-table td:nth-child(2) {
  text-align: center;
}

.system-paid-leave-table td strong,
.system-paid-leave-lot-table td strong {
  display: block;
  font-weight: 800;
}

.system-paid-leave-table td strong + span,
.system-paid-leave-lot-table td strong + span {
  color: #5b6b76;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.system-paid-leave-empty {
  color: #6a7882;
  height: 80px;
  text-align: center;
  vertical-align: middle;
}

.system-paid-leave-badge {
  background: #eef3f6;
  border: 1px solid #cfdbe3;
  border-radius: 999px;
  color: #41525e;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  min-height: 26px;
  padding: 7px 10px;
  white-space: nowrap;
}

.system-paid-leave-badge.is-active,
.system-paid-leave-badge.is-organization {
  background: #e9f3f1;
  border-color: #b7d8d1;
  color: #1f655c;
}

.system-paid-leave-badge.is-retired,
.system-paid-leave-badge.is-inactive {
  background: #f6eeee;
  border-color: #e1bcbc;
  color: #8b3434;
}

.system-paid-leave-badge.is-auto-held_until_decision,
.system-paid-leave-badge.is-auto-legal_review_required {
  background: #fff6e0;
  border-color: #e6cc8f;
  color: #745012;
}

.system-paid-leave-badge.is-auto-manual_review {
  background: #fff0ed;
  border-color: #e0aaa2;
  color: #9a3027;
}

.system-paid-leave-badge.is-auto-planned {
  background: #e9f3f1;
  border-color: #b7d8d1;
  color: #1f655c;
}

.system-paid-leave-badge.is-auto-excluded_by_override,
.system-paid-leave-badge.is-auto-skipped_initial_migration_covered,
.system-paid-leave-badge.is-auto-skipped_existing_source_reference,
.system-paid-leave-badge.is-auto-skipped_existing_equivalent_grant,
.system-paid-leave-badge.is-auto-skipped_zero_days {
  background: #eef3f6;
  border-color: #cfdbe3;
  color: #5b6b76;
}

.system-paid-leave-row-button {
  align-items: center;
  background: #2c7892;
  border: 1px solid #25677d;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

.system-paid-leave-row-actions {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
  min-width: 66px;
}

.system-paid-leave-row-button:hover {
  background: #24677d;
  border-color: #205d72;
}

.system-paid-leave-row-button.is-add {
  background: #1f7a6c;
  border-color: #18695d;
}

.system-paid-leave-row-button.is-add:hover {
  background: #19695d;
  border-color: #14584f;
}

.system-paid-leave-row-button.is-edit {
  background: #5f6f1f;
  border-color: #4f5e18;
}

.system-paid-leave-row-button.is-edit:hover {
  background: #505f19;
  border-color: #445215;
}

.system-paid-leave-row-button.is-review {
  background: #80589a;
  border-color: #6d4a84;
}

.system-paid-leave-row-button.is-review:hover {
  background: #6d4a84;
  border-color: #5c3e70;
}

.system-paid-leave-row-button svg {
  height: 16px;
  width: 16px;
}

.system-paid-leave-dialog {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(24, 36, 44, 0.28);
  color: #22313b;
  max-width: min(1040px, calc(100vw - 28px));
  padding: 0;
  width: 1040px;
}

.system-paid-leave-dialog.is-compact {
  width: 640px;
}

.system-paid-leave-dialog::backdrop {
  background: rgba(20, 30, 38, 0.42);
}

.system-paid-leave-dialog form {
  display: flex;
  flex-direction: column;
  margin: 0;
  max-height: min(88vh, 760px);
}

.system-paid-leave-dialog-header,
.system-paid-leave-dialog-footer {
  align-items: center;
  background: #ffffff;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.system-paid-leave-dialog-header {
  background: linear-gradient(180deg, #f7fbfa 0%, #eef6f3 100%);
  border-bottom: 1px solid #c4d7d1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.system-paid-leave-dialog-header h2 {
  align-items: center;
  color: #173f38;
  display: flex;
  font-size: 17px;
  gap: 8px;
  margin: 0;
}

.system-paid-leave-dialog-header p {
  color: #5b6b76;
  font-size: 13px;
  margin: 4px 0 0;
}

.system-paid-leave-dialog-close {
  align-items: center;
  background: transparent;
  border: 1px solid #b7cac4;
  border-radius: 6px;
  color: #31514b;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.system-paid-leave-dialog-close:hover {
  background: #dcece7;
}

.system-paid-leave-dialog-close:focus-visible {
  border-color: #205d72;
  outline: 2px solid #205d72;
  outline-offset: 2px;
}

.system-paid-leave-dialog-close svg {
  height: 18px;
  width: 18px;
}

.system-paid-leave-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  padding: 16px;
}

.system-paid-leave-dialog-footer {
  border-top: 1px solid #edf1f4;
  justify-content: flex-end;
}

.system-paid-leave-dialog-footer .status {
  align-items: center;
  background: #eef3f6;
  border: 1px solid #cfdbe3;
  border-radius: 999px;
  color: #41525e;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  min-height: 28px;
  padding: 6px 10px;
}

.system-paid-leave-dialog-footer .status.error {
  background: #fff0ed;
  border-color: #e0aaa2;
  color: #9a3027;
}

.system-paid-leave-dialog-footer .status.loading {
  background: #eef6ff;
  border-color: #b8d6f1;
  color: #23527a;
}

.system-paid-leave-dialog-action {
  flex: 0 0 auto;
}

.system-paid-leave-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.system-paid-leave-form-grid label,
.system-paid-leave-textarea-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.system-paid-leave-form-grid span,
.system-paid-leave-textarea-field span {
  color: #5b6b76;
  font-size: 12px;
  font-weight: 800;
}

.system-paid-leave-form-grid input,
.system-paid-leave-form-grid select,
.system-paid-leave-textarea-field textarea {
  background: #ffffff;
  border: 1px solid #c8d3db;
  border-radius: 6px;
  color: #1f2d36;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 10px;
}

.system-paid-leave-textarea-field textarea {
  min-height: 88px;
  resize: vertical;
}

.system-paid-leave-edit-meta {
  color: #5b6b76;
  font-size: 12px;
  margin: 0;
}

.system-paid-leave-balance-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.system-paid-leave-balance-summary div {
  background: #f5f8fa;
  border: 1px solid #d8e1e7;
  border-radius: 6px;
  padding: 10px 12px;
}

.system-paid-leave-balance-summary dt {
  color: #5b6b76;
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 4px;
}

.system-paid-leave-balance-summary dd {
  color: #1d2b34;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

@media (max-width: 1180px) {
  .system-paid-leave-workbar,
  .system-paid-leave-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .system-paid-leave-actions {
    margin-left: 0;
    width: 100%;
  }

  .system-paid-leave-summary {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .system-paid-leave-main {
    padding: 14px 12px 84px;
  }

  .system-paid-leave-filters,
  .system-paid-leave-summary {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .system-paid-leave-search,
  .system-paid-leave-search input,
  .system-paid-leave-filter,
  .system-paid-leave-filter input,
  .system-paid-leave-filter select,
  .system-paid-leave-metric {
    width: 100%;
  }

  .system-paid-leave-balance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
