:root {
  --zbtool-shell-padding: 10px;
  --zbtool-workspace-gap: 14px;
  --zbtool-intro-font-size: 14px;
  --zbtool-lang-min-width: 210px;
  --zbtool-lang-label-size: 14px;
  --zbtool-lang-select-height: 40px;
}

.panel-work,
.panel-guide {
  overflow: hidden;
}

.rsa-tool {
  display: grid;
  gap: 18px;
}

.rsa-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid #d9e0ea;
  border-radius: 14px;
  overflow: hidden;
  background: #f8fbff;
}

.rsa-tab {
  border: 0;
  border-right: 1px solid #d9e0ea;
  background: transparent;
  color: #31425d;
  min-height: 56px;
  padding: 0 16px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
}

.rsa-tab:nth-child(7n) {
  border-right: 0;
}

.rsa-tab.active {
  background: #ffffff;
  color: #124f9f;
  font-weight: 700;
}

.rsa-pane {
  display: none;
  gap: 18px;
}

.rsa-pane.active {
  display: grid;
}

.rsa-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rsa-field {
  min-width: 0;
}

.rsa-field.wide {
  grid-column: span 2;
}

.rsa-field.full {
  grid-column: 1 / -1;
}

.rsa-field label,
.rsa-editor-head,
.rsa-note-label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  color: #4d5d75;
}

.rsa-field input,
.rsa-field select,
.rsa-editor textarea,
.rsa-result-box {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 12px;
  background: #fff;
  color: #2e3a4c;
}

.rsa-field input,
.rsa-field select {
  height: 46px;
  padding: 0 14px;
  font-size: 14px;
}

.rsa-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: #6a7688;
}

.rsa-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.rsa-editor textarea {
  min-height: 240px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.75;
  resize: vertical;
}

.rsa-editor.compact textarea,
.rsa-textarea-short {
  min-height: 156px;
}

.rsa-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.rsa-actions.single {
  grid-template-columns: 1fr;
}

.rsa-actions button,
.rsa-inline-actions button,
.rsa-sub-actions button {
  border: 1px solid #cfd8e6;
  background: #f4f8fd;
  color: #38506f;
  border-radius: 10px;
  min-height: 48px;
  padding: 0 18px;
  font-size: 15px;
  cursor: pointer;
}

.rsa-actions .primary,
.rsa-inline-actions .primary {
  background: #2d8cf0;
  border-color: #2d8cf0;
  color: #fff;
}

.rsa-actions .secondary,
.rsa-inline-actions .secondary {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.rsa-inline-actions,
.rsa-sub-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rsa-sub-actions {
  margin-top: 10px;
  justify-content: flex-end;
}

.rsa-result-box {
  min-height: 120px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: #445066;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  white-space: pre-wrap;
}

.rsa-tip {
  min-height: 22px;
  font-size: 14px;
  color: #5b677b;
}

.rsa-tip.error {
  color: #d43c3c;
}

.section-head {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  color: #24415f;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
  border: 1px solid #d7e7ff;
}

.rsa-guide-list {
  margin: 0;
  padding-left: 22px;
  color: #4b596d;
  line-height: 1.9;
}

@media (max-width: 1180px) {
  .rsa-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rsa-field.wide {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .rsa-editor-grid,
  .rsa-actions,
  .rsa-fields {
    grid-template-columns: 1fr;
  }

  .rsa-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rsa-sub-actions {
    justify-content: flex-start;
  }

  .rsa-tab {
    padding: 0 14px;
  }

  .rsa-tab:nth-child(7n) {
    border-right: 1px solid #d9e0ea;
  }

  .rsa-tab:nth-child(2n) {
    border-right: 0;
  }
}
