/* ============================================
   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%;
}

/* v6.0: Overridden by Bento Grid below — kept for backwards compat */
.phase-client-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 50vh;
  position: relative;
}

/* Subtle scroll fade indicator — disabled in v6.0 grid mode */
.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: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent, #2563EB);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.client-initials.lg {
  width: 52px;
  height: 52px;
  font-size: 18px;
  border-radius: 12px;
}

.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: 1px solid var(--border-color, #e5e7eb);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.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
   ============================================ */
/* v6.0: .meeting-toggle and .toggle-btn moved to Round 2 section below */
/* v6.0: .meeting-card moved to Round 2 section below */

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

.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;
}

/* Split-Panel: Textarea links, Live-Preview rechts */
.section-content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 200px;
}

.section-content-split .section-textarea {
  min-height: 200px;
}

.section-preview {
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  background: var(--bg-hover, #f9fafb);
  font-size: 13px;
  line-height: 1.6;
  word-wrap: break-word;
}

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

.section-preview ul, .section-preview ol {
  padding-left: 20px;
  margin: 4px 0;
}

.section-preview strong { font-weight: 600; }

.section-preview code {
  background: var(--bg-code, #f3f4f6);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .section-content-split {
    grid-template-columns: 1fr;
  }
}

.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;
}

/* v6.0: .export-doc-card moved to Round 2 section below */

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

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

/* v6.0: .export-doc-check checkbox moved to custom checkbox section */

.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;
}

/* v6.0: .export-option checkbox moved to custom checkbox section */

.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;
}

/* Meeting Prep Checklist */
.meeting-prep-checklist {
  margin: 12px 0;
}

.prep-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--bg-hover, #f8f9fa);
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border-color, #e5e7eb);
}

.prep-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px 0;
}

.prep-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-orange, #e67e22);
  cursor: pointer;
}

.prep-item:has(input:checked) {
  text-decoration: line-through;
  color: var(--text-secondary);
}

/* ============================================
   Responsive / Tablet (iPad Portrait + Landscape)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) and (pointer: coarse) {
  [data-coaching-phase] {
    padding: 20px 24px;
  }

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

  .phase-client-list {
    max-height: 45vh;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

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

  .prompt-context-col {
    max-height: none;
    flex: 0 0 280px;
  }

  .phase-actions {
    padding: 12px 24px;
  }

  .phase-actions .btn {
    min-height: 48px;
    font-size: 0.9375rem;
  }
}

/* ============================================
   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;
    padding-bottom: calc(12px + var(--mobile-nav-height, 60px) + env(safe-area-inset-bottom, 0px));
    z-index: 5;
  }
}

/* ============================================
   Mobile Smartphone (640px)
   ============================================ */
