/* ── Form inputs ─────────────────────────────────────────────────────────── */

/*
 * Unfold's default border-base-200 is oklch(92.8% .006 ...) — nearly
 * invisible on a white background. Override it only for form inputs so
 * other uses of that color (dividers, headers) are unaffected.
 */
#content-main .field-line input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
#content-main .field-line textarea,
#content-main .field-line select {
  border-color: #cbd5e1 !important; /* slate-300 — clearly visible */
  border-width: 1px !important;
  border-radius: 8px !important;
  background-color: #ffffff !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#content-main .field-line input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus,
#content-main .field-line textarea:focus,
#content-main .field-line select:focus {
  border-color: #16a34a !important;
  outline: 2px solid rgba(22, 163, 74, 0.2) !important;
  outline-offset: 0 !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12) !important;
}

/* Readonly/disabled fields — slightly muted so they read as non-editable */
#content-main .field-line input[readonly],
#content-main .field-line input[disabled] {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

/* ── Fieldset sections ───────────────────────────────────────────────────── */

/*
 * Wrap each fieldset in a card so sections are visually distinct
 * and the form reads as organised panels rather than one long page.
 */
#content-main fieldset.module {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  overflow: hidden;
}

#content-main fieldset.module h2 {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0 !important;
  border-top: none !important;
  border-dashed: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em;
  padding: 12px 16px !important;
  text-transform: uppercase;
}

/* ── Field rows ──────────────────────────────────────────────────────────── */

#content-main .form-row {
  border-bottom: 1px solid #f1f5f9;
  padding: 12px 0;
}

#content-main .form-row:last-child {
  border-bottom: none;
}

/* Labels */
#content-main .field-line label {
  color: #374151 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

/* ── Inline tabular sections ─────────────────────────────────────────────── */

#content-main .inline-group {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  overflow: hidden;
}

#content-main .inline-group h2 {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  text-transform: uppercase;
}


/* ── Brand pipeline badges ───────────────────────────────────────────────── */

/* One solid color per stage so the changelist reads by color alone:
   gray → amber → violet → blue as work progresses, green when handed off. */
.pipeline-badge {
  border-radius: 6px;
  color: #ffffff !important;
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
  white-space: nowrap;
}

a.pipeline-badge:hover {
  filter: brightness(1.1);
  text-decoration: none;
}

/* Unclone still scanning / establishing */
.pipeline-badge--waiting-claim-link {
  background: #64748b;
}

/* Operator: review claim link candidates */
.pipeline-badge--claim-link-approval {
  background: #d97706;
}

/* Operator: approve discovered contacts */
.pipeline-badge--contact-approval {
  background: #7c3aed;
}

/* Operator: approve email drafts & launch */
.pipeline-badge--email-approval {
  background: #0284c7;
}

/* Handed off to Smartlead */
.pipeline-badge--sent-to-smartlead {
  background: #16a34a;
}

/* Disqualified / manually stopped */
.pipeline-badge--stopped {
  background: #dc2626;
}

/* No campaign yet */
.pipeline-badge--no-campaign {
  background: #e5e7eb;
  color: #4b5563 !important;
}


/* ── Changelist action bar ───────────────────────────────────────────────── */

#changelist-actions-wrapper {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  padding: 10px 12px;
}

#changelist-actions select[name="action"] {
  min-width: 260px;
}

#changelist-actions button[name="index"] {
  min-width: 112px;
  min-height: 36px;
  background: #16a34a !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  position: relative;
}

#changelist-actions button[name="index"]:hover,
#changelist-actions button[name="index"]:focus {
  background: #15803d !important;
}

#changelist-actions .action-counter {
  color: #374151 !important;
}
