/**
 * END-DP2E — Client Files operational workspace
 * Visual language aligned with approved Home dashboard (DP2D)
 */

.ed-client-files-root {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ed-client-files-root .card-body {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

body.ed-client-files-view .ed-content {
  padding-bottom: var(--ed-space-4);
}

/* ─── END-DP2C-01 / END-DP2D-02 — Client File detail ─── */

.ed-client-file-detail-root {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ed-client-file-detail-root .card-body {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

/* ─── END-DP2E-01 — Client File detail (DESIGN LOCKED) ───
   Visual treatment complete. Change only for new functionality or user testing. */

body.ed-client-file-detail-view .ed-topbar {
  display: none;
}

body.ed-client-file-detail-view .ed-content {
  padding: var(--ed-space-4) var(--ed-space-6) var(--ed-space-4);
}

.cf-detail {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-3);
  min-width: 0;
}

/* Page header — identity, status, summary */
.cf-detail-header {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-3);
  padding-bottom: var(--ed-space-2);
  border-bottom: 0;
}

.cf-detail-header-main {
  display: block;
}

.cf-detail-responsibility {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ed-ink, #1c1917);
}

.cf-detail-responsibility .cf-detail-lead-label {
  display: inline;
  margin-right: 6px;
}

.cf-responsibility-panel {
  margin-top: 10px;
  max-width: 28rem;
}

.cf-responsibility-panel p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ed-text-muted, #57534e);
}

.ed-settings-activity {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ed-settings-activity li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  font-size: 13px;
}

.ed-activity-when {
  color: var(--ed-text-muted, #57534e);
  margin-right: 8px;
}

.cf-detail-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--ed-space-4);
  flex-wrap: wrap;
}

.cf-detail-title {
  margin: 0;
  font-family: var(--ed-font-display);
  font-size: clamp(1.75rem, 2.8vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--ed-navy);
}

.cf-detail-lead {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: var(--ed-space-2) 0 0;
}

.cf-detail-lead-label {
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 500;
  color: var(--ed-text-muted);
  line-height: 1.3;
}

.cf-detail-lead-name {
  font-family: var(--ed-font);
  font-size: var(--ed-text-base);
  font-weight: 400;
  color: var(--ed-navy);
  line-height: 1.45;
}

.cf-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ed-space-1) var(--ed-space-6);
  margin: var(--ed-space-2) 0 0;
  padding: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-muted);
  line-height: 1.5;
}

.cf-detail-summary-item {
  white-space: nowrap;
}

.cf-detail-summary-value {
  font-weight: 500;
  color: var(--ed-text-muted);
}

.cf-detail-breadcrumb {
  margin: 0;
}

.cf-detail-back {
  font-weight: 600 !important;
  font-size: var(--ed-text-sm) !important;
  color: var(--ed-navy) !important;
  letter-spacing: 0.01em;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cf-detail-back:hover {
  color: var(--ed-amber-muted) !important;
}

.cf-detail-status {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--ed-space-2);
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.cf-detail-workflow-feedback {
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-muted);
  opacity: 0;
  transition: opacity 0.35s ease;
  white-space: nowrap;
}

.cf-detail-workflow-feedback.is-visible {
  opacity: 1;
}

.cf-detail-status--readonly {
  align-items: center;
}

.cf-detail-status-badge {
  margin: 0;
}

.cf-detail-status-label {
  font-size: var(--ed-text-xs);
  font-weight: 500;
  color: var(--ed-text-muted);
  letter-spacing: normal;
  text-transform: none;
}

.cf-detail-status-select {
  min-width: 128px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: var(--ed-text-sm);
  border: 1px solid var(--ed-border);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-white);
}

.cf-detail-file-note {
  margin: 0;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  line-height: 1.4;
}

.cf-detail-banner {
  margin: 0;
  padding: var(--ed-space-2) var(--ed-space-3);
  font-size: var(--ed-text-sm);
}

/* Section hierarchy: Journeys >> Traveller > Actions */
.cf-detail-section {
  border-radius: var(--ed-radius);
  background: var(--ed-white);
  border: 1px solid var(--ed-border-light);
  box-shadow: var(--ed-shadow-sm);
}

.cf-detail-section--primary {
  border-color: var(--ed-border-light);
  box-shadow: var(--ed-shadow-sm);
}

