label {
  display: block;
  font-size: 15px;
  color: var(--muted);
  margin: 4px 0 3px;
}
input[type='text'], select, textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 11px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  /* Native <select> dropdown menus may use white background; keep controls readable. */
  background: var(--panel);
  color: var(--text);
  font-size: 16px;
}
/* Give native select arrow some breathing room */
select {
  /* Use a custom arrow so spacing is consistent across browsers */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
/* Dropdown menu items (browser-dependent; helps in Chrome/Edge). */
select option {
  background: var(--panel);
  color: var(--text);
}
textarea {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.row > * {
  min-width: 0;
}
@media (max-width: 900px) {
  .row {
    grid-template-columns: 1fr;
  }
}
.mini {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.segmented button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 6px 11px;
  font-size: 13px;
}
.segmented button + button {
  border-left: 1px solid var(--border);
}
.segmented button.is-active {
  background: rgba(124, 58, 237, 0.20);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.35);
}
.inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-field label {
  margin: 0;
}
.urlpair {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.urlpair input[type='text'] {
  margin: 0;
}
.filepair {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
.filepair input[type='text'] {
  flex: 1 1 120px;
  min-width: 0;
  max-width: 100%;
}
.filepair input[type='file'] {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
