.tbc-admin {
  max-width: 1120px;
  margin-top: 28px;
}

.tbc-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 4px 24px;
}

.tbc-admin-header h1 {
  margin: 4px 0 8px;
  color: #1d2327;
  font-size: 30px;
  line-height: 1.2;
}

.tbc-admin-header p {
  max-width: 680px;
  margin: 0;
  color: #50575e;
  font-size: 15px;
}

.tbc-kicker {
  color: #2271b1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tbc-version {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 5px 9px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  background: #fff;
  color: #50575e;
  font-size: 12px;
  font-weight: 600;
}

.tbc-tabs {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid #c3c4c7;
}

.tbc-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  color: #50575e;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.tbc-tab:hover,
.tbc-tab:focus {
  color: #135e96;
}

.tbc-tab.is-active {
  color: #1d2327;
}

.tbc-tab.is-active::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 3px;
  background: #2271b1;
  content: "";
}

.tbc-admin-content {
  padding-top: 24px;
}

.tbc-panel {
  border: 1px solid #dcdcde;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tbc-panel-heading {
  padding: 22px 24px 18px;
  border-bottom: 1px solid #f0f0f1;
}

.tbc-panel-heading h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
}

.tbc-panel-heading p,
.tbc-panel > p {
  margin: 0;
  color: #646970;
  font-size: 14px;
  line-height: 1.55;
}

.tbc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 24px;
}

.tbc-field-wide {
  grid-column: 1 / -1;
}

.tbc-field > label:not(.tbc-toggle-row) {
  display: block;
  margin-bottom: 8px;
  color: #1d2327;
  font-weight: 600;
}

.tbc-field input[type="text"],
.tbc-field input[type="password"],
.tbc-field select {
  width: 100%;
  max-width: 540px;
  min-height: 42px;
}

.tbc-field p,
.tbc-toggle-row small {
  display: block;
  margin: 8px 0 0;
  color: #646970;
  line-height: 1.5;
}

.tbc-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 680px;
  cursor: pointer;
}

.tbc-toggle-row input {
  margin-top: 3px;
}

.tbc-copy-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  max-width: 540px;
}

.tbc-copy-row code {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  background: #f6f7f7;
  overflow-wrap: anywhere;
}

.tbc-copy-row-large {
  max-width: none;
  margin-top: 24px;
}

.tbc-color-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tbc-color-row input[type="color"] {
  width: 54px;
  height: 42px;
  padding: 3px;
}

.tbc-appearance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.tbc-preview {
  padding: 18px;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  background: #f6f7f7;
}

.tbc-preview-label {
  display: block;
  margin-bottom: 10px;
  color: #50575e;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tbc-preview-card {
  padding: 22px;
  border: 1px solid rgba(185, 242, 255, 0.22);
  border-radius: 8px;
  background: #2d2926;
  color: #f9f9f9;
}

.tbc-preview-card.is-white {
  border-color: rgba(45, 41, 38, 0.14);
  background: #fff;
  color: #2d2926;
}

.tbc-preview-card.is-transparent {
  border-color: var(--tbc-preview-detail);
  background: transparent;
  color: #1d2327;
}

.tbc-preview-card h3 {
  margin: 0 0 16px;
  color: inherit;
  font-size: 18px;
}

.tbc-preview-input,
.tbc-preview-button {
  display: block;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid var(--tbc-preview-detail);
  border-radius: 6px;
  color: inherit;
}

.tbc-preview-button {
  border-color: #25d366;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.tbc-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.tbc-help-grid .tbc-panel {
  padding-bottom: 24px;
}

.tbc-help-grid .tbc-panel:first-child {
  grid-column: 1 / -1;
}

.tbc-help-grid .tbc-panel > p,
.tbc-steps,
.tbc-code-list,
.tbc-help-grid .tbc-copy-row {
  margin-right: 24px;
  margin-left: 24px;
}

.tbc-steps {
  padding-left: 22px;
  line-height: 1.8;
}

.tbc-code-list {
  display: grid;
  gap: 10px;
  padding-top: 20px;
}

.tbc-code-list code {
  padding: 10px 12px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  background: #f6f7f7;
  overflow-wrap: anywhere;
}

.tbc-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

@media (max-width: 782px) {
  .tbc-admin {
    margin-right: 10px;
  }

  .tbc-admin-header,
  .tbc-tabs {
    flex-wrap: wrap;
  }

  .tbc-tabs {
    padding: 0;
  }

  .tbc-tab {
    flex: 1 1 46%;
    justify-content: center;
  }

  .tbc-fields,
  .tbc-appearance-layout,
  .tbc-help-grid {
    grid-template-columns: 1fr;
  }

  .tbc-help-grid .tbc-panel:first-child {
    grid-column: auto;
  }

  .tbc-copy-row {
    flex-direction: column;
  }
}
