.dib { max-width: 720px; }

/* ---- tabs ---- */
.dib-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.dib-tab {
  padding: 8px 12px; font-size: 13px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; cursor: pointer; color: #27331f;
}
.dib-tab-active { background: #19616a; border-color: #19616a; color: #fff; }

/* ---- panel form controls ---- */
.dib-panel { display: flex; flex-direction: column; gap: 14px; }
.dib-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #27331f; }
.dib-panel input, .dib-panel select {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; background: #fff; color: #27331f;
}
.dib-panel input:focus, .dib-panel select:focus { outline: 2px solid #19616a; outline-offset: 1px; }

.dib-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dib-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dib-row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.dib-check-row { display: flex; flex-wrap: wrap; gap: 14px; }
.dib-check {
  flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 700;
}
.dib-check input[type="checkbox"] { width: auto; padding: 0; }

.dib-subhead {
  font-size: 12.5px; font-weight: 700; color: #5b6b56; text-transform: uppercase; letter-spacing: .02em;
  margin-top: 4px;
}

/* ---- repeatable rows (inputs / buttons) ---- */
.dib-rows { display: flex; flex-direction: column; gap: 10px; }
.dib-row-item {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
}
.dib-row-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dib-row-item-title { font-size: 12.5px; font-weight: 700; color: #5b6b56; text-transform: uppercase; letter-spacing: .02em; }
.dib-row-fields { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.dib-row-fields label { flex: 1 1 130px; min-width: 100px; }
.dib-row-remove {
  flex: 0 0 auto; padding: 8px 12px; font-size: 12.5px; font-weight: 700; color: #a33;
  border: 1px solid #d9e0d4; border-radius: 6px; background: #fff; cursor: pointer;
}
.dib-row-remove:hover { border-color: #a33; }
.dib-add-btn {
  align-self: flex-start; padding: 8px 14px; font-size: 13px; font-weight: 700;
  border: 1px dashed #19616a; border-radius: 6px; background: #fff; color: #19616a; cursor: pointer;
}

/* ---- JSON / command output ---- */
.dib-out { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.dib-out-block {
  padding: 12px 14px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
  display: flex; flex-direction: column; gap: 6px;
}
.dib-out-label { font-size: 12.5px; font-weight: 700; color: #5b6b56; text-transform: uppercase; letter-spacing: .02em; }
.dib-out-code {
  font-family: ui-monospace, monospace; font-size: 13px; color: #19616a; font-weight: 600;
  white-space: pre-wrap; word-break: break-word; line-height: 1.5;
}
.dib-cmd {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
}
.dib-cmd code { font-family: ui-monospace, monospace; font-size: 13.5px; color: #19616a; font-weight: 700; word-break: break-all; }
.dib-cmd span { font-size: 12.5px; color: #5b6b56; }

.dib-btn {
  padding: 8px 14px; font-size: 13px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; color: #27331f; cursor: pointer; white-space: nowrap; align-self: flex-start;
}
.dib-btn:focus { outline: 2px solid #19616a; outline-offset: 1px; }
.dib-btn-primary { background: #19616a; border-color: #19616a; color: #fff; }

.dib-hint { font-size: 12.5px; color: #5b6b56; margin: 4px 0 0; }
.dib-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }
.dib-badge {
  display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .02em; color: #19616a; background: #fff; border: 1px solid #19616a; border-radius: 999px;
}

@media (max-width: 480px) {
  .dib-row2, .dib-row3, .dib-row4 { grid-template-columns: 1fr; }
}
