#tbs-co-switch {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  gap: 8px;
  margin: 0 12px 0 8px;
  color: #fff;
  font: 600 13px "Segoe UI", Arial, sans-serif;
  position: relative;
  z-index: 20;
  white-space: nowrap;
  min-width: max-content;
}

#tbs-co-switch > span {
  flex: 0 0 auto;
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
}

#tbs-co-switch .tbs-co-btn {
  display: inline-flex !important;
  align-items: center !important;
  width: 260px !important;
  min-width: 260px !important;
  max-width: 320px !important;
  height: 36px !important;
  min-height: 36px !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-radius: 8px !important;
  background: #245c4c !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  padding: 0 32px 0 12px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  flex: 0 0 260px !important;
  box-sizing: border-box !important;
  cursor: pointer;
  text-align: left;
  position: relative;
}

#tbs-co-switch .tbs-co-btn em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

#tbs-co-switch .tbs-co-btn::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #fff;
  transform: translateY(-40%);
}

#tbs-co-menu {
  position: fixed;
  z-index: 2147483646;
  background: #fff;
  color: #1a3d32;
  border: 1px solid #c9ddb8;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 36, 32, 0.28);
  padding: 6px;
  max-height: 320px;
  overflow: auto;
}

#tbs-co-menu .tbs-co-item {
  display: block;
  width: 100%;
  min-height: 40px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #1a3d32 !important;
  -webkit-text-fill-color: #1a3d32 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: left;
  padding: 8px 12px;
  cursor: pointer;
}

#tbs-co-menu .tbs-co-item:hover,
#tbs-co-menu .tbs-co-item.is-active {
  background: #e8f2e1;
}

#tbs-co-menu .tbs-co-empty {
  padding: 10px 12px;
  color: #5a6b63;
  font-size: 13px;
  font-weight: 600;
}

#tbs-co-switch .tbs-co-new {
  height: 36px !important;
  min-width: 108px;
  border: 0;
  border-radius: 8px;
  background: #c9ddb8;
  color: #1a4338;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}

.navbar .collapse-menu-icon .d-flex {
  align-items: center !important;
  flex-wrap: nowrap;
}

#tbs-co-panel {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: #e8f2e1;
  border: 1px solid #c9ddb8;
  border-radius: 12px;
}

#tbs-co-panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #1a3d32;
}

#tbs-co-list {
  display: grid;
  gap: 8px;
}

.tbs-co-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #d5e4cc;
}

.tbs-co-row strong {
  flex: 1;
  color: #1a3d32;
}

.tbs-co-row span {
  color: #5a6b63;
  font-size: 12px;
}

.tbs-co-row button {
  height: 28px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  cursor: pointer;
  font-weight: 600;
}

.tbs-co-row .tbs-co-use {
  background: #1a4338;
  color: #fff;
}

.tbs-co-row .tbs-co-del {
  background: #f8d0d5;
  color: #8b2332;
}

.tbs-co-row.is-active {
  border-color: #1a4338;
  box-shadow: inset 3px 0 0 #1a4338;
}

#tbs-co-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(15, 36, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#tbs-co-modal .tbs-co-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

#tbs-co-modal h3 {
  margin: 0 0 12px;
  color: #1a3d32;
}

#tbs-co-modal .tbs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#tbs-co-modal label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #1a3d32;
}

#tbs-co-modal input,
#tbs-co-modal select,
#tbs-co-modal textarea {
  height: 34px;
  border: 1px solid #c5d0c2;
  border-radius: 8px;
  padding: 0 8px;
  font-weight: 500;
}

#tbs-co-modal textarea {
  height: 64px;
  padding: 8px;
  resize: vertical;
}

#tbs-co-modal .tbs-span {
  grid-column: 1 / -1;
}

#tbs-co-modal .tbs-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

#tbs-co-modal .tbs-save {
  background: #1a4338;
  color: #fff;
  border: 0;
  border-radius: 8px;
  height: 36px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

#tbs-co-modal .tbs-cancel {
  background: #eee;
  color: #333;
  border: 0;
  border-radius: 8px;
  height: 36px;
  padding: 0 14px;
  cursor: pointer;
}

#tbs-co-modal .tbs-error {
  color: #8b2332;
  margin: 8px 0 0;
  font-size: 13px;
}

#tbs-co-busy {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  background: rgba(15, 36, 32, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#tbs-co-busy[hidden] {
  display: none !important;
}

#tbs-co-busy > div {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  color: #1a3d32;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

#tbs-co-busy p {
  margin: 8px 0 0;
  color: #5a6b63;
}

@media (max-width: 900px) {
  #tbs-co-modal .tbs-grid {
    grid-template-columns: 1fr;
  }
  #tbs-co-switch {
    margin: 0 8px 0 0;
  }
  #tbs-co-switch .tbs-co-btn {
    width: 180px !important;
    min-width: 180px !important;
    max-width: 200px !important;
    flex-basis: 180px !important;
  }
  #tbs-co-switch > span {
    display: none;
  }
}
