/* ============================================
   Compeer Financial - Loan Application Styles
   ============================================ */

/* CSS Variables */
:root {
  /* Primary Colors */
  --primary-teal: #1b6875;
  --primary-hover: #179dab;
  
  /* Text Colors */
  --text-primary: #3f3f43;
  --text-secondary: #6b6b6f;
  --text-muted: #9a9a9e;
  
  /* Background Colors */
  --bg-white: #ffffff;
  --bg-sidebar: #f4f8f8;
  --bg-step-active: #c7d9dd;
  
  /* Border Colors */
  --border-light: #d9d9d9;
  --border-input: #c4c4c4;
  
  /* Spacing */
  --header-height: 80px;
  --sidebar-width: 280px;
  
  /* Typography */
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.5;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

.heading-display {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}

a {
  color: var(--primary-teal);
  text-decoration: underline;
}

a:hover {
  color: var(--primary-hover);
}

/* ============================================
   Header
   ============================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background-color: var(--bg-white);
  border-bottom: none;
  height: var(--header-height);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-logo {
  height: 40px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav-link {
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 16px;
  font-size: 0.9375rem;
}

.header-nav-link:hover {
  color: var(--primary-teal);
}

.header-nav-divider {
  color: var(--border-light);
  font-weight: 300;
}

/* Sign In Button (outlined) */
.btn-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border: 1px solid var(--border-input);
  border-radius: 4px;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--primary-teal);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-teal);
  border: 1px solid var(--primary-teal);
}

.btn-secondary:hover {
  background-color: var(--primary-teal);
  color: white;
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.875rem;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.form-input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  /* Match left padding with dropdowns by default */
  padding: 12px 16px;
  border: 1px solid var(--border-input);
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

/* When an input is wrapped with a left-side icon, add the extra left padding. */
.form-input-wrapper .form-input {
  padding-left: 44px;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-teal);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.form-input-icon svg {
  width: 18px;
  height: 18px;
}

/* Checkbox */
.form-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary-teal);
  cursor: pointer;
}

.form-checkbox-label {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.form-note {
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 20px 0;
}

/* ============================================
   Layout - Start Page (No Sidebar)
   ============================================ */
.page-start {
  min-height: 100vh;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 20px 40px;
}

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

.back-link svg {
  width: 16px;
  height: 16px;
}

.start-content {
  display: flex;
  padding: 20px 40px 60px;
  gap: 80px;
  max-width: 1000px;
}

.start-heading {
  flex: 0 0 340px;
}

.start-heading h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.start-form {
  flex: 1;
  max-width: 400px;
}

/* ============================================
   Layout - With Sidebar
   ============================================ */
.page-with-sidebar {
  display: flex;
  min-height: 100vh;
  gap: 100px;
}

/* Fallback for environments that don't support flexbox gap */
@supports not (gap: 1rem) {
  .page-with-sidebar {
    gap: 0;
  }

  .page-with-sidebar .main-content {
    margin-left: 100px;
  }
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 20px 24px;
}

.sidebar-logo img {
  height: 40px;
  width: auto;
}

.sidebar-tracker {
  padding: 8px 0 8px 16px;
  margin-top: 61px;
  position: relative;
  --tracker-bar-left: 34px;
  --tracker-bar-top: 10px;
  --tracker-bar-bottom: 8px;
  --tracker-bar-width: 20px;
  --tracker-progress-height: 0px;
  --tracker-progress-overshoot: 14px; /* how far fill extends past active dot */
}

/* Vertical tracker background bar */
.sidebar-tracker::before {
  content: '';
  position: absolute;
  left: var(--tracker-bar-left);
  top: var(--tracker-bar-top);
  bottom: var(--tracker-bar-bottom);
  width: var(--tracker-bar-width);
  border-radius: 999px;
  background-color: #e3edf0;
  z-index: 0;
}

/* Progress fill that grows from the top */
.sidebar-tracker::after {
  content: '';
  position: absolute;
  left: var(--tracker-bar-left);
  top: var(--tracker-bar-top);
  width: var(--tracker-bar-width);
  height: var(--tracker-progress-height, 0px);
  border-radius: 999px;
  background-color: var(--bg-step-active);
  z-index: 1;
}

.tracker-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  position: relative;
}

