.table {
  background-color: var(--bs-tertiary-bg);
  margin-bottom: 0;
}

.table.table-rounded {
  border-radius: 10px;
}

.m-table-row th {
  background-color: var(--m-indigo-3);
}

.m-table-row th:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.m-table-row th:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

th[contenteditable="true"]:focus,
td[contenteditable="true"]:focus {
  box-shadow: inset 0 0 1px 1px rgb(from var(--m-indigo) r g b / 100%);
  outline: none; /* Убираем стандартное выделение */
}

th[contenteditable="true"].invalid,
td[contenteditable="true"].invalid {
  box-shadow: inset 0 0 1px 1px rgb(from var(--m-red) r g b / 100%);
  outline: none; /* Убираем стандартное выделение */
}

td.success {
  background-color: var(--m-emerald-1) !important;
  color: var(--m-emerald) !important;
}

td.warning {
  background-color: var(--m-yellow-1) !important;
  color: var(--m-yellow) !important;
}

td.danger {
  background-color: var(--m-scarlet-1) !important;
  color: var(--m-scarlet) !important;
}

td.summary.success {
  background-color: var(--m-emerald-3) !important;
  color: var(--m-emerald-7) !important;
}

td.summary.warning {
  background-color: var(--m-yellow-3) !important;
  color: var(--m-yellow-7) !important;
}

td.summary.danger {
  background-color: var(--m-scarlet-3) !important;
  color: var(--m-scarlet-7) !important;
}

.row-delete-icon {
  position: absolute;
  left: 96px;
  top: 50%;
  transform: translateY(-48%);
  cursor: pointer;
  font-size: 10px;
  color: var(--m-indigo);
}

.row-delete-icon:hover {
  color: var(--m-red);
}

.row-delete-icon {
  -webkit-transition: all .2s ease-out;
  -moz-transition: all .2s ease-out;
  -o-transition: all .2s ease-out;
  transition: all .2s ease-out;
}

th.text-start {
  position: relative;
  padding-right: 25px;
}

.table-sticky-headers thead {
  position: sticky;
  top: 0.5px;
  background: var(--bs-tertiary-bg);
  z-index: 1020;
}

.table-sticky-headers thead tr:first-child th {
  top: 0.5px;
  position: sticky;
  z-index: 1030;
}

.table-sticky-headers thead tr:nth-child(2) th {
  top: 28px;
  position: sticky;
  z-index: 1025;
}

.table-sticky-headers thead tr th::after {
  content: '';
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  right: 0;
  box-shadow:
    0 0 0 0.55px var(--bs-border-color),
    -0.55px 0 0 var(--bs-border-color),
    0.55px 0 0 var(--bs-border-color);
}

.table-sticky-headers thead tr:first-child::after {
  content: '';
  height: 100%;
  width: 100%;
  position: absolute;
  right: 0;
  box-shadow: 0 -2px 0 0 var(--bs-border-color);
}

.table-sticky-left thead tr:first-child th:first-child,
.table-sticky-left thead tr:nth-child(2) th:first-child,
.table-sticky-left tbody tr th:first-child,
.table-sticky-left tbody tr td:first-child {
  background: var(--bs-tertiary-bg);
  position: sticky !important;
  left: 0.5px !important;
  z-index: 1010;
}

.table-sticky-left thead tr:first-child th:first-child,
.table-sticky-left thead tr:nth-child(2) th:first-child {
  z-index: 1070;
}

.table-sticky-left thead tr:first-child th:first-child::after,
.table-sticky-left thead tr:nth-child(2) th:first-child::after,
.table-sticky-left tbody tr th:first-child::after,
.table-sticky-left tbody tr td:first-child::after {
  content: '';
  height: 100%;
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  box-shadow:
    0 0 0 0.55px var(--bs-border-color),
    -0.9px 0 0 var(--bs-border-color),
    0.55px 0 0 var(--bs-border-color) !important;
}