.source-of-funds-app-shell {
  width: 100%;
}

#nav-tool-back {
  display: none;
}

body.route-source-of-funds #nav-tool-back {
  display: inline-flex;
  font-weight: 600;
}

body.route-source-of-funds .header-nav > a[href="/#pricing"],
body.route-source-of-funds #nav-docx-group,
body.route-source-of-funds #nav-pptx-group,
body.route-source-of-funds #nav-pdf-group,
body.route-source-of-funds #nav-documents,
body.route-source-of-funds #nav-settings {
  display: none !important;
}

body.route-source-of-funds .footer-grid {
  display: none;
}

body.route-source-of-funds .footer {
  padding-top: 24px;
}

body.route-source-of-funds .wrap {
  max-width: 1280px;
}

body.route-source-of-funds .footer-bottom {
  max-width: 100%;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.source-of-funds-page {
  display: grid;
  gap: 18px;
  padding: 10px 0 40px;
}

.source-of-funds-page-head,
.source-of-funds-layout,
.source-of-funds-form-stack,
.source-of-funds-upload-panel,
.source-of-funds-manual-panel,
.source-of-funds-review-stack,
.source-of-funds-review-fields,
.source-of-funds-editor-grid,
.source-of-funds-summary-grid,
.source-of-funds-advanced-grid,
.source-of-funds-actions,
.source-of-funds-transaction-list,
.source-of-funds-total-list {
  display: grid;
  gap: 14px;
}

.source-of-funds-layout {
  align-items: start;
}

.source-of-funds-page-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  color: #0d1b2a;
}

.source-of-funds-page-copy {
  margin: 8px 0 0;
  max-width: 720px;
  color: #5c6f84;
}

.source-of-funds-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-of-funds-step,
.source-of-funds-step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d7e0ea;
  background: #f8fafc;
  color: #415a77;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.source-of-funds-step.active,
.source-of-funds-step-pill {
  background: #0d1b2a;
  border-color: #0d1b2a;
  color: #fff;
}

.source-of-funds-card {
  background: #fff;
  border: 1px solid #d7e0ea;
  border-radius: 22px;
  box-shadow: 0 22px 48px rgba(13, 27, 42, 0.08);
  padding: 18px;
}

.source-of-funds-card-main,
.source-of-funds-review-card {
  padding: 20px;
}

.source-of-funds-section-head,
.source-of-funds-inline-head,
.source-of-funds-dialog-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-of-funds-section-head h1,
.source-of-funds-section-head h2,
.source-of-funds-section-head h3,
.source-of-funds-inline-head h3,
.source-of-funds-dialog-head h2 {
  margin: 0;
  color: #0d1b2a;
}

.source-of-funds-section-head p,
.source-of-funds-inline-head p,
.source-of-funds-dialog-head p {
  margin: 0;
  color: #5c6f84;
}

.source-of-funds-section-head-main {
  align-items: flex-start;
  justify-content: space-between;
}

.source-of-funds-field {
  display: grid;
  gap: 8px;
}

.source-of-funds-field span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #415a77;
}

.source-of-funds-field input,
.source-of-funds-field textarea {
  width: 100%;
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  color: #0d1b2a;
  background: #fcfdff;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.source-of-funds-field input:focus,
.source-of-funds-field textarea:focus {
  outline: none;
  border-color: #778da9;
  box-shadow: 0 0 0 4px rgba(119, 141, 169, 0.14);
  background: #fff;
}

.source-of-funds-field textarea {
  min-height: 132px;
  resize: vertical;
}

.source-of-funds-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #eef2f6;
}

.source-of-funds-tab {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: #415a77;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.source-of-funds-tab.active {
  background: #fff;
  color: #0d1b2a;
  box-shadow: 0 10px 20px rgba(13, 27, 42, 0.08);
}

.source-of-funds-upload-dropzone {
  width: 100%;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 22px;
  border: 1px dashed #778da9;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  color: #0d1b2a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.source-of-funds-upload-dropzone strong {
  font-size: 16px;
}

.source-of-funds-upload-dropzone span,
.source-of-funds-muted {
  color: #5c6f84;
}

.source-of-funds-upload-dropzone.is-dragover {
  border-color: #0d1b2a;
  background: #eef2f6;
}

.source-of-funds-file-list,
.source-of-funds-warning-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.source-of-funds-file-item,
.source-of-funds-summary-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #e3e9f0;
  background: #f8fafc;
}