.cf-detail-section--tertiary {
  background: var(--ed-white);
  border: 1px solid var(--ed-border-light);
  box-shadow: var(--ed-shadow-sm);
  padding: var(--ed-space-3) var(--ed-space-4);
}

.cf-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ed-space-2);
  padding: var(--ed-space-2) var(--ed-space-3);
  border-bottom: 1px solid var(--ed-border-light);
}

.cf-detail-section-head--quotes {
  padding: var(--ed-space-3) var(--ed-space-4);
  border-bottom-color: var(--ed-border-light);
  background: var(--ed-white);
}

.cf-detail-section-head-actions {
  display: flex;
  align-items: center;
  gap: var(--ed-space-2);
  flex-shrink: 0;
}

.cf-detail-section-title {
  margin: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-navy);
}

.cf-detail-section--primary .cf-detail-section-title {
  font-size: var(--ed-text-xs);
  font-weight: 600;
}

.cf-detail-count {
  font-size: var(--ed-text-xs);
  font-weight: 700;
  color: var(--ed-navy-soft);
  background: var(--ed-white);
  border: 1px solid var(--ed-border);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.3;
}

.cf-detail-section-note {
  margin: 0;
  padding: 0 var(--ed-space-4) var(--ed-space-3);
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
}

.cf-detail-quote-item {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-2);
  margin-bottom: var(--ed-space-3);
}

.cf-detail-quote-main {
  display: flex;
  align-items: stretch;
  gap: var(--ed-space-2);
}

.cf-detail-quote-item:last-child {
  margin-bottom: 0;
}

.cf-detail-quote-main .cf-detail-quote-row {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.cf-detail-quote-delete {
  flex-shrink: 0;
  align-self: center;
  color: var(--ed-text-muted);
  border-color: var(--ed-border-light);
}

.cf-detail-quote-delete:hover {
  color: var(--ed-danger);
  border-color: var(--ed-danger);
  background: var(--ed-danger-light, #fef3f2);
}

.cf-detail-quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ed-space-3);
  padding: var(--ed-space-3) var(--ed-space-4);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-surface);
  text-align: left;
}

.cf-detail-quote-row:last-child {
  margin-bottom: 0;
}

.cf-detail-quote-body {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-2);
  min-width: 0;
  flex: 1;
}

.cf-detail-quote-name {
  display: block;
  font-family: var(--ed-font);
  font-size: var(--ed-text-base);
  font-weight: 500;
  color: var(--ed-navy);
  line-height: 1.3;
}

.cf-detail-quote-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ed-space-2) var(--ed-space-3);
}

.cf-detail-quote-status {
  margin: 0;
  font-size: var(--ed-text-xs);
}

.cf-detail-quote-revision,
.cf-detail-quote-updated {
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-muted);
}

.cf-detail-quote-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ed-ivory);
  color: var(--ed-navy-soft);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.cf-detail-quote-row:hover {
  transform: none;
  border-color: var(--ed-border);
  background: var(--ed-white);
  box-shadow: var(--ed-shadow-sm);
}

.cf-detail-quote-row:hover .cf-detail-quote-arrow {
  background: var(--ed-navy);
  color: var(--ed-white);
}

.cf-detail-quotes-empty {
  padding: var(--ed-space-4);
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  text-align: center;
}

/* Journey Overview — read-only summary from Journey Setup (Step 1) */
.cf-journey-overview-panel {
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius);
  background: var(--ed-surface-muted, #fafbfc);
  margin-left: var(--ed-space-2);
}

.cf-journey-overview-summary {
  padding: var(--ed-space-2) var(--ed-space-3);
  cursor: pointer;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  color: var(--ed-navy);
  list-style: none;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cf-journey-overview-summary::-webkit-details-marker {
  display: none;
}

.cf-journey-overview-summary::after {
  content: "▾";
  float: right;
  font-size: 11px;
  color: var(--ed-text-subtle);
  transition: transform 0.15s ease;
}

.cf-journey-overview-panel:not([open]) .cf-journey-overview-summary::after {
  transform: rotate(-90deg);
}

.cf-journey-overview {
  padding: var(--ed-space-3) var(--ed-space-3) var(--ed-space-4);
  border-top: 1px solid var(--ed-border-light);
}

.cf-jo-identity {
  margin: 0 0 var(--ed-space-2);
  font-family: var(--ed-font);
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  line-height: 1.35;
}

.cf-jo-empty {
  margin: 0 0 var(--ed-space-2);
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
}

.cf-jo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ed-space-2) var(--ed-space-4);
}

