/* ── Action Links ───────────────────────────── */
.field-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.action-link {
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-decoration: none;
  transition: color var(--transition);
}

.action-link:hover {
  color: var(--primary);
}

.action-link.custom-link {
  color: var(--accent);
  font-weight: 500;
}

.action-link.custom-link:hover {
  color: var(--accent-hover);
}

/* ── Custom Input Inline ────────────────────── */
.custom-input-wrap {
  display: none;
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--custom-input-bg);
  border: 1px dashed var(--chip-border);
  border-radius: var(--radius-sm);
  animation: fadeIn 0.2s ease;
}

.custom-input-wrap.visible {
  display: block;
}

.custom-input-wrap input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.custom-input-wrap input:focus {
  border-color: var(--primary);
}

.custom-input-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}


/* ── Clarify Expandable ─────────────────────── */
.clarify-panel {
  display: none;
  margin-top: 4px;
  padding: 8px 12px;
  background: #fffbe6;
  border: 1px solid #f0e68c;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-light);
  animation: fadeIn 0.2s ease;
}

.clarify-panel.visible {
  display: block;
}

.clarify-panel .clarify-hint {
  margin-top: 4px;
  font-style: italic;
  color: var(--text-muted);
}

/* ── Range Slider ───────────────────────────── */
.range-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.range-slider-input {
  width: 100%;
  accent-color: var(--primary);
}