.tracker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.tracker-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}

/* Active step - bold text, teal dot, pill over bar */
.tracker-step.active .tracker-label {
  color: var(--text-primary);
  font-weight: 700;
}

.tracker-step.active .tracker-dot {
  background-color: var(--primary-teal);
}


/* Completed with checkmark */
.tracker-step.completed .tracker-dot {
  background-color: transparent;
}

.tracker-step.completed .tracker-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231b6875' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Personal Info expanded caret (matches checkmark size/thickness) */
.tracker-step.personal-info-expanded .tracker-dot {
  /* Keep the same dot footprint as other steps */
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: transparent;
}

.tracker-step.personal-info-expanded.active .tracker-dot {
  /* Override active teal dot when showing caret */
  background-color: transparent;
}

.tracker-step.personal-info-expanded .tracker-dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231b6875' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 9 6 15'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.tracker-step.personal-info-expanded .tracker-label {
  font-weight: 700;
  color: var(--text-primary);
}

/* Sub-steps (for expanded sections) */
.tracker-substeps {
  padding-left: 0;
}

.tracker-substep {
  position: relative;
  padding: 8px 24px 8px 64px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.tracker-substep::before {
  content: '';
  position: absolute;
  /* Align with bar center (accounts for sidebar padding-left: 16px) */
  left: calc(var(--tracker-bar-left) + (var(--tracker-bar-width) / 2) - 16px);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  z-index: 2;
}

.tracker-substep.completed::before {
  width: 12px;
  height: 12px;
  border-radius: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231b6875' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.tracker-substeps.personal-info-expanded .tracker-substep {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  /* While within Personal Info (co-applicant flow), keep all sub-step labels dark */
  color: var(--text-primary);
}

.tracker-substep.active {
  color: var(--text-primary);
  font-weight: 700;
}

.tracker-substep.active::before {
  background-color: var(--primary-teal);
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 20px 40px;
  border-bottom: none;
}

.content-body {
  padding: 40px;
  flex: 1;
}

.content-body h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-primary);
}

/* ============================================
   Product Cards
   ============================================ */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
}

.product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background-color: var(--bg-white);
}

.product-info {
  flex: 1;
  padding-right: 20px;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.product-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.product-card .btn {
  flex-shrink: 0;
}

/* ============================================
   Review Applicants (Personal Info flow)
   Scoped to review-applicants.html
   ============================================ */
.review-applicants-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.review-applicant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 12px;
}

.review-applicant-heading {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.review-applicant-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--primary-teal);
  cursor: pointer;
}

.review-applicant-edit:focus {
  outline: 2px solid rgba(27, 104, 117, 0.25);
  outline-offset: 2px;
  border-radius: 4px;
}

.review-applicant-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 22px;
  background-color: var(--bg-sidebar);
  border-radius: 6px;
}

.review-applicant-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-bottom: 8px;
}

.review-applicant-names {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex: 1;
}

.review-applicant-name-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-secondary);
  font-weight: 700;
}

.review-applicant-name-line {
  line-height: 1.25;
}

.review-applicant-name-right {
  text-align: right;
}

/* ============================================
   Application Review (Review & Submit)
   ============================================ */
.application-review-card {
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background-color: var(--bg-white);
  padding: 22px 24px;
}

.application-review-divider {
  height: 1px;
  background-color: var(--border-light);
  margin: 18px 0;
}

.application-review-section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.application-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
}

.application-review-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 0;
}