.cf-jo-field {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cf-jo-label {
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ed-text-muted);
  line-height: 1.2;
  margin: 0;
}

.cf-jo-value {
  font-family: var(--ed-font);
  font-size: var(--ed-text-sm);
  color: var(--ed-navy);
  line-height: 1.35;
  word-break: break-word;
  margin: 0;
}

.cf-jo-actions {
  margin-top: var(--ed-space-4);
  padding-top: var(--ed-space-3);
  border-top: 1px solid var(--ed-border-light);
}

/* Legacy traveller context styles — retained for reference during migration */
.cf-detail-traveller-panel {
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius);
  background: var(--ed-surface);
  box-shadow: none;
}

.cf-detail-traveller-summary {
  padding: var(--ed-space-3) var(--ed-space-4);
  cursor: pointer;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  color: var(--ed-navy);
  list-style: none;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cf-detail-traveller-summary::-webkit-details-marker {
  display: none;
}

.cf-detail-traveller-summary::after {
  content: "▾";
  float: right;
  font-size: 11px;
  color: var(--ed-text-subtle);
  transition: transform 0.15s ease;
}

.cf-detail-traveller-panel:not([open]) .cf-detail-traveller-summary::after {
  transform: rotate(-90deg);
}

.cf-detail-traveller {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-4);
  padding: var(--ed-space-4);
  border-top: 1px solid var(--ed-border-light);
}

.cf-detail-traveller-group {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-2);
}

.cf-detail-traveller-group--lead,
.cf-detail-traveller-group--notes {
  padding-bottom: var(--ed-space-1);
}

.cf-detail-traveller-group-label {
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ed-text-muted);
}

.cf-detail-traveller-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ed-space-2);
}

.cf-detail-traveller-save {
  padding: var(--ed-space-3) var(--ed-space-4) var(--ed-space-4);
  border-top: 1px solid var(--ed-border-light);
}

.cf-detail-field label {
  margin-bottom: 4px;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  color: var(--ed-navy);
}

.cf-detail-field input,
.cf-detail-field textarea {
  padding: 7px 10px;
  font-family: var(--ed-font);
  font-size: var(--ed-text-sm);
}

.cf-detail-field textarea {
  min-height: 48px;
  resize: vertical;
}

.cf-detail-notes-field {
  margin-top: 0;
}

/* File actions */
.cf-detail-actions-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ed-space-4);
  flex-wrap: wrap;
}

.cf-detail-accepted {
  min-width: 0;
  flex: 1;
}

.cf-detail-accepted-heading {
  margin: 0 0 4px;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-navy);
}

.cf-detail-accepted-value {
  margin: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-sm);
  font-weight: 400;
  color: var(--ed-text-muted);
  line-height: 1.45;
}

.cf-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ed-space-2);
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .cf-detail-traveller-row {
    grid-template-columns: 1fr;
  }

  .cf-detail-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cf-detail-status {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .cf-detail-status-select {
    flex: 1;
    min-width: 0;
  }

  .cf-detail-section-head--quotes {
    flex-direction: column;
    align-items: stretch;
  }

  .cf-detail-section-head-actions {
    justify-content: space-between;
  }

  .cf-detail-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .cf-detail-actions .btn {
    flex: 1;
  }
}

.ed-cf-workspace {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-3);
  min-width: 0;
}

/* Toolbar — mirrors dashboard search row */
.ed-cf-toolbar {
  display: flex;
  align-items: center;
  gap: var(--ed-space-2);
  flex-wrap: wrap;
}

.ed-cf-toolbar .ed-search {
  flex: 1;
  min-width: 220px;
}

.ed-cf-toolbar-actions {
  flex-shrink: 0;
}

.ed-cf-summary {
  font-size: var(--ed-text-xs);
  color: var(--ed-text-muted);
  line-height: 1.4;
}

.ed-cf-summary-attn {
  color: var(--ed-amber-muted);
  font-weight: 600;
}