.range-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* ── Submit / Card Buttons ──────────────────── */
.btn-submit {
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-submit:hover {
  background: var(--accent-hover);
}

.btn-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 10px 24px;
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Brief Floating Tab + Modal (hidden — replaced by Constellation Bar) */
.brief-tab { display: none !important; }
.brief-modal-backdrop { display: none !important; }
.job-header { display: none !important; }
.provider-contact-bars { display: none !important; }

/* Original brief-tab CSS (kept for reference, overridden above) */
.brief-tab-legacy {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  font-family: inherit;
}
.brief-tab:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border-color: var(--accent, #b87333);
}
.brief-tab-badge {
  background: var(--accent, #b87333);
  color: white;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.brief-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  justify-content: center;
  align-items: stretch;
}
.brief-modal-backdrop.active { display: flex; }

.brief-modal {
  background: var(--card-bg);
  border-radius: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 32px 5vw;
  box-shadow: none;
  position: relative;
  animation: briefSlideUp 0.25s ease-out;
}
@keyframes briefSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Two-column layout on wider screens */
.brief-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
@media (min-width: 700px) {
  .brief-modal-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.brief-modal h3 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}
.brief-modal-close {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 201;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.brief-modal-close:hover { background: var(--chip-bg, #f0ede6); color: var(--text); }

.brief-progress { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.progress-bar-container { height: 4px; background: var(--chip-bg, #f0ede6); border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent, #b87333); transition: width 0.5s ease; border-radius: 2px; min-width: 0; }
.progress-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: block; }

.brief-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0ede6;
}
.brief-item:last-child { border-bottom: none; }
.brief-item-content { flex: 1; min-width: 0; }
.brief-item-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.brief-item-value { font-size: 14px; color: var(--text); font-weight: 500; margin-top: 2px; word-break: break-word; }
.brief-image-grid { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.brief-thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.brief-edit-btn {
  width: 28px; height: 28px; border: none; background: none; cursor: pointer;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all 0.15s ease; font-size: 14px; flex-shrink: 0;
}
.brief-edit-btn:hover { background: var(--chip-bg, #f0ede6); color: var(--accent, #b87333); }

.brief-needed-list { list-style: none; padding: 0; margin: 0; }
.brief-needed-list li {
  font-size: 13px; color: var(--text-muted); padding: 4px 0;
  display: flex; align-items: center; gap: 6px;
}
.brief-needed-list li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); display: inline-block; flex-shrink: 0;
}

.brief-estimate { font-size: 20px; font-weight: 700; color: var(--primary); }
.brief-estimate-note { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Event Estimate — sidebar */
.event-est-total { font-size: 20px; font-weight: 700; color: var(--primary); }
.event-est-currency { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.event-est-confidence { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.event-est-budget-fit {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: 20px; font-weight: 500; margin-top: 4px;
}
.event-est-fit-under, .event-est-fit-good { background: #e8f5e9; color: #2e7d32; }
.event-est-fit-over { background: #fff3e0; color: #e65100; }
.event-est-coverage-bar {
  height: 6px; background: var(--chip-bg, #eee); border-radius: 3px;
  margin: 12px 0 4px; overflow: hidden;
}
.event-est-coverage-fill {
  height: 100%; background: var(--accent, #8b7355); border-radius: 3px;
  transition: width 0.3s ease;
}
.event-est-coverage-label { font-size: 11px; color: var(--text-muted); }
.event-est-pending { color: #b8860b; font-weight: 500; }
.event-est-category-header {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted);
  margin: 12px 0 4px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border, #e0d6cc);
}
.event-est-prof-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; font-size: 13px;
}
.event-est-prof-name { color: var(--text); }
.event-est-prof-range { font-weight: 600; color: var(--primary); }
.event-est-prof-pending .event-est-prof-name { color: var(--text-muted); }
.event-est-tbd { font-weight: 400; color: var(--text-muted); font-style: italic; }
.event-est-benchmark { font-weight: 400; color: var(--text-muted); font-style: italic; font-size: 12px; }
.event-est-benchmark-note { font-size: 10px; color: var(--text-muted); font-style: italic; margin-bottom: 4px; }
.event-est-savings { font-size: 11px; color: #2e7d32; margin-top: 4px; }

.brief-empty { font-size: 13px; color: var(--text-muted); font-style: italic; margin: 0; }

/* Inline editing in brief modal */
.brief-item.editing .brief-item-content { display: none; }
.brief-item.editing .brief-edit-btn { display: none; }
.brief-item-editor { display: none; flex: 1; }
.brief-item.editing .brief-item-editor { display: block; }
.brief-item-editor input,
.brief-item-editor select {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  background: var(--bg); color: var(--text);
}
.brief-item-editor input:focus,
.brief-item-editor select:focus { outline: none; border-color: var(--accent, #b87333); }
.brief-editor-actions { display: flex; gap: 8px; margin-top: 8px; }
.brief-editor-actions .btn-save {
  background: var(--accent, #b87333); color: white; border: none;
  padding: 6px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; font-family: inherit;
}
.brief-editor-actions .btn-save:hover { opacity: 0.9; }
.brief-editor-actions .btn-cancel {
  background: none; border: 1px solid var(--border);
  padding: 6px 16px; border-radius: 8px; cursor: pointer; font-size: 13px;
  color: var(--text-muted); font-family: inherit;
}
.brief-editor-actions .btn-cancel:hover { background: var(--chip-bg, #f0ede6); }
.multiselect-editor label { display: flex; align-items: center; gap: 6px; padding: 4px 0; cursor: pointer; font-size: 13px; }
.cleared-slots-notice {
  background: #fff3e0; border: 1px solid #ffe0b2; border-radius: 8px;
  padding: 8px 12px; font-size: 12px; color: #e65100; margin-top: 12px;
}

@media (max-width: 400px) {
  .brief-tab { padding: 6px 10px; font-size: 12px; }
  .brief-modal { padding: 16px 12px; }
}

/* Edit button overlay on submitted form cards */
.card-edit-overlay { position: absolute; top: 8px; right: 8px; z-index: 5; }
.card-edit-btn {
  background: var(--card-bg, #fff); border: 1px solid var(--border); border-radius: 20px;
  padding: 4px 12px; font-size: 12px; cursor: pointer; color: var(--accent, #b87333);
  font-weight: 500; pointer-events: auto; transition: all 0.15s ease;
}
.card-edit-btn:hover { background: var(--accent, #b87333); color: white; }



.milestone-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.milestone-M1 {
  background: #fff3cd;
  color: #856404;
}

.milestone-M2 {
  background: #d4edda;
  color: #155724;
}

.milestone-M3 {
  background: #cce5ff;
  color: #004085;
}

.slot-list {
  list-style: none;
}

.slot-list li {
  padding: 6px 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.slot-list li:last-child {
  border-bottom: none;
}

.slot-check {
  color: var(--success);
}

.slot-missing {
  color: var(--danger);
}

.slot-value {
  color: var(--text-light);
  font-size: 12px;
  margin-left: auto;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats {
  font-size: 12px;
  color: var(--text-muted);
}

.stats div {
  padding: 4px 0;
}

.new-chat-btn {
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.new-chat-btn:hover {
  background: var(--accent-hover);
}