.application-review-key {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.application-review-value {
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.application-review-final {
  margin-top: 18px;
}

.application-review-final .form-checkbox-wrapper {
  margin-top: 14px;
}

/* ============================================
   Select / Dropdown - Native (fallback)
   ============================================ */
.form-select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid var(--border-input);
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233f3f43' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-teal);
}

.form-select option[value=""] {
  color: var(--text-muted);
}

/* ============================================
   Custom Dropdown Component
   ============================================ */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.custom-dropdown-trigger {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid var(--border-input);
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233f3f43' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.2s ease;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  /* Keep selected value to a single line (truncate with ellipsis) */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-dropdown-trigger:focus {
  outline: none;
  border-color: var(--primary-teal);
}

.custom-dropdown-trigger.placeholder {
  color: var(--text-muted);
}

.custom-dropdown.open .custom-dropdown-trigger {
  border-color: var(--primary-teal);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-white);
  border: 1px solid var(--primary-teal);
  border-top: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-dropdown.open .custom-dropdown-menu {
  display: block;
}

.custom-dropdown-option {
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.custom-dropdown-option:hover,
.custom-dropdown-option:focus,
.custom-dropdown-option.focused {
  background-color: var(--primary-teal);
  color: white;
  border-left-color: var(--primary-teal);
}

.custom-dropdown-option.selected {
  background-color: var(--primary-teal);
  color: white;
}

.custom-dropdown-option.selected:hover,
.custom-dropdown-option.selected.focused {
  background-color: var(--primary-hover);
}

.custom-dropdown-option:first-child {
  border-top: none;
}

.custom-dropdown-option.disabled {
  color: var(--text-muted);
  cursor: default;
  background-color: transparent;
}

.custom-dropdown-option.disabled:hover {
  background-color: transparent;
  color: var(--text-muted);
}

/* Hidden native select for form submission */
.custom-dropdown select.hidden-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Label with Info Icon */
.form-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--primary-teal);
  color: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.info-icon:hover {
  background-color: var(--primary-hover);
}

/* Teal info icon (used on co-applicant decision pages) */
.info-icon--teal {
  background-color: var(--primary-teal);
}

.info-icon--teal:hover {
  background-color: var(--primary-hover);
}

/* Two Column Form Row */
.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

/* Full Width Button */
.btn-full {
  width: 100%;
}

/* Phone Input Mask */
.form-input-phone {
  font-family: var(--font-body);
  letter-spacing: 0.5px;
}

/* Radio Buttons */
.form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-radio-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-radio {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-teal);
  cursor: pointer;
}

.form-radio-label {
  font-size: 0.9375rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Help Text */
.help-text {
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.help-text strong {
  font-weight: 600;
}

/* ============================================
   Financial Information callout
   ============================================ */
.financial-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin: 14px 0 18px;
  background-color: var(--bg-sidebar); /* #f4f8f8 */
  border-radius: 4px;
  width: 100%;
  max-width: 700px; /* align with .form-container-wide */
}

.financial-callout-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background-color: var(--primary-teal);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.financial-callout-text {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.modal-body ul {
  margin: 10px 0 0 20px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.modal-body li {
  margin: 6px 0;
}

/* ============================================
   Tracker - Enhanced with Checkmarks
   ============================================ */

/* Back Link in Content */
.content-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-teal);
  text-decoration: none;
  font-size: 0.9375rem;
  margin-bottom: 20px;
}

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

.content-back-link svg {
  width: 16px;
  height: 16px;
}

/* Form Container */
.form-container {
  max-width: 520px;
}

.form-container-wide {
  max-width: 700px;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-white);
  border-radius: 8px;
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header .info-icon {
  width: 20px;
  height: 20px;
  font-size: 13px;
  background-color: var(--primary-teal);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background-color: var(--bg-sidebar);
  color: var(--text-primary);
}

.modal-body {
  color: var(--text-primary);
  line-height: 1.6;
}

.modal-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  margin-top: 16px;
  color: var(--text-primary);
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

/* ============================================
   Utilities
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

/* ============================================
   Persona Selector (Future Feature)
   ============================================ */
.persona-selector {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none; /* Hidden by default, enabled for testing */
}

.persona-selector.visible {
  display: block;
}

.persona-selector h4 {
  font-size: 0.875rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.persona-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-white);
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.persona-btn:hover {
  border-color: var(--primary-teal);
  background-color: var(--bg-sidebar);
}

.persona-btn:last-child {
  margin-bottom: 0;
}

/* ============================================
   Processing + Identity Verification (Operating Loan)
   Scoped utility styles used only on new pages
   ============================================ */
.processing-body,
.identity-body {
  /* Align verification content like other pages (top-left in content area). */
  display: block;
  min-height: auto;
}

.processing-stage {
  display: flex;
  flex-direction: column;
  /* Keep stage positioned top-left, but center its internal content */
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  max-width: 560px;
  margin: 0;
  gap: 10px;
}

.processing-spinner {
  width: 64px;
  height: 64px;
  color: var(--primary-teal);
  margin-bottom: 10px;
  animation: processing-spin 1.1s linear infinite;
}

.processing-spinner svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .processing-spinner {
    animation: none;
  }
}

