.layout-switch {
  display: inline-flex;
  border: 1px solid #bdd3c8;
  padding: 3px;
  border-radius: 8px;
  background: #edf4f0;
  gap: 3px;
}
.layout-switch button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 5px;
  color: #345b50;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.layout-switch button.active {
  background: #176c59;
  color: white;
  font-weight: 650;
}
.sheet-panel {
  border: 1px solid #cbdcd3;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  min-width: 0;
}
.sheet-tabs {
  display: flex;
  background: #f2f6f3;
  border-bottom: 1px solid #cbdcd3;
  gap: 3px;
  padding: 10px 12px 0;
}
.sheet-tabs button {
  font: inherit;
  padding: 12px 24px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #45665b;
  font-weight: 600;
  cursor: pointer;
}
.sheet-tabs button.active {
  background: white;
  border-bottom-color: #187051;
  color: #155c42;
  border-radius: 6px 6px 0 0;
}
.sheet-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #dce6e0;
}
.sheet-tools input {
  min-width: 120px;
  flex: 1;
}
.sheet-tools select {
  max-width: 230px;
}
.sheet-count {
  font-size: 12px;
  color: #466358;
  white-space: nowrap;
}
.sheet-savebar {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #dce6e0;
  background: #f8fbf9;
}
.sheet-savebar > div {
  flex: 1;
  min-width: 0;
}
.sheet-savebar strong {
  display: block;
  font-size: 13px;
  color: #264d3d;
}
.sheet-savebar span {
  display: block;
  font-size: 11px;
  color: #4c685d;
  margin-top: 5px;
  line-height: 1.5;
}
.sheet-savebar.has-changes {
  background: #fff8e4;
}
.sheet-savebar.has-changes strong {
  color: #7b5c19;
}
.sheet-panel button:disabled {
  opacity: 0.45;
  cursor: default;
}
.sheet-scroll {
  overflow: auto;
  max-height: calc(100dvh - 370px);
  min-height: 360px;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-gutter: stable;
}
.edit-sheet {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #173f32;
  font-size: 13px;
}
.edit-sheet th,
.edit-sheet td {
  padding: 0;
  border: 0;
  border-right: 1px solid #dce5df;
  border-bottom: 1px solid #dce5df;
  vertical-align: middle;
  height: 39px;
}
.edit-sheet thead th {
  position: sticky;
  text-align: left;
  z-index: 3;
  font-size: 12px;
  font-weight: 650;
}
.edit-sheet .sheet-letters th {
  top: 0;
  height: 23px;
  text-align: center;
  color: #426557;
  background: #edf3ef;
  font-size: 10px;
  font-weight: 500;
}
.edit-sheet .sheet-labels th {
  top: 23px;
  height: 38px;
  background: #e6f0e9;
  color: #244c3b;
  padding: 0 11px;
  white-space: nowrap;
  border-bottom: 2px solid #abc9b7;
}
.sheet-labels th span {
  color: #6b8376;
  font-size: 12px;
}
.edit-sheet th:first-child {
  position: sticky;
  left: 0;
  z-index: 4;
  text-align: center;
  background: #f0f5f1;
  font-size: 11px;
  color: #567466;
  width: 44px;
  padding: 0;
}
.edit-sheet tbody th:first-child {
  z-index: 2;
  font-weight: 400;
}
.edit-sheet td:first-of-type {
  position: sticky;
  left: 44px;
  z-index: 1;
  background: white;
  border-right: 2px solid #c0d2c7;
}
.edit-sheet input,
.edit-sheet select {
  display: block;
  width: 100%;
  height: 39px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  outline: 0;
  border-radius: 0;
  background: #fffef5;
  font-family: inherit;
  font-size: 13px;
  color: #163c2e;
  box-shadow: none;
  min-width: 0;
}
.edit-sheet select {
  appearance: auto;
  padding-right: 3px;
}
.edit-sheet input:focus,
.edit-sheet select:focus {
  outline: 2px solid #208862;
  outline-offset: -2px;
  background: white;
  position: relative;
  z-index: 2;
}
.edit-sheet input::placeholder {
  color: #6c8477;
  font-size: 12px;
}
.edit-sheet .sheet-value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 9px 10px;
  font-size: 12px;
  color: #4b675b;
}
.edit-sheet .is-readonly {
  background: #f1f4f2;
}
.edit-sheet .is-dirty input,
.edit-sheet .is-dirty select {
  background: #fff0c0;
}
.edit-sheet .is-error input,
.edit-sheet .is-error select {
  background: #fff0ed;
  box-shadow: inset 0 0 0 2px #bd5c4d;
}
.edit-sheet tr.sheet-row--vacancy > th {
  background: #e6f4eb;
  color: #347653;
  border-left: 3px solid #81b99b;
}
.edit-sheet tr.sheet-row--unnamed > th {
  background: #fff2d1;
  border-left: 3px solid #c49a48;
}
.edit-sheet tr.sheet-row--held td {
  background: #f1f4f2;
}
.sheet-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #f2f7f3;
  border-top: 1px solid #cbdcd3;
  color: #466358;
  font-size: 11px;
  line-height: 1.7;
}
.sheet-footer strong {
  font-size: 12px;
  white-space: nowrap;
}
.sheet-errors:not(:empty) {
  padding: 13px 16px;
  color: #913f32;
  background: #fff1ed;
  border-bottom: 1px solid #eac8bf;
  font-size: 13px;
  line-height: 1.7;
}
.sheet-errors ul {
  padding-left: 20px;
  margin: 6px 0 0;
}
.sheet-errors button {
  font: inherit;
  color: #913f32;
  text-align: left;
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}
.sheet-choose {
  padding: 40px 25px;
  background: #fff;
  border: 1px solid #ceddd4;
  border-radius: 10px;
}
.sheet-choose strong {
  font-size: 18px;
}
.sheet-choose p {
  color: #4b675b;
}
.sheet-empty {
  height: 100px !important;
  text-align: center;
  color: #4b675b;
}
.sheet-panel input,
.sheet-panel select {
  font-family: inherit;
}
.person-note {
  font-size: 12px;
  color: #526b59;
  margin: 6px 0 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
@media (max-width: 740px) {
  .layout-switch {
    width: 100%;
  }
  .layout-switch button {
    flex: 1;
  }
  .heading .actions:has(.layout-switch) {
    width: 100%;
    flex-wrap: wrap;
  }
  .sheet-tools {
    flex-wrap: wrap;
    padding: 11px;
  }
  .sheet-tools input {
    flex-basis: 100%;
  }
  .sheet-tools select {
    max-width: 100%;
    min-width: 0;
    flex: 1;
    font-size: 12px;
  }
  .sheet-tabs {
    padding: 7px 7px 0;
  }
  .sheet-tabs button {
    flex: 1;
    padding: 12px 8px;
    font-size: 13px;
  }
  .sheet-savebar {
    flex-wrap: wrap;
    padding: 12px;
  }
  .sheet-savebar > div {
    flex-basis: 100%;
    margin-bottom: 4px;
  }
  .sheet-savebar > .btn {
    flex: 1;
    white-space: normal;
  }
  .sheet-scroll {
    max-height: 60dvh;
    min-height: 340px;
  }
  .edit-sheet input,
  .edit-sheet select {
    font-size: 14px;
    height: 43px;
  }
  .edit-sheet td:first-of-type {
    position: static;
  }
  .sheet-footer {
    font-size: 11px;
    align-items: flex-start;
  }
  .sheet-footer span {
    max-width: 85%;
  }
}
.edit-sheet textarea {
  display: block;
  width: 100%;
  height: 39px;
  min-width: 0;
  min-height: 39px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  outline: 0;
  resize: none;
  background: #fffef5;
  color: #163c2e;
  font: inherit;
  font-size: 13px;
  line-height: 19px;
  box-shadow: none;
}
.edit-sheet textarea:focus {
  outline: 2px solid #208862;
  outline-offset: -2px;
  background: white;
}
.edit-sheet .is-dirty textarea {
  background: #fff0c0;
}
.edit-sheet .is-error textarea {
  background: #fff0ed;
  box-shadow: inset 0 0 0 2px #bd5c4d;
}