.source-of-funds-file-item span,
.source-of-funds-file-item small {
  display: block;
}

.source-of-funds-file-item small {
  margin-top: 2px;
  color: #6e7f92;
}

.source-of-funds-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-of-funds-summary-grid > div span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #778da9;
}

.source-of-funds-summary-grid > div strong {
  font-size: 20px;
  color: #0d1b2a;
}

.source-of-funds-transaction-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #dfe7f0;
  background: #fbfcfe;
}

.source-of-funds-transaction-card-draft {
  border-style: dashed;
}

.source-of-funds-transaction-copy strong {
  display: block;
  color: #0d1b2a;
}

.source-of-funds-transaction-copy p {
  margin: 6px 0 0;
  color: #5c6f84;
}

.source-of-funds-transaction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-of-funds-primary-btn,
.source-of-funds-secondary-btn,
.source-of-funds-ghost-btn {
  appearance: none;
  border-radius: 16px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}

.source-of-funds-primary-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #0d1b2a 0%, #415a77 100%);
  box-shadow: 0 18px 36px rgba(13, 27, 42, 0.18);
}

.source-of-funds-secondary-btn,
.source-of-funds-ghost-btn {
  border: 1px solid #d7e0ea;
  color: #0d1b2a;
  background: #fff;
}

.source-of-funds-remove-btn {
  color: #991b1b;
  border-color: #f5caca;
  background: #fff8f8;
}

.source-of-funds-primary-btn:hover,
.source-of-funds-secondary-btn:hover,
.source-of-funds-ghost-btn:hover {
  transform: translateY(-1px);
}

.source-of-funds-primary-btn[disabled],
.source-of-funds-secondary-btn[disabled],
.source-of-funds-ghost-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.source-of-funds-disclosure {
  border: 1px solid #d7e0ea;
  border-radius: 18px;
  background: #fbfcfe;
  overflow: hidden;
}

.source-of-funds-disclosure summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source-of-funds-disclosure summary::-webkit-details-marker {
  display: none;
}

.source-of-funds-disclosure summary span {
  font-size: 16px;
  font-weight: 700;
  color: #0d1b2a;
}

.source-of-funds-disclosure summary small {
  color: #5c6f84;
  font-size: 13px;
}

.source-of-funds-disclosure[open] summary {
  border-bottom: 1px solid #e3e9f0;
}

.source-of-funds-disclosure > :not(summary) {
  padding: 0 18px 18px;
}

.source-of-funds-advanced-grid,
.source-of-funds-editor-grid {
  grid-template-columns: 1fr;
}

.source-of-funds-field-wide {
  grid-column: 1 / -1;
}

.source-of-funds-status {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
}

.source-of-funds-status-neutral {
  background: #eef2f6;
  color: #0d1b2a;
}

.source-of-funds-status-ok {
  background: #edf7f2;
  color: #166534;
}

.source-of-funds-status-error {
  background: #fef2f2;
  color: #991b1b;
}

.source-of-funds-warning-card {
  border-color: #f6d3b4;
  background: #fff9f3;
}

.source-of-funds-warning-list li {
  position: relative;
  padding-left: 18px;
  color: #8a4d12;
}

.source-of-funds-warning-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d97706;
}

.source-of-funds-preview-card {
  background:
    radial-gradient(circle at top right, rgba(119, 141, 169, 0.12), transparent 36%),
    linear-gradient(180deg, #f7f9fb 0%, #edf2f7 100%);
}

.source-of-funds-preview-head,
.source-of-funds-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-of-funds-preview-head {
  margin-bottom: 12px;
}

.source-of-funds-preview-head h2 {
  margin: 0;
}

.source-of-funds-preview-head p {
  margin: 6px 0 0;
  color: #5c6f84;
}

.source-of-funds-preview-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #0d1b2a;
  font-size: 12px;
  font-weight: 700;
}