@keyframes processing-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.processing-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.2;
  color: var(--text-primary);
}

.processing-subtitle {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.identity-stage {
  width: 100%;
  max-width: 720px;
  margin: 0;
  /* Keep stage positioned top-left, but center its internal content */
  text-align: center;
}

.identity-title {
  margin: 0 0 24px;
  font-size: 2.25rem;
  font-weight: 700;
}

.identity-need {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 26px;
}

.identity-items {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 120px;
  margin: 0 0 28px;
}

.identity-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 160px;
}

.identity-icon {
  width: 110px;
  height: 80px;
  color: #9a9a9e;
}

.identity-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.identity-item-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.identity-button {
  display: block;
  width: 420px;
  max-width: 100%;
  height: 48px;
  padding: 0 24px;
  font-weight: 700;
  margin: 0 auto 26px;
}

.identity-powered {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.socure-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.socure-icon {
  width: 14px;
  height: 14px;
  background: #f05a28;
  transform: rotate(45deg);
  border-radius: 2px;
  display: inline-block;
}

.socure-text {
  color: #1b5f7a; /* slightly blue-teal to resemble the mark */
  letter-spacing: 0.01em;
}

/* ============================================
   Identity verification - pending + uploads
   Scoped styles for new prototype pages
   ============================================ */
.verify-wait-body {
  /* Align pending verification content like other pages (top-left). */
  display: block;
  min-height: auto;
}

.verify-wait-stage {
  /* Keep stage positioned top-left, but center its internal content */
  text-align: center;
  width: 100%;
  max-width: 820px;
  margin: 0;
}

.verify-wait-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.25rem;
  line-height: 1.1;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.verify-wait-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 36px;
}

.verify-wait-illustration {
  width: 220px;
  height: 220px;
  margin: 0 auto 26px;
}

.verify-wait-illustration svg {
  width: 100%;
  height: 100%;
  display: block;
}

.verify-wait-status {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 34px;
}

.verify-wait-powered {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tracker-step.tracker-section .tracker-label {
  /* Keep section labels bold, but allow state classes to control color */
  font-weight: 800;
}

.tracker-step.tracker-section.active .tracker-label {
  color: var(--text-primary);
  font-weight: 800;
}

.tracker-step.tracker-section.disabled .tracker-label {
  color: var(--text-muted);
  font-weight: 700;
}

.tracker-step.tracker-section.disabled .tracker-dot {
  background-color: var(--text-muted);
}

.tracker-doc-substeps {
  display: block;
}

.tracker-doc-substeps .tracker-substep {
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 800;
  color: var(--text-primary);
}

/* Document sub-steps in this flow don't show their own dots */
.tracker-doc-substeps .tracker-substep::before {
  display: none;
}

.tracker-doc-substeps .tracker-substep {
  padding-left: 64px;
}

.upload-body {
  padding-top: 30px;
}

.upload-title {
  font-size: 2rem;
  margin-bottom: 10px;
}

.upload-help {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 18px;
}

.upload-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  background: var(--bg-white);
  padding: 22px 22px;
  max-width: 640px;
  margin: 12px 0 18px;
}

.upload-dropzone-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.upload-btn {
  background: transparent;
  color: var(--primary-teal);
  border: 2px solid var(--primary-teal);
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
}

.upload-btn:hover {
  background: var(--bg-sidebar);
}

.upload-note {
  max-width: 640px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 8px 0 22px;
}

.upload-continue {
  max-width: 640px;
  height: 48px;
  font-weight: 700;
}

.thankyou-copy {
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-top: 18px;
}

/* Thank you page: keep line-length comfortable without affecting upload pages */
.thankyou-stage {
  max-width: 640px;
}

.thankyou-stage .thankyou-copy {
  max-width: 100%;
}

.thankyou-copy strong {
  color: var(--text-primary);
  font-weight: 800;
}

.thankyou-copy span {
  color: var(--text-primary);
  font-weight: 600;
}