.ed-cf-footnote {
  margin: var(--ed-space-4) 0 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-subtle);
  line-height: 1.4;
}

.ed-cf-archived {
  margin-top: var(--ed-space-5);
  padding-top: var(--ed-space-4);
  border-top: 1px solid var(--ed-border-light);
}

.ed-cf-archived .ws-list-row {
  margin-bottom: var(--ed-space-1);
}

/* Card grid */
.ed-cf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--ed-space-2);
}

.ed-cf-card {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-2);
  width: 100%;
  padding: var(--ed-space-3);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius);
  background: var(--ed-white);
  box-shadow: var(--ed-shadow-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ed-cf-card:hover {
  border-color: var(--ed-amber-border);
  box-shadow: var(--ed-shadow);
}

.ed-cf-card-attn {
  border-color: var(--ed-amber-border);
  background: var(--ed-surface);
  box-shadow: inset 3px 0 0 var(--ed-amber);
}

.ed-cf-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: var(--ed-space-2);
}

.ed-cf-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--ed-ivory);
  color: var(--ed-navy-soft);
}

.ed-cf-card-icon svg {
  width: 15px;
  height: 15px;
}

.ed-cf-card-attn .ed-cf-card-icon {
  background: var(--ed-amber-soft);
  color: var(--ed-amber-muted);
}

.ed-cf-card-body {
  min-width: 0;
}

.ed-cf-card-name {
  display: block;
  font-size: var(--ed-text-sm);
  font-weight: 600;
  color: var(--ed-navy);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-cf-card-ref {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ed-text-muted);
  margin-top: 2px;
}

.ed-cf-card-arrow {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ed-text-subtle);
  margin-top: 2px;
}

.ed-cf-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ed-space-2);
  padding-top: var(--ed-space-1);
  border-top: 1px solid var(--ed-border-light);
}

.ed-cf-card-foot .ws-status-badge {
  margin-left: 0;
  flex-shrink: 0;
  font-size: 9px;
  padding: 2px 8px;
}

.ed-cf-card-meta {
  font-size: 10px;
  color: var(--ed-text-muted);
  white-space: nowrap;
  text-align: right;
}

.ed-cf-card-attn-note {
  font-size: 10px;
  font-weight: 600;
  color: var(--ed-amber-muted);
  line-height: 1.3;
}

.ed-cf-empty {
  padding: var(--ed-space-5) var(--ed-space-4);
  text-align: center;
  border: 1px dashed var(--ed-border);
  border-radius: var(--ed-radius);
  background: var(--ed-white);
}

.ed-cf-empty p {
  margin: 0;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
}

.ed-cf-empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--ed-space-2);
  margin-top: var(--ed-space-3);
}

.ed-cf-no-results {
  padding: var(--ed-space-4);
  font-size: var(--ed-text-sm);
  color: var(--ed-text-muted);
  text-align: center;
  background: var(--ed-white);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius);
}

@media (max-width: 720px) {
  .ed-cf-grid {
    grid-template-columns: 1fr;
  }

  .ed-cf-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ed-cf-toolbar-actions .btn {
    width: 100%;
  }
}