.source-of-funds-preview-stage {
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(119, 141, 169, 0.2);
  background: linear-gradient(180deg, #e7edf3 0%, #dce5ee 100%);
}

.source-of-funds-preview-stage-inline {
  display: none;
}

.source-of-funds-preview-viewport {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.source-of-funds-preview-frame {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.source-of-funds-preview-canvas {
  position: relative;
  transform-origin: top left;
  will-change: transform;
}

.source-of-funds-total-list {
  grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
}

.source-of-funds-total-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #d7e0ea;
  background: #f7f9fb;
}

.source-of-funds-total-chip span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #778da9;
}

.source-of-funds-total-chip strong {
  color: #0d1b2a;
}

.source-of-funds-signature-section {
  display: grid;
  gap: 14px;
}

.source-of-funds-signature-pad-wrap {
  padding: 10px;
  border-radius: 18px;
  border: 1px solid #d7e0ea;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.source-of-funds-signature-pad {
  display: block;
  width: 100%;
  height: 170px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, transparent calc(100% - 34px), rgba(13, 27, 42, 0.08) calc(100% - 34px), rgba(13, 27, 42, 0.08) calc(100% - 33px), transparent calc(100% - 33px)),
    #fff;
  touch-action: none;
  cursor: crosshair;
}

.source-of-funds-actions {
  grid-template-columns: 1fr;
}

.source-of-funds-actions .source-of-funds-primary-btn,
.source-of-funds-actions .source-of-funds-secondary-btn,
.source-of-funds-actions .source-of-funds-ghost-btn {
  width: 100%;
}

.source-of-funds-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  align-items: end;
  justify-items: stretch;
  padding: 0;
}

.source-of-funds-overlay-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(13, 27, 42, 0.56);
}

.source-of-funds-dialog {
  position: relative;
  width: 100%;
  max-height: 100vh;
  overflow: auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 18px;
  box-shadow: 0 -18px 48px rgba(13, 27, 42, 0.22);
}

.source-of-funds-preview-dialog {
  height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.source-of-funds-preview-dialog .source-of-funds-preview-stage {
  flex: 1;
  min-height: 0;
}

.source-of-funds-preview-dialog .source-of-funds-preview-viewport {
  max-height: calc(100vh - 180px);
  overflow: auto;
}

.source-of-funds-editor-actions {
  margin-top: 6px;
}

@media (min-width: 768px) {
  .source-of-funds-page {
    gap: 24px;
    padding-top: 16px;
  }

  .source-of-funds-layout,
  .source-of-funds-review-stack {
    gap: 20px;
  }

  .source-of-funds-card,
  .source-of-funds-card-main,
  .source-of-funds-review-card {
    padding: 24px;
  }

  .source-of-funds-page-title {
    font-size: 36px;
  }

  .source-of-funds-section-head,
  .source-of-funds-inline-head,
  .source-of-funds-dialog-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .source-of-funds-preview-stage-inline {
    display: block;
  }

  .source-of-funds-transaction-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .source-of-funds-actions-review {
    grid-template-columns: repeat(3, max-content);
  }

  .source-of-funds-actions-review .source-of-funds-primary-btn,
  .source-of-funds-actions-review .source-of-funds-secondary-btn,
  .source-of-funds-actions-review .source-of-funds-ghost-btn,
  .source-of-funds-actions-compose .source-of-funds-primary-btn {
    width: auto;
  }

  .source-of-funds-advanced-grid,
  .source-of-funds-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-of-funds-overlay {
    align-items: center;
    justify-items: center;
    padding: 24px;
  }

  .source-of-funds-dialog {
    width: min(720px, 100%);
    max-height: min(92vh, 960px);
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 28px 72px rgba(13, 27, 42, 0.24);
  }

  .source-of-funds-preview-dialog {
    width: min(1080px, 100%);
    height: auto;
    max-height: 92vh;
    border-radius: 28px;
  }

  .source-of-funds-preview-dialog .source-of-funds-preview-viewport {
    max-height: calc(92vh - 180px);
  }
}

@media (min-width: 1200px) {
  .source-of-funds-layout-compose {
    grid-template-columns: minmax(0, 1fr) minmax(500px, 540px);
  }

  .source-of-funds-layout-review {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 460px);
  }

  .source-of-funds-layout-compose .source-of-funds-preview-card,
  .source-of-funds-layout-review .source-of-funds-preview-card {
    position: sticky;
    top: 84px;
  }
}

@media (max-width: 767px) {
  body.route-source-of-funds .header-nav {
    gap: 14px;
  }

  .source-of-funds-page-copy {
    font-size: 14px;
  }

  .source-of-funds-summary-grid {
    gap: 10px;
  }

  .source-of-funds-preview-head,
  .source-of-funds-preview-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