@media (max-width: 640px) {
  [data-coaching-phase] {
    padding: 10px 12px;
    padding-bottom: calc(var(--mobile-nav-height, 60px) + env(safe-area-inset-bottom, 0px) + 12px);
    gap: 10px;
  }

  .phase-header {
    gap: 4px;
  }

  .phase-header h3 {
    font-size: 0.95rem;
  }

  .phase-actions {
    position: sticky;
    bottom: 0;
    padding: 10px 0;
    padding-bottom: calc(var(--mobile-nav-height, 60px) + env(safe-area-inset-bottom, 0px) + 10px);
    background: var(--bg-primary, #fff);
    z-index: 5;
  }

  .phase-actions .btn {
    min-height: 44px;
    font-size: 0.85rem;
  }

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

  .prompt-actions-bar .btn {
    width: 100%;
    min-height: 44px;
  }

  .document-tabs {
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .document-tabs::-webkit-scrollbar {
    display: none;
  }

  .document-tabs .tab-btn {
    scroll-snap-align: start;
    flex-shrink: 0;
    min-height: 44px;
  }

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

  .client-profile-header {
    flex-direction: column;
    gap: 10px;
  }

  .export-doc-settings {
    gap: 6px;
  }
}

/* ============================================================
   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: 20px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(124, 58, 237, 0.02) 100%);
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  margin-bottom: 0;
}

.client-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2563EB 0%, #7c3aed 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.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: 14px;
  padding: 20px;
}

.client-form-panel .form-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 2px;
}

.client-form-panel .form-input {
  padding: 10px 14px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-card, #fff);
  color: var(--text-primary, #1a202c);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.client-form-panel .form-input:focus {
  outline: none;
  border-color: var(--accent, #2563EB);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.client-form-panel .form-input::placeholder {
  color: var(--text-muted, #94A3B8);
}

.form-section-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 8px 0;
  color: var(--text-secondary, #64748b);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.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: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(37, 99, 235, 0.02) 100%);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-left: 3px solid var(--accent, #2563EB);
  border-radius: 12px;
  padding: 14px 16px;
  animation: research-panel-in 0.25s ease;
}

.research-panel-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(37, 99, 235, 0.08);
}

.search-btn-sm {
  font-size: 12px;
  padding: 6px 12px;
}

@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-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.client-card-premium:hover {
  border-color: var(--accent, #2563EB);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(37, 99, 235, 0.12), 0 4px 10px -5px rgba(0, 0, 0, 0.04);
}

.client-card-premium:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.client-card-premium.selected {
  border-color: var(--accent, #2563EB);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(124, 58, 237, 0.02) 100%);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* 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;
  }
}

/* --- Button Loading & Success States --- */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.8;
  position: relative;
}

.btn.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

.btn.is-success {
  background: #10B981 !important;
  color: #fff !important;
  border-color: #10B981 !important;
  animation: btn-success-pulse 0.3s ease;
}

@keyframes btn-success-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* --- Save Indicator --- */
.save-indicator {
  font-size: 11px;
  font-weight: 500;
  transition: opacity 0.2s, color 0.2s;
  opacity: 0;
}

.save-indicator.saving {
  opacity: 1;
  color: var(--text-secondary, #64748b);
}

.save-indicator.saved {
  opacity: 1;
  color: #10B981;
}

/* --- Empty State (No Clients) --- */
.kunde-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted, #94A3B8);
  font-size: 14px;
  line-height: 1.6;
  border: 2px dashed var(--border-color, #e5e7eb);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.01);
}

/* --- Slide-in Animation --- */
@keyframes slide-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.client-detail-card,
.client-form-panel {
  animation: slide-in-up 0.25s ease;
}

/* --- Over-Limit Indicator (Prompt Editor) --- */
.over-limit {
  font-weight: 700;
  animation: over-limit-pulse 1s ease infinite;
}

@keyframes over-limit-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* v5.8: Phone — stack footer buttons */
@media (max-width: 480px) {
  .phase-actions {
    flex-direction: column;
    gap: 8px;
  }
  .phase-actions .btn {
    width: 100%;
  }
}

/* v5.9: Mobile Kunde Phase refinements */
@media (max-width: 768px) {
  .client-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 18px;
    border-radius: 12px;
  }

  .client-title-block .client-company-name {
    font-size: 16px;
  }

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

/* ============================================================
   v6.0 — COACHING PRO UX MODERNIZATION (5 Punkte)
   2026 Best Practices: Floating Labels, Bento Grid, Transitions,
   Empty States, Modern Dialogs
   ============================================================ */

/* -------------------------------------------------------
   PUNKT 1: Floating Labels + Modern Form Groups
   Pure CSS via :has() + :placeholder-shown
   ------------------------------------------------------- */

/* Modern form group wrapper with focus glow */
.form-group-modern {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-group-modern .form-input {
  padding: 18px 14px 8px;
  border: 1.5px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-card, #fff);
  color: var(--text-primary, #1a202c);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-group-modern .form-input:focus {
  outline: none;
  border-color: var(--accent, #2563EB);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group-modern .form-input::placeholder {
  color: transparent;
}

/* Floating label */
.form-group-modern .floating-label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted, #94A3B8);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left center;
  background: transparent;
  padding: 0 2px;
  z-index: 1;
}

/* Float up when focused or has content */
.form-group-modern:has(.form-input:focus) .floating-label,
.form-group-modern:has(.form-input:not(:placeholder-shown)) .floating-label {
  top: 6px;
  transform: translateY(0) scale(0.78);
  color: var(--accent, #2563EB);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.form-group-modern:has(.form-input:not(:focus):not(:placeholder-shown)) .floating-label {
  color: var(--text-secondary, #64748b);
}

/* Textarea floating label — anchor top */
.form-group-modern:has(textarea) .floating-label {
  top: 14px;
  transform: translateY(0);
}

.form-group-modern:has(textarea:focus) .floating-label,
.form-group-modern:has(textarea:not(:placeholder-shown)) .floating-label {
  top: 4px;
  transform: scale(0.78);
}

.form-group-modern textarea.form-input {
  padding-top: 22px;
  resize: vertical;
  min-height: 80px;
}

/* Select styling for floating label group */
.form-group-modern select.form-input {
  padding: 18px 14px 8px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

/* Select always shows label floated */
.form-group-modern:has(select) .floating-label {
  top: 6px;
  transform: translateY(0) scale(0.78);
  color: var(--text-secondary, #64748b);
  font-weight: 600;
}

.form-group-modern:has(select:focus) .floating-label {
  color: var(--accent, #2563EB);
}

/* Focus glow on the entire form group */
.form-group-modern:has(.form-input:focus) {
  filter: drop-shadow(0 0 1px rgba(37, 99, 235, 0.08));
}

/* Floating label inside input-with-action (Firma field) */
.form-group-modern:has(.input-with-action) .floating-label {
  left: 14px;
}

.form-group-modern:has(.input-with-action .form-input:focus) .floating-label,
.form-group-modern:has(.input-with-action .form-input:not(:placeholder-shown)) .floating-label {
  top: 6px;
  transform: translateY(0) scale(0.78);
  color: var(--accent, #2563EB);
  font-weight: 600;
}

.form-group-modern:has(.input-with-action .form-input:not(:focus):not(:placeholder-shown)) .floating-label {
  color: var(--text-secondary, #64748b);
}

/* input-with-action inside floating label group */
.form-group-modern .input-with-action .form-input {
  padding: 18px 14px 8px;
}

/* Date/number inputs always show label floated (they have default values) */
.form-group-modern:has(input[type="date"]) .floating-label,
.form-group-modern:has(input[type="number"]) .floating-label {
  top: 6px;
  transform: translateY(0) scale(0.78);
  color: var(--text-secondary, #64748b);
  font-weight: 600;
}

.form-group-modern:has(input[type="date"]:focus) .floating-label,
.form-group-modern:has(input[type="number"]:focus) .floating-label {
  color: var(--accent, #2563EB);
}

/* Two-col modernized */
.form-row-modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .form-row-modern {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------
   PUNKT 2: Modern "Neuer Kunde" Dialog
   Slide-up panel with glassmorphism backdrop
   ------------------------------------------------------- */

.new-client-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: overlay-fade-in 0.2s ease;
  padding: 0;
}

@keyframes overlay-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.new-client-dialog {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card, #fff);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  padding: 0;
  animation: dialog-slide-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 85vh;
  overflow-y: auto;
}

@media (min-width: 641px) {
  .new-client-dialog {
    align-self: center;
    border-radius: 20px;
    margin: 24px;
    max-height: 80vh;
  }
}

@keyframes dialog-slide-up {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

.new-client-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.new-client-dialog-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #1a202c);
}

.new-client-dialog-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: var(--bg-secondary, #f1f5f9);
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  font-size: 16px;
  line-height: 1;
}

.new-client-dialog-close:hover {
  background: var(--bg-hover, #e2e8f0);
  color: var(--text-primary, #1a202c);
}

.new-client-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
}

.new-client-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f8fafc);
  border-radius: 0 0 20px 20px;
}

@media (min-width: 641px) {
  .new-client-dialog-footer {
    border-radius: 0 0 20px 20px;
  }
}

.new-client-dialog-footer .btn {
  min-width: 100px;
}

/* Closing animation */
.new-client-overlay.closing {
  animation: overlay-fade-out 0.2s ease forwards;
}

.new-client-overlay.closing .new-client-dialog {
  animation: dialog-slide-down 0.2s ease forwards;
}

@keyframes overlay-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes dialog-slide-down {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(40px); opacity: 0; }
}

/* -------------------------------------------------------
   PUNKT 3: Bento Grid Client Cards
   CSS Grid + Container Queries + modern card anatomy
   ------------------------------------------------------- */

.phase-client-list {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  overflow-y: auto;
  max-height: 50vh;
  position: relative;
}

@container (min-width: 480px) {
  .phase-client-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }
}

/* Remove the old scroll fade — it conflicts with grid */
.phase-client-list::after {
  display: none;
}

/* Modern premium card with richer anatomy */
.client-card-premium {
  background: var(--bg-card, #fff);
  border: 1.5px solid var(--border-color, #e5e7eb);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Decorative top accent stripe */
.client-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--accent, #2563EB));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.client-card-premium:hover::before {
  opacity: 1;
}

.client-card-premium:hover {
  border-color: var(--accent, #2563EB);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -8px rgba(37, 99, 235, 0.14), 0 4px 12px -4px rgba(0, 0, 0, 0.04);
}

.client-card-premium:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Card header with avatar + info */
.client-card-premium .client-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-card-premium .client-initials {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.client-card-premium .client-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #1a202c);
  line-height: 1.3;
}

.client-card-premium .client-contact {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  margin-top: 1px;
}

/* Meta row with pills */
.client-card-premium .client-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.client-card-premium .tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(37, 99, 235, 0.07);
  color: var(--accent, #2563EB);
}

.client-card-premium .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-secondary, #64748b);
  background: var(--bg-secondary, #f1f5f9);
}

/* Hide the "Auswählen" button inside cards — whole card is clickable */
.client-card-premium .fixieren-btn {
  display: none;
}

/* -------------------------------------------------------
   PUNKT 4: Designed Empty States
   SVG icon + headline + description + CTA
   ------------------------------------------------------- */

.empty-state-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 28px;
  text-align: center;
  border: 2px dashed var(--border-color, #e5e7eb);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.02) 0%, transparent 100%);
  grid-column: 1 / -1; /* span full grid */
}

.empty-state-modern .empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.08) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #2563EB);
  margin-bottom: 4px;
}

.empty-state-modern .empty-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #1a202c);
}

.empty-state-modern .empty-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary, #64748b);
  line-height: 1.5;
  max-width: 320px;
}

.empty-state-modern .empty-cta {
  margin-top: 8px;
  padding: 10px 24px;
  border-radius: 12px;
  border: none;
  background: var(--accent, #2563EB);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.empty-state-modern .empty-cta:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.empty-state-modern .empty-cta:active {
  transform: translateY(0);
}

/* Search empty state — lighter version */
.empty-state-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 24px;
  text-align: center;
  color: var(--text-secondary, #64748b);
  grid-column: 1 / -1;
}

.empty-state-search .empty-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(107, 114, 128, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #94A3B8);
}

.empty-state-search p {
  margin: 0;
  font-size: 13px;
}

/* -------------------------------------------------------
   PUNKT 5: Phase Transitions + Skeleton Loading
   Smooth fade/slide for phase content, shimmer skeletons
   ------------------------------------------------------- */

/* Phase entry animation */
[data-coaching-phase] {
  animation: phase-enter 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes phase-enter {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes phase-enter-back {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Skeleton loader base */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary, #f1f5f9) 25%,
    rgba(255, 255, 255, 0.6) 50%,
    var(--bg-secondary, #f1f5f9) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite ease-in-out;
  border-radius: 8px;
}

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

/* Skeleton card (client card placeholder) */
.skeleton-card {
  background: var(--bg-card, #fff);
  border: 1.5px solid var(--border-color, #e5e7eb);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.skeleton-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-text {
  height: 14px;
  border-radius: 6px;
}

.skeleton-text-sm {
  height: 10px;
  border-radius: 4px;
}

.skeleton-text-lg {
  height: 18px;
  border-radius: 6px;
}

.skeleton-meta {
  display: flex;
  gap: 8px;
}

.skeleton-pill {
  height: 22px;
  border-radius: 20px;
}

/* Skeleton form (meeting/detail form placeholder) */
.skeleton-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
}

.skeleton-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.skeleton-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skeleton-label {
  height: 10px;
  width: 80px;
  border-radius: 4px;
}

.skeleton-input {
  height: 46px;
  border-radius: 12px;
}

/* Loading state for client list */
.phase-client-list.loading {
  pointer-events: none;
}

/* Fade-in for loaded content */
.phase-content-loaded {
  animation: content-fade-in 0.25s ease;
}

@keyframes content-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================================
   v6.0 Round 2 — COACHING PRO UX MODERNIZATION
   Phases 2-5: Meeting, Prompt, Vorschau, Export
   ============================================================ */

/* -------------------------------------------------------
   PHASE 1: Meeting Toggle → Modern Pill Switch
   ------------------------------------------------------- */

.meeting-toggle {
  background: var(--bg-secondary, #f1f5f9);
  padding: 4px;
  border-radius: 99px;
  border: none;
  display: inline-flex;
  gap: 0;
}

.toggle-btn {
  border-radius: 99px;
  padding: 8px 20px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  background: transparent;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-btn:hover:not(.active) {
  background: rgba(37, 99, 235, 0.06);
  color: var(--text-primary, #1a202c);
}

.toggle-btn.active {
  background: var(--accent, #2563EB);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* Meeting Cards → Hover Lift + Selection Ring */

.meeting-card {
  padding: 12px 16px;
  border: 1.5px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  cursor: pointer;
  background: var(--bg-card, #fff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.2s ease;
}

.meeting-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--accent, #2563EB);
}

.meeting-card.selected {
  border-color: var(--accent, #2563EB);
  background: rgba(37, 99, 235, 0.03);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.meeting-card strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #1a202c);
}

.meeting-card span {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  margin-top: 2px;
  display: block;
}

/* -------------------------------------------------------
   PHASE 2a: Custom Checkboxes (CSS-only)
   ------------------------------------------------------- */

.doc-type-option input[type="checkbox"],
.export-doc-check input[type="checkbox"],
.export-option input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
  background: var(--bg-card, #fff);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  flex-shrink: 0;
  margin: 0;
}

.doc-type-option input[type="checkbox"]:hover,
.export-doc-check input[type="checkbox"]:hover,
.export-option input[type="checkbox"]:hover {
  border-color: var(--accent, #2563EB);
}

.doc-type-option input[type="checkbox"]:checked,
.export-doc-check input[type="checkbox"]:checked,
.export-option input[type="checkbox"]:checked {
  background: var(--accent, #2563EB);
  border-color: var(--accent, #2563EB);
}

.doc-type-option input[type="checkbox"]:checked::after,
.export-doc-check input[type="checkbox"]:checked::after,
.export-option input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Checkbox labels — better hover */
.doc-type-option {
  padding: 6px 12px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.doc-type-option:hover {
  background: rgba(37, 99, 235, 0.04);
}

/* -------------------------------------------------------
   PHASE 2b: Export Doc Cards → Visual Selection
   ------------------------------------------------------- */

.export-doc-card {
  background: var(--bg-card, #fff);
  border: 1.5px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.export-doc-card:hover:not(.selected) {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.export-doc-card.selected {
  border-color: var(--accent, #2563EB);
  background: rgba(37, 99, 235, 0.03);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), 0 4px 12px rgba(37, 99, 235, 0.06);
  transform: translateY(-1px);
}

/* -------------------------------------------------------
   PHASE 2c: Context Panel → Visual Hierarchy
   ------------------------------------------------------- */

.context-panel {
  border-top: 3px solid var(--accent, #2563EB);
  border-radius: 12px;
}

.context-panel h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent, #2563EB);
  letter-spacing: 0.02em;
}

.context-section h5 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(37, 99, 235, 0.08);
  padding: 3px 10px;
  border-radius: 99px;
  color: var(--accent, #2563EB);
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 8px;
}

.context-item {
  padding: 3px 0 3px 10px;
  border-left: 2px solid transparent;
  transition: border-color 0.15s ease;
  font-size: 12px;
}

.context-item:hover {
  border-left-color: rgba(37, 99, 235, 0.3);
}

.context-item strong {
  color: var(--text-primary, #1a202c);
  font-weight: 600;
}

.suggestion-type-mini {
  background: rgba(37, 99, 235, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* -------------------------------------------------------
   PHASE 3a: Doc Remove Button
   ------------------------------------------------------- */

.doc-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted, #94A3B8);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.doc-remove:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

/* -------------------------------------------------------
   PHASE 3b: Modern Spinner
   ------------------------------------------------------- */

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(37, 99, 235, 0.15);
  border-top-color: var(--accent, #2563EB);
  border-bottom-color: rgba(37, 99, 235, 0.3);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.vorschau-loading p {
  color: var(--text-secondary, #64748b);
  font-weight: 500;
  font-size: 14px;
}

.vorschau-elapsed {
  font-size: 12px;
  color: var(--text-tertiary, #94a3b8);
  font-weight: 400;
  margin-top: 4px;
}

/* -------------------------------------------------------
   PHASE 3c: Save Indicator Enhancement
   ------------------------------------------------------- */

.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  transition: opacity 0.2s ease, color 0.2s ease;
  animation: indicator-slide-in 0.2s ease;
}

@keyframes indicator-slide-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.save-indicator.saving {
  opacity: 1;
  color: var(--text-secondary, #64748b);
}

.save-indicator.saving::before {
  content: '';
  width: 10px;
  height: 10px;
  border: 2px solid var(--border-color, #e5e7eb);
  border-top-color: var(--accent, #2563EB);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

.save-indicator.saved {
  opacity: 1;
  color: #10B981;
}

.save-indicator.saved::before {
  content: '\2713';
  font-size: 11px;
  font-weight: 700;
}

.save-indicator.error {
  opacity: 1;
  color: #dc2626;
}

.save-indicator.error::before {
  content: '!';
  font-size: 11px;
  font-weight: 700;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1);
  flex-shrink: 0;
}

/* -------------------------------------------------------
   PHASE 4a: Research Panel → Card with Top Accent
   ------------------------------------------------------- */

.research-panel {
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-left: none;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  background: var(--bg-card, #fff);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.research-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, #2563EB), #7c3aed);
}

.research-panel-title {
  font-size: 12px;
}

/* -------------------------------------------------------
   PHASE 4b: Vorschau Generate Panel → Polished
   ------------------------------------------------------- */

.vorschau-generate-panel {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.02) 0%, var(--bg-card, #fff) 100%);
  border: 2px dashed var(--border-color, #e5e7eb);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
}

.vorschau-generate-panel::before {
  content: '';
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.08) 100%);
  border-radius: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none' stroke='%232563EB' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cline x1='10' y1='9' x2='8' y2='9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.vorschau-generate-panel p {
  color: var(--text-secondary, #64748b);
  font-size: 14px;
  margin-bottom: 20px;
}

.doc-type-selector {
  gap: 8px 16px;
}

/* Document tabs — subtle refinement */
.doc-tab {
  border-radius: 8px 8px 0 0;
  padding: 10px 18px;
  font-weight: 600;
}

.doc-tab:hover:not(.active) {
  background: rgba(37, 99, 235, 0.04);
  color: var(--text-primary, #1a202c);
}

.doc-tab.active {
  background: rgba(37, 99, 235, 0.06);
}

/* ============================================================
   v6.0 Round 3 — REFINEMENT & POLISH
   Inline style extraction, mobile responsive, visual polish
   ============================================================ */

/* -------------------------------------------------------
   Regenerate Dropdown (extracted from inline styles)
   ------------------------------------------------------- */

.regenerate-dropdown {
  position: relative;
  display: inline-block;
}

.regenerate-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 20;
  min-width: 260px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 4px 0;
  animation: slide-in-up 0.15s ease;
}

.regenerate-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary, #1a202c);
  transition: background 0.15s ease;
  line-height: 1.4;
}

.regenerate-option:hover {
  background: var(--bg-hover, #f1f5f9);
}

.regenerate-option--destructive {
  color: #dc2626;
}

.regenerate-option--destructive:hover {
  background: rgba(220, 38, 38, 0.06);
}

.regenerate-hint {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
}

.regenerate-divider {
  margin: 2px 12px;
  border: none;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

/* -------------------------------------------------------
   Section Modified Badge (extracted from inline)
   ------------------------------------------------------- */

.section-modified-badge {
  font-size: 0.7rem;
  color: var(--warning, #d97706);
  font-weight: normal;
  margin-left: 6px;
}

/* -------------------------------------------------------
   Doc Requirements Label (extracted from inline)
   ------------------------------------------------------- */

.doc-requirements-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}

/* -------------------------------------------------------
   Section Edit Button States
   ------------------------------------------------------- */

.section-edit-btn {
  transition: all 0.15s ease;
}

.section-edit-btn:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent, #2563EB);
}

.section-edit-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* -------------------------------------------------------
   Form Input Small — consistent sizing
   ------------------------------------------------------- */

.form-input-sm {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}

/* -------------------------------------------------------
   Setting Row — proper layout
   ------------------------------------------------------- */

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

.setting-row label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  white-space: nowrap;
}

.setting-row .form-input-sm {
  min-width: 120px;
}

/* -------------------------------------------------------
   Skeleton Fade-Out (smooth content replacement)
   ------------------------------------------------------- */

.skeleton-card.removing {
  animation: skeleton-fade-out 0.2s ease forwards;
}

@keyframes skeleton-fade-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.97); }
}

/* -------------------------------------------------------
   Mobile Responsive — v6.0 New Components
   ------------------------------------------------------- */

@media (max-width: 480px) {
  /* Floating labels: ensure readability on small screens */
  .form-group-modern .form-input {
    padding: 20px 12px 8px;
    font-size: 15px;
  }

  .form-group-modern .floating-label {
    left: 12px;
  }

  /* Form rows: single column on phone */
  .form-row-modern {
    grid-template-columns: 1fr;
  }

  /* Context panel pills: smaller on phone */
  .context-section h5 {
    font-size: 10px;
    padding: 2px 8px;
  }

  /* New client dialog: full-width bottom sheet */
  .new-client-dialog {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    margin: 0;
  }

  /* Meeting toggle: compact */
  .toggle-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  /* Bento grid: always single column */
  .phase-client-list {
    grid-template-columns: 1fr !important;
  }

  /* Regenerate menu: full width */
  .regenerate-menu {
    min-width: 0;
    width: calc(100vw - 48px);
    right: -16px;
  }

  /* Export card settings: stack on phone */
  .export-doc-settings {
    flex-direction: column;
    gap: 8px;
  }
}

/* ============================================
   Prompt Phase — Context Hint Banner
   ============================================ */
.prompt-context-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary, #64748b);
}

.prompt-context-hint .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================
   Confirm Modal (replaces native confirm())
   ============================================ */
.vorschau-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: overlay-fade-in 0.2s ease;
}

.vorschau-confirm-dialog {
  width: 90%;
  max-width: 420px;
  background: var(--bg-card, #fff);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
  padding: 24px;
  animation: dialog-slide-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.vorschau-confirm-dialog h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
}

.vorschau-confirm-dialog p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-secondary, #64748b);
  line-height: 1.5;
}

.vorschau-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.vorschau-confirm-overlay.closing {
  animation: overlay-fade-in 0.2s ease reverse;
}

.btn-danger {
  background: var(--color-error, #dc2626);
  border-color: var(--color-error, #dc2626);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* ============================================
   Crash Recovery Dialog
   ============================================ */
.coaching-recovery-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: overlay-fade-in 0.2s ease;
}

.coaching-recovery-dialog {
  width: 90%;
  max-width: 440px;
  background: var(--bg-card, #fff);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  padding: 24px;
  animation: dialog-slide-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.coaching-recovery-dialog h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.coaching-recovery-dialog p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-secondary, #64748b);
}

.recovery-details {
  margin: 0 0 20px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary, #64748b);
}

.recovery-details strong {
  color: var(--text-primary, #1e293b);
}

.recovery-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ============================================
   Meeting Timeline (KundePhase)
   ============================================ */
.meeting-timeline {
  margin-top: 8px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 4px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  position: relative;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent, #2563EB);
  margin-top: 5px;
  flex-shrink: 0;
}

.timeline-item--completed .timeline-dot {
  background: var(--color-success, #16a34a);
}

.timeline-item--cancelled .timeline-dot {
  background: var(--text-muted, #94a3b8);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.timeline-content strong {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-meta {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

/* ============================================
   Action Items Widget (MeetingPhase)
   ============================================ */
.action-items-widget {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
}

.action-items-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card, #fff);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  text-align: left;
}

.action-items-toggle:hover {
  background: var(--bg-hover, #f8fafc);
}

.action-items-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--color-warning, #f59e0b);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
}

.toggle-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.action-items-list {
  border-top: 1px solid var(--border, #e2e8f0);
  padding: 8px 14px;
}

.action-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  gap: 8px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
}

.action-item-row:last-child {
  border-bottom: none;
}

.action-item-desc {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-item-due {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
}

/* ============================================
   Context Sidebar (VorschauPhase)
   ============================================ */
.vorschau-context-sidebar {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
}

.context-sidebar-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.context-sidebar-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.context-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.context-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}

.context-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #1e293b);
}

/* Mobile: collapse sidebar behind toggle */
@media (max-width: 1024px) {
  .context-sidebar-toggle {
    display: flex;
  }

  .vorschau-context-sidebar.collapsed .context-sidebar-content {
    display: none;
  }

  .vorschau-context-sidebar .context-sidebar-content {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light, #f1f5f9);
  }
}

/* Desktop: inline horizontal bar */
@media (min-width: 1025px) {
  .vorschau-context-sidebar {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .context-sidebar-content {
    flex-wrap: nowrap;
  }

  .context-item {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .context-label::after {
    content: ':';
  }
}

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

  .phase-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg-card, #fff);
    padding: 12px 0;
    border-top: 1px solid var(--border, #e2e8f0);
    margin-top: auto;
    z-index: 10;
  }

  .phase-actions .btn {
    min-height: 48px;
    font-size: 15px;
  }

  .section-content-split {
    flex-direction: column;
  }

  .section-content-split .section-textarea,
  .section-content-split .section-preview {
    width: 100%;
  }

  .doc-tab {
    min-height: 44px;
    padding: 8px 12px;
  }

  .client-card-premium {
    min-height: 56px;
    padding: 12px;
  }

  .export-doc-card {
    padding: 12px;
  }

  .form-row-modern {
    flex-direction: column;
  }
}
