/* ============================================
   Coaching Pro V2 — 5-Phase Workflow Styles
   ============================================ */

/* Container */
.coaching-pro-v2-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

[data-coaching-phase] {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  gap: 16px;
}

/* ============================================
   Phase Header
   ============================================ */
.phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.phase-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.context-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-accent, rgba(37, 99, 235, 0.1));
  color: var(--accent, #2563EB);
  white-space: nowrap;
}

.save-indicator {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  transition: opacity 0.3s ease;
  min-height: 20px;
}

.save-indicator.saving {
  color: var(--text-secondary, #6b7280);
}

.save-indicator.saved {
  color: var(--color-success, #16a34a);
}

.save-indicator.error {
  color: var(--color-error, #dc2626);
}

.context-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ============================================
   Phase Actions (Navigation)
   ============================================ */
.phase-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  margin-top: auto;
}

/* ============================================
   Phase 1: KUNDE
   ============================================ */
.phase-search {
  position: relative;
}

.phase-search .form-input {
  width: 100%;
}

.phase-client-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 50vh;
  position: relative;
}

/* Subtle scroll fade indicator at the bottom */
.phase-client-list::after {
  content: '';
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(to top, var(--bg-card, #fff) 0%, transparent 100%);
  pointer-events: none;
  flex-shrink: 0;
}

.client-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.client-card:hover {
  border-color: var(--accent, #2563EB);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.client-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent, #2563EB);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.client-initials.lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-info strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-contact {
  font-size: 12px;
  color: var(--text-secondary);
}

.client-card-meta {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.meta-item {
  font-size: 11px;
  color: var(--text-secondary);
}

.fixieren-btn {
  flex-shrink: 0;
}

/* Client Detail */
.client-detail-card {
  background: var(--bg-card, #fff);
  border: 2px solid var(--accent, #2563EB);
  border-radius: 12px;
  padding: 20px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-header h4 {
  margin: 0;
  flex: 1;
  font-size: 16px;
}

.detail-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-row.two-col {
  flex-direction: row;
  gap: 12px;
}

.form-row.two-col > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row.form-actions {
  flex-direction: row;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* New Client Form */
.new-client-form {
  margin-bottom: 12px;
}

.form-card {
  background: var(--bg-card, #fff);
  border: 2px dashed var(--accent, #2563EB);
  border-radius: 10px;
  padding: 16px;
}

.form-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

/* ============================================
   Phase 2: MEETING
   ============================================ */
.meeting-toggle {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color, #e5e7eb);
}

.toggle-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  background: var(--bg-card, #fff);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.toggle-btn.active {
  background: var(--accent, #2563EB);
  color: #fff;
}

.meeting-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.meeting-card {
  padding: 10px 14px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.meeting-card:hover,
.meeting-card.selected {
  border-color: var(--accent, #2563EB);
}

.meeting-card strong {
  display: block;
  font-size: 13px;
}

.meeting-card span {
  font-size: 11px;
  color: var(--text-secondary);
}

.meeting-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.char-hint {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.char-hint.warn {
  color: var(--warning, #f59e0b);
}

.char-hint.ok {
  color: var(--success, #10b981);
}

/* Doc Requirements */
.doc-requirements {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-item {
  display: flex;
  gap: 6px;
  align-items: center;
}

.doc-item .form-input {
  flex: 1;
}

/* ============================================
   Suggestions (CoachingSuggestionManager)
   ============================================ */
.suggestions-container {
  margin-top: 8px;
}

.suggestions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.suggestions-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.suggestions-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent, #2563EB);
  background: var(--bg-accent, rgba(37, 99, 235, 0.1));
  padding: 2px 8px;
  border-radius: 10px;
}

.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color 0.15s, opacity 0.15s;
}

.suggestion-card.suggestion-accepted {
  border-color: var(--success, #10b981);
  background: rgba(16, 185, 129, 0.04);
}

.suggestion-card.suggestion-rejected {
  opacity: 0.5;
  border-color: var(--border-color, #e5e7eb);
}

.suggestion-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.suggestion-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.suggestion-type-badge svg {
  opacity: 0.7;
}

.suggestion-priority-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.suggestion-priority-badge.priority-high {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.suggestion-priority-badge.priority-medium {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.suggestion-priority-badge.priority-low {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.suggestion-card-body strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.suggestion-card-body p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.suggestion-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  justify-content: flex-end;
}

.status-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}

.status-badge.accepted {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-badge.rejected {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

/* Skeleton loading */
.suggestions-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-skeleton {
  height: 80px;
  background: linear-gradient(90deg, var(--bg-card, #f3f4f6) 25%, rgba(255,255,255,0.5) 50%, var(--bg-card, #f3f4f6) 75%);
  background-size: 200% 100%;
  border-radius: 10px;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.suggestions-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ============================================
   Phase 3: PROMPT
   ============================================ */
.prompt-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.prompt-split-view {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.prompt-editor-col {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.prompt-context-col {
  flex: 2;
  min-width: 0;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-header label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sync-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}

.sync-status.synced {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.sync-status.not-synced {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.coaching-prompt-textarea {
  flex: 1;
  min-height: 200px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.char-count {
  font-size: 11px;
  color: var(--text-secondary);
}

.source-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-accent, rgba(37, 99, 235, 0.1));
  color: var(--accent, #2563EB);
}

/* Context Panel */
.context-panel {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  padding: 16px;
  height: 100%;
  overflow-y: auto;
}

.context-panel h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.context-section {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.context-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.context-section h5 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.context-item {
  font-size: 12px;
  color: var(--text-primary);
  padding: 2px 0;
}

.context-item.notes {
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
}

.suggestion-type-mini {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent, #2563EB);
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 4px;
}

.adapt-changes-panel {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
}

.adapt-changes-panel h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #10b981;
}

.adapt-changes-panel ul {
  margin: 0;
  padding-left: 18px;
}

.adapt-changes-panel li {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* ============================================
   Phase 4: VORSCHAU
   ============================================ */
.vorschau-generate-panel {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card, #fff);
  border: 2px dashed var(--border-color, #e5e7eb);
  border-radius: 12px;
}

.vorschau-generate-panel p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.doc-type-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.doc-type-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.template-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-selector label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Document Tabs */
.document-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  padding-bottom: 0;
  overflow-x: auto;
  flex-shrink: 0;
}

.doc-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
}

.doc-tab.active {
  color: var(--accent, #2563EB);
  border-bottom-color: var(--accent, #2563EB);
}

.doc-tab.modified .modified-dot {
  position: absolute;
  top: 6px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning, #f59e0b);
}

/* Document Preview */
.document-preview {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-section {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  padding: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.section-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}

.section-formatted {
  word-wrap: break-word;
}

.section-formatted h3, .section-formatted h4, .section-formatted h5 {
  margin: 12px 0 6px;
}

.section-formatted ul {
  padding-left: 20px;
  margin: 4px 0;
}

.section-textarea {
  width: 100%;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
}

.vorschau-export-quick {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.vorschau-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color, #e5e7eb);
  border-top-color: var(--accent, #2563EB);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Phase 5: EXPORT
   ============================================ */
.export-documents {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.export-documents h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.export-doc-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.15s;
}

.export-doc-card.selected {
  border-color: var(--accent, #2563EB);
}

.export-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.export-doc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.export-doc-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.export-doc-settings {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  flex-wrap: wrap;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.setting-row label {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.export-additional {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.export-additional h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.export-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.export-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.export-actions {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

/* Export Results */
.export-results {
  text-align: center;
  padding: 30px 20px;
}

.export-success {
  margin-bottom: 20px;
}

.export-success svg {
  color: var(--success, #10b981);
  margin-bottom: 12px;
}

.export-success h4 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--text-primary);
}

.export-result-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 400px;
  margin: 0 auto;
}

.export-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card, #fff);
  border-radius: 6px;
  font-size: 12px;
}

/* ============================================
   Coaching Sync Button (in Editor)
   ============================================ */
.coaching-sync-btn {
  font-size: 11px;
  padding: 4px 10px;
}

/* ============================================
   Common Components
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.badge-muted {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent, #2563EB);
}

.empty-state {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.form-input-sm {
  font-size: 12px;
  padding: 4px 8px;
}

/* ============================================
   Responsive / Mobile
   ============================================ */
@media (max-width: 768px) {
  [data-coaching-phase] {
    padding: 12px 14px;
    gap: 12px;
  }

  .phase-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .phase-client-list {
    max-height: 40vh;
  }

  .prompt-split-view {
    flex-direction: column;
  }

  .prompt-context-col {
    max-height: 200px;
    overflow-y: auto;
  }

  .form-row.two-col {
    flex-direction: column;
    gap: 12px;
  }

  .prompt-actions-bar {
    flex-direction: column;
  }

  .prompt-actions-bar .btn {
    width: 100%;
  }

  .export-doc-settings {
    flex-direction: column;
    gap: 8px;
  }

  .document-tabs {
    -webkit-overflow-scrolling: touch;
  }

  .phase-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg-primary, #fff);
    padding: 12px 0;
    z-index: 5;
  }
}

/* ============================================================
   v4.6 — COACHING PRO: KUNDE PHASE REDESIGN
   Append-only block. Does not modify existing rules.
   ============================================================ */

/* --- Client Profile Header --- */
.client-profile-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card, #fff);
  border-radius: 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  margin-bottom: 16px;
}

.client-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2563EB 0%, #7c3aed 100%);
}

.client-title-block {
  flex: 1;
  min-width: 0;
}

.client-title-block .client-company-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #1a202c);
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-title-block .client-contact-info {
  font-size: 13px;
  color: var(--text-secondary, #64748b);
  margin-bottom: 6px;
}

.client-title-block .badge-fixiert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.client-header-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

/* --- Form Panel --- */
.client-form-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 2px 0;
  color: var(--text-secondary, #64748b);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-section-divider::before,
.form-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color, #e5e7eb);
}

.form-section-divider.coaching-divider {
  color: var(--coaching, #f97316);
}

.form-section-divider.coaching-divider::before,
.form-section-divider.coaching-divider::after {
  background: rgba(249, 115, 22, 0.25);
}

/* --- Input with Inline Action Button --- */
.input-with-action {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.input-with-action .form-input {
  flex: 1;
}

.search-btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  color: var(--text-secondary, #64748b);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.search-btn-inline:hover:not(:disabled) {
  border-color: #2563EB;
  color: #2563EB;
  background: rgba(37, 99, 235, 0.05);
}

.search-btn-inline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search-btn-inline.loading {
  border-color: #f97316;
  color: #f97316;
}

.search-btn-inline.success {
  border-color: #10b981;
  color: #10b981;
  animation: search-success-flash 1s ease forwards;
}

@keyframes search-success-flash {
  0% { background: rgba(16, 185, 129, 0.15); }
  100% { background: transparent; }
}

/* Spinner inside search button */
.search-btn-inline .spin {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* --- Company Research Panel --- */
.research-panel {
  background: rgba(37, 99, 235, 0.04);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-left: 3px solid #2563EB;
  border-radius: 10px;
  padding: 12px 14px;
  animation: research-panel-in 0.25s ease;
}

@keyframes research-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.research-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.research-panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2563EB;
}

.research-panel-meta {
  font-size: 11px;
  color: var(--text-secondary, #64748b);
}

.research-description {
  font-size: 13px;
  color: var(--text-primary, #1a202c);
  line-height: 1.5;
  margin-bottom: 8px;
}

.research-website-link {
  font-size: 12px;
  color: #2563EB;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.research-website-link:hover {
  text-decoration: underline;
}

.research-news-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.research-news-chips::-webkit-scrollbar {
  display: none;
}

.research-news-chip {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 20px;
  font-size: 11px;
  color: #1e40af;
  white-space: nowrap;
  flex-shrink: 0;
}

.research-unavailable {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  padding: 8px 12px;
  background: rgba(107, 114, 128, 0.07);
  border-radius: 8px;
  border: 1px dashed var(--border-color, #e5e7eb);
  text-align: center;
}

/* --- Custom Instructions Section --- */
.custom-instructions-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.instructions-info {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary, #64748b);
  cursor: default;
}

.instructions-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-left: 3px solid var(--coaching, #f97316);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  font-family: inherit;
  color: var(--text-primary, #1a202c);
  background: var(--bg-primary, #fff);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.15s;
}

.instructions-textarea:focus {
  outline: none;
  border-color: var(--coaching, #f97316);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.instructions-textarea::placeholder {
  color: var(--text-secondary, #64748b);
  opacity: 0.7;
  font-style: italic;
}

.char-counter {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 10px;
  color: var(--text-secondary, #64748b);
  pointer-events: none;
  background: var(--bg-primary, #fff);
  padding: 0 2px;
}

.char-counter.near-limit {
  color: #f97316;
  font-weight: 600;
}

.char-counter.at-limit {
  color: #ef4444;
  font-weight: 600;
}

/* --- Context Enrichment Badge (Meeting Phase) --- */
.context-enrichment-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.06) 0%, rgba(249, 115, 22, 0.04) 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 8px;
  font-size: 12px;
  color: #1e40af;
  font-weight: 500;
  margin-bottom: 10px;
}

/* --- Suggestion Rationale (Meeting Phase) --- */
.suggestion-rationale {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(37, 99, 235, 0.05);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  font-style: italic;
  line-height: 1.4;
}

.suggestion-rationale svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #2563EB;
  opacity: 0.7;
}

/* --- Enhanced Client Cards (Kunde Phase list) --- */
.client-card-premium {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-left: 3px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 8px;
}

.client-card-premium:hover {
  border-left-color: #2563EB;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
}

.client-card-premium.selected {
  border-left-color: #2563EB;
  background: rgba(37, 99, 235, 0.03);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .client-profile-header {
    flex-direction: column;
    gap: 12px;
  }

  .client-header-actions {
    flex-direction: row;
    width: 100%;
  }

  .input-with-action {
    flex-direction: column;
  }

  .search-btn-inline {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
  }
}