.cf-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 3px;
  margin: 0;
  padding: 0 2px;
  border-bottom: 1px solid #c5cdd6;
}
.cf-tab {
  appearance: none;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin: 0 0 -1px;
  padding: 8px 10px 9px;
  border: 1px solid #c5cdd6;
  border-bottom: 1px solid transparent;
  border-radius: 5px 5px 0 0;
  background: #eef1f4;
  color: #5c6673;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}
.cf-tab--details {
  background: #e3eef6;
  color: #3a5566;
  border-color: #b9ccd8;
}
.cf-tab--journeys {
  background: #e3f0e8;
  color: #3a5a46;
  border-color: #b7d0c0;
}
.cf-tab--documents {
  background: #f3ead8;
  color: #5a4b30;
  border-color: #dcc9a6;
}
.cf-tab--notes {
  background: #ece6f3;
  color: #524468;
  border-color: #cfc4de;
}
.cf-tab.is-active {
  z-index: 1;
  font-weight: 600;
  padding-top: 9px;
  padding-bottom: 10px;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.7) inset;
}
.cf-tab--details.is-active {
  background: #f3f8fb;
  color: #2f4a5a;
  border-color: #b9ccd8;
  border-bottom-color: #f3f8fb;
}
.cf-tab--journeys.is-active {
  background: #f3faf5;
  color: #2f4a3a;
  border-color: #b7d0c0;
  border-bottom-color: #f3faf5;
}
.cf-tab--documents.is-active {
  background: #fbf6ec;
  color: #4d3f27;
  border-color: #dcc9a6;
  border-bottom-color: #fbf6ec;
}
.cf-tab--notes.is-active {
  background: #f7f4fa;
  color: #46395a;
  border-color: #cfc4de;
  border-bottom-color: #f7f4fa;
}
.cf-file-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}
.cf-tab-panel {
  margin: 0;
  padding: 16px 18px 18px;
  border: 1px solid #c5cdd6;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  min-width: 0;
  background: #fff;
}
.cf-file-body[data-cf-active-tab="details"] .cf-tab-panel {
  background: #f3f8fb;
  border-color: #b9ccd8;
}
.cf-file-body[data-cf-active-tab="journeys"] .cf-tab-panel {
  background: #f3faf5;
  border-color: #b7d0c0;
}
.cf-file-body[data-cf-active-tab="documents"] .cf-tab-panel {
  background: #fbf6ec;
  border-color: #dcc9a6;
}
.cf-file-body[data-cf-active-tab="notes"] .cf-tab-panel {
  background: #f7f4fa;
  border-color: #cfc4de;
}
.cf-file-body .cf-tab-panel.cf-detail-section {
  border-radius: 0 0 8px 8px;
  box-shadow: none;
}
.cf-tab-lead, .cf-tab-empty { color: var(--ed-text-muted, #5c6673); font-size: 14px; }
.cf-quote-life {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  margin: 4px 0 0;
}
.cf-quote-life-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 3px;
  margin: 0;
  padding: 0 2px;
  border-bottom: 1px solid #c5cdd6;
}
.cf-quote-life-tab {
  appearance: none;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin: 0 0 -1px;
  padding: 7px 6px 8px;
  border: 1px solid #c5cdd6;
  border-bottom: 1px solid transparent;
  border-radius: 5px 5px 0 0;
  background: #eef1f4;
  color: #5c6673;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}
.cf-quote-life-tab--draft {
  background: #e3eef6;
  color: #3a5566;
  border-color: #b9ccd8;
}
.cf-quote-life-tab--issued {
  background: #e3f0e8;
  color: #3a5a46;
  border-color: #b7d0c0;
}
.cf-quote-life-tab--confirmed {
  background: #f3ead8;
  color: #5a4b30;
  border-color: #dcc9a6;
}
.cf-quote-life-tab--accepted {
  background: #ece6f3;
  color: #524468;
  border-color: #cfc4de;
}
.cf-quote-life-tab--cancelled {
  background: #f3e6ea;
  color: #6a3d46;
  border-color: #d4b8c0;
}
.cf-quote-life-tab.is-active {
  z-index: 1;
  font-weight: 700;
  padding-top: 8px;
  padding-bottom: 9px;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.7) inset;
}
.cf-quote-life-tab--draft.is-active {
  background: #f3f8fb;
  color: #2f4a5a;
  border-color: #b9ccd8;
  border-bottom-color: #f3f8fb;
}
.cf-quote-life-tab--issued.is-active {
  background: #f3faf5;
  color: #2f4a3a;
  border-color: #b7d0c0;
  border-bottom-color: #f3faf5;
}
.cf-quote-life-tab--confirmed.is-active {
  background: #fbf6ec;
  color: #4d3f27;
  border-color: #dcc9a6;
  border-bottom-color: #fbf6ec;
}
.cf-quote-life-tab--accepted.is-active {
  background: #f7f4fa;
  color: #46395a;
  border-color: #cfc4de;
  border-bottom-color: #f7f4fa;
}
.cf-quote-life-tab--cancelled.is-active {
  background: #fbf4f6;
  color: #5a323a;
  border-color: #d4b8c0;
  border-bottom-color: #fbf4f6;
}
.cf-quote-life-body {
  margin: 0;
  padding: 14px 14px 12px;
  border: 1px solid #c5cdd6;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  min-width: 0;
  background: #fff;
}
.cf-quote-life[data-quote-life-tab="draft"] .cf-quote-life-body {
  background: #f3f8fb;
  border-color: #b9ccd8;
}
.cf-quote-life[data-quote-life-tab="issued"] .cf-quote-life-body {
  background: #f3faf5;
  border-color: #b7d0c0;
}
.cf-quote-life[data-quote-life-tab="confirmed"] .cf-quote-life-body {
  background: #fbf6ec;
  border-color: #dcc9a6;
}
.cf-quote-life[data-quote-life-tab="accepted"] .cf-quote-life-body {
  background: #f7f4fa;
  border-color: #cfc4de;
}
.cf-quote-life[data-quote-life-tab="cancelled"] .cf-quote-life-body {
  background: #fbf4f6;
  border-color: #d4b8c0;
}
.cf-quote-life-empty {
  margin: 4px 0 2px;
  color: var(--ed-text-muted, #5c6673);
  font-size: 14px;
}
.cf-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 20px;
  margin: 0 0 16px;
}
.cf-details-grid dt {
  font-size: 12px;
  color: var(--ed-text-muted, #5c6673);
  margin: 0 0 2px;
}
.cf-details-grid dd { margin: 0; font-size: 15px; }
.cf-details-next {
  margin: 0 0 16px;
}
.cf-details-next p {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--ed-navy, #171d26);
}
.cf-details-journeys {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 16px;
  min-width: 0;
}
.cf-details-journey-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--ed-border-light, #d8dee6);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
}
.cf-details-journey-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.cf-details-journey-meta {
  font-size: 13px;
  color: var(--ed-text-muted, #5c6673);
}
.cf-journey-group { margin: 0 0 18px; min-width: 0; }
.cf-journey-group-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}
.cf-journey-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
  min-width: 0;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ed-border-light, #d8dee6);
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}
.cf-journey-card-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.cf-journey-title {
  margin: 0;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.cf-journey-card-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.cf-journey-quote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
}
.cf-journey-number {
  font-weight: 600;
  color: var(--ed-navy, #171d26);
}
.cf-journey-version,
.cf-journey-updated,
.cf-journey-context {
  margin: 0;
  font-size: 13px;
  color: var(--ed-text-muted, #5c6673);
  overflow-wrap: anywhere;
}
.cf-journey-progress {
  width: 100%;
  min-width: 0;
  padding: 8px 0 2px;
}
.cf-life,
.cf-progress,
.ce-life,
.ep-life {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
}
.cf-life li,
.cf-progress li,
.ce-life li,
.ep-life li {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cf-life li:not(:last-child)::after,
.ce-life li:not(:last-child)::after,
.ep-life li:not(:last-child)::after {
  content: none;
}
.cf-life li span,
.cf-progress li span,
.cf-progress-step,
.ce-life li,
.ep-life li {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #c5cdd6;
  border-bottom-width: 2px;
  border-radius: 5px 5px 0 0;
  background: #eef1f4;
  color: #6a7380;
  text-align: center;
  white-space: nowrap;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cf-life li[data-stage="draft"] span,
.cf-life li:nth-child(1) span,
.ce-life li:nth-child(1),
.ep-life li:nth-child(1) {
  background: #e3eef6;
  color: #4a6576;
  border-color: #b9ccd8;
}
.cf-life li[data-stage="issued"] span,
.cf-life li:nth-child(2) span,
.ce-life li:nth-child(2),
.ep-life li:nth-child(2) {
  background: #e3f0e8;
  color: #4a6a56;
  border-color: #b7d0c0;
}
.cf-life li[data-stage="confirmed"] span,
.cf-life li:nth-child(3) span,
.ce-life li:nth-child(3),
.ep-life li:nth-child(3) {
  background: #f3ead8;
  color: #6a5a38;
  border-color: #dcc9a6;
}
.cf-life li[data-stage="accepted"] span,
.cf-life li:nth-child(4) span,
.ce-life li:nth-child(4),
.ep-life li:nth-child(4) {
  background: #ece6f3;
  color: #5a4c70;
  border-color: #cfc4de;
}
.cf-progress li[data-stage="enquiry"] span,
.cf-progress li[data-stage="enquiry"] .cf-progress-step {
  background: #e3eef6;
  color: #4a6576;
  border-color: #b9ccd8;
}
.cf-progress li[data-stage="quoting"] span,
.cf-progress li[data-stage="quoting"] .cf-progress-step {
  background: #e3f0e8;
  color: #4a6a56;
  border-color: #b7d0c0;
}
.cf-progress li[data-stage="option_held"] span,
.cf-progress li[data-stage="option_held"] .cf-progress-step {
  background: #f3ead8;
  color: #6a5a38;
  border-color: #dcc9a6;
}
.cf-progress li[data-stage="confirmed"] span,
.cf-progress li[data-stage="confirmed"] .cf-progress-step {
  background: #e4eeea;
  color: #3e5a52;
  border-color: #b7cfc6;
}
.cf-progress li[data-stage="travelled"] span,
.cf-progress li[data-stage="travelled"] .cf-progress-step {
  background: #ece6f3;
  color: #5a4c70;
  border-color: #cfc4de;
}
.cf-progress li[data-stage="closed"] span,
.cf-progress li[data-stage="closed"] .cf-progress-step {
  background: #e8ebe8;
  color: #4e5550;
  border-color: #c5cbc5;
}
.cf-life .is-ahead span,
.cf-progress .is-ahead span,
.cf-progress .is-ahead .cf-progress-step,
.ce-life .is-ahead,
.ep-life .is-ahead {
  opacity: 0.55;
  font-weight: 500;
}
.cf-life .is-done span,
.cf-progress .is-done span,
.cf-progress .is-done .cf-progress-step,
.ce-life .is-done,
.ep-life .is-done {
  opacity: 0.78;
  font-weight: 600;
}
.cf-life .is-current span,
.cf-progress .is-current span,
.cf-progress .is-current .cf-progress-step,
.ce-life .is-current,
.ep-life .is-current {
  opacity: 1;
  font-weight: 700;
  box-shadow: 0 1px 0 #fff;
  border-bottom-color: currentColor;
}
.cf-progress li,
.cf-progress li span,
.cf-progress-step {
  text-transform: none;
  letter-spacing: 0.01em;
}
.cf-progress-step {
  appearance: none;
  cursor: pointer;
}
.cf-progress-step:hover {
  filter: brightness(0.98);
}
.cf-progress .is-current .cf-progress-step:hover {
  filter: none;
}
.cf-life--cancelled,
.cf-progress--cancelled,
.ce-life--cancelled,
.ep-life--cancelled {
  margin: 0;
  padding: 6px 10px;
  border-left: 3px solid #b42318;
  background: #f8eeee;
  color: #9f1d1d;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
  border-radius: 0 4px 4px 0;
}
.cf-progress-cancelled {
  margin: 0;
  font-weight: 600;
}
.cf-progress-cancelled-note {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--ed-text-muted, #5c6673);
}
.cf-client-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  min-width: 0;
  max-width: 100%;
}
.cf-progress {
  flex: 1 1 28em;
}
.cf-progress-change {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ed-text-muted, #5c6673);
  text-transform: none;
  letter-spacing: 0;
}
.cf-progress-change select {
  min-width: 0;
  text-transform: none;
}
.cf-life-more { position: relative; flex: 0 0 auto; }
.cf-life-more-toggle {
  appearance: none;
  background: none;
  border: 0;
  color: #1f5f78;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.cf-life-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 10em;
  background: #fff;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(23, 29, 38, 0.08);
}
.cf-life-more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 6px 8px;
  cursor: pointer;
  font: inherit;
}
.cf-life-danger { color: #9f1d1d; }
.cf-notes-label { display: block; font-size: 14px; }
.cf-notes-label textarea {
  display: block;
  width: 100%;
  margin: 8px 0 12px;
  font: inherit;
  font-size: 15px;
  padding: 10px;
}
.cf-doc-list { list-style: none; margin: 0 0 12px; padding: 0; }
.cf-doc-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #d8dee6;
}
.ed-cf-archived-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ed-cf-archived-row .ws-list-row { flex: 1; }
.ed-settings { max-width: 860px; }
.ed-settings-layout {
  display: grid;
  grid-template-columns: 12em minmax(0, 1fr);
  gap: 24px;
}
.ed-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ed-settings-nav-item {
  appearance: none;
  background: none;
  border: 0;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  color: inherit;
}
.ed-settings-nav-item.is-active {
  background: rgba(31, 95, 120, 0.08);
  color: #1f5f78;
  font-weight: 600;
}
.ed-settings-lead { color: #5c6673; font-size: 14px; }
.ed-settings-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #5c6673;
  line-height: 1.4;
}
.ed-settings-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ed-navy, #0F1F33);
}
.ed-branding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: start;
}
.ed-logo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ed-logo-thumb {
  width: 72px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--ed-border, #E5DFD4);
  border-radius: 6px;
  padding: 4px;
}
.ed-logo-empty {
  width: 72px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #7D8794;
  text-align: center;
  line-height: 1.2;
  background: #fff;
  border: 1px dashed var(--ed-border, #E5DFD4);
  border-radius: 6px;
}
.ed-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.ed-colour-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ed-colour-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--ed-border, #E5DFD4);
  flex-shrink: 0;
}
.ed-colour-field input[type="color"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 28px !important;
  height: 28px !important;
  opacity: 0;
  cursor: pointer;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.ed-colour-hex {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ed-navy, #0F1F33);
}
.ce-proposal-preview .ce-fx-quiet-label {
  margin-bottom: 8px;
}
.ce-proposal-preview-frame {
  background: #e8e4dc;
  padding: 14px 16px 18px;
  border-radius: 2px;
}
.ce-proposal-preview .ce-proposal-page--preview {
  max-width: 292px;
  margin: 0 auto;
  box-shadow: 0 8px 22px rgba(15, 31, 51, 0.12);
}
@media (max-width: 1100px) {
  .ed-branding-layout { grid-template-columns: 1fr; }
}
.ed-settings-team { list-style: none; margin: 0; padding: 0; }
.ed-settings-team li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; }
.ed-settings-members li.ed-settings-member {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  border-bottom: 1px solid rgba(15, 31, 51, 0.08);
}
.ed-settings-members li.ed-settings-member:last-child { border-bottom: 0; }
.ed-settings-member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ed-settings-role select {
  font: inherit;
  font-size: 13px;
  padding: 4px 8px;
}
.ed-settings-invite { margin-top: 16px; }
.ed-settings-file { margin: 4px 0 8px; color: #5c6673; }
@media (max-width: 1366px) {
  .cf-tab {
    padding: 7px 8px 8px;
  }
  .cf-tab.is-active {
    padding-top: 8px;
    padding-bottom: 9px;
  }
  .cf-quote-life-tab {
    padding: 6px 4px 7px;
    font-size: 11px;
    letter-spacing: 0.03em;
  }
  .cf-quote-life-tab.is-active {
    padding-top: 7px;
    padding-bottom: 8px;
  }
  .cf-life li span,
  .cf-progress li span,
  .cf-progress-step,
  .ce-life li,
  .ep-life li {
    padding: 5px 6px;
  }
}
@media (max-width: 1280px) {
  .ed-settings-layout { grid-template-columns: 1fr; }
  .ed-settings-nav { flex-direction: row; flex-wrap: wrap; }
}

/* New quote → choose/create client (existing Client Files language) */
.ed-quote-new-root {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ed-quote-new-root .card-body {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

body.ed-quote-new-view .ed-content {
  padding-bottom: var(--ed-space-4);
}

.ed-quote-new {
  min-width: 0;
}

.ed-quote-new .section-title {
  margin: 0 0 var(--ed-space-1);
}

.ed-quote-new-lead {
  margin: 0 0 var(--ed-space-3);
  max-width: 40rem;
  font-size: var(--ed-text-sm);
  line-height: 1.4;
  color: var(--ed-text-muted);
}

.ed-quote-new-actions {
  margin-top: 16px;
}

.ed-quote-new .ed-cf-toolbar {
  margin-bottom: var(--ed-space-3);
}

.ed-quote-new-path {
  margin: 0 0 var(--ed-space-2);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ed-text-muted);
}

.ed-quote-new-empty-note {
  margin: var(--ed-space-1) 0 0;
  font-size: var(--ed-text-xs);
  color: var(--ed-text-subtle);
}

.ed-quote-new .ed-cf-toolbar-actions .btn {
  white-space: nowrap;
}
