/* Modern International Design System */
:root {
  /* Professional Color Palette - WCAG AA Compliant */
  --brand-primary: #0066CC;
  --brand-secondary: #004D99;
  --brand-accent: #3399FF;
  --brand-light: #E6F2FF;

  /* Success & Status Colors */
  --success: #059669;
  --success-bg: #ECFDF5;
  --error: #DC2626;
  --error-bg: #FEF2F2;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --info: #3B82F6;
  --info-bg: #EFF6FF;

  /* Neutral Grays (50-900 scale) */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Semantic Colors */
  --text-strong: #111827;
  --text-default: #374151;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --card-bg: #FFFFFF;
  --bg-page: #F9FAFB;
  --border: #E5E7EB;
  --border-light: #F3F4F6;

  /* Typography - Inter Font System */
  --font-heading: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Type Scale (1.2 ratio) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.35vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --text-3xl: clamp(1.875rem, 1.65rem + 1vw, 2.25rem);

  /* Spacing Scale (8px grid) */
  --space-1: 0.25rem;
  /* 4px */
  --space-2: 0.5rem;
  /* 8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.25rem;
  /* 20px */
  --space-6: 1.5rem;
  /* 24px */
  --space-8: 2rem;
  /* 32px */
  --space-10: 2.5rem;
  /* 40px */
  --space-12: 3rem;
  /* 48px */

  /* Shadows - Layered Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Border Radius */
  --radius-sm: 0.375rem;
  /* 6px */
  --radius: 0.5rem;
  /* 8px */
  --radius-md: 0.75rem;
  /* 12px */
  --radius-lg: 1rem;
  /* 16px */
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Base Settings */
  font-family: var(--font-body);
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

/* Modern Page Layout */
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--brand-light) 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  color: var(--text-strong);
  font-family: var(--font-body);
}

@media (max-width: 600px) {
  body {
    padding: 0;
    align-items: stretch;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-heading);
  color: var(--text-strong);
  line-height: 1.2;
  font-weight: 700;
}

input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-secondary);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Key sizes (root = 16px) per design guide */
/* logo ~6rem (96px) */
.brand-logo {
  width: 6rem;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform var(--transition-base);
}

.brand-logo:hover {
  transform: scale(1.02);
}

.iron-logo {
  width: 8rem;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

/* header title ~1.8rem (~28.8px) */
.subtitle {
  font-size: 1.8rem;
}

/* form section headings ~1.3rem (~20.8px) */
.section-title {
  font-size: 1.3rem;
}

/* section/field labels ~1.1rem (~17.6px) */
.field .label {
  font-size: 1.1rem;
}

/* inputs, selects, textarea ~1rem (16px) */
.input,
.select,
.textarea {
  font-size: 1rem;
}

/* form-group label ~0.95rem (~15.2px) */
.field .label.small,
.form-group label {
  font-size: 0.95rem;
}

/* address ~0.9rem (~14.4px) */
.address {
  font-size: 0.9rem;
}

/* step title ~0.85rem (~13.6px) */
.step .title,
.step-title {
  font-size: 0.85rem;
}

.app {
  width: 100%;
}

.app-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

/* Professional Header */
.header {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  padding: var(--space-12) var(--space-6);
  color: #fff;
  border-radius: 0;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  /* For absolute positioning of children */
}

.header-download-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-base);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.header-download-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .header-download-btn {
    position: static;
    display: inline-block;
    margin-top: var(--space-4);
    padding: 8px 16px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    width: auto;
  }
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
  width: 100%;
}

.brand-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: center;
  align-items: center;
}

.company-name {
  display: none;
}


/* Responsive adjustments for mobile */
.brand-logo,
.iron-logo {
  width: 5rem;
  height: auto;
}

@media (max-width: 700px) {
  .header {
    padding: var(--space-6) var(--space-4);
    border-radius: 0;
  }

  .brand {
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
    text-align: center;
  }

  .brand-details {
    align-items: center;
    width: 100%;
  }


  .subtitle {
    font-size: 1.2rem;
    line-height: 1.2;
    padding: 0 var(--space-2);
  }

  .address {
    font-size: 0.75rem;
    margin-top: var(--space-1);
    padding: 0 var(--space-2);
    opacity: 0.9;
  }

  .app-shell {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
  }

  .content {
    padding: var(--space-6) var(--space-4);
  }
}

.subtitle {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}

.address {
  font-size: 0.95rem;
  opacity: 1;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

.address {
  font-size: 0.9rem;
  opacity: 0.95;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 6px;
}

.upload-button {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* Modern Stepper Progress Indicator */
.stepper {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-3);
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: var(--gray-50);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  min-width: 130px;
  flex: 1 1 0;
  transition: all var(--transition-base);
}

.dot {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: grid;
  place-items: center;
  background: var(--card-bg);
  border: 3px solid var(--border);
  color: var(--text-muted);
  font-weight: 700;
  font-size: var(--text-base);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.step.completed .dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  font-size: var(--text-lg);
  box-shadow: var(--shadow-md);
}

.step.completed {
  color: var(--success);
  font-weight: 700;
}

.step.active .dot {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.15), var(--shadow-md);
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .stepper {
    padding: var(--space-4);
    gap: var(--space-2);
  }

  .step {
    min-width: 0;
    flex: 1;
  }

  .step div:not(.dot) {
    display: none;
  }

  .step.active div:not(.dot) {
    display: block;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.7rem;
    text-transform: uppercase;
  }

  .stepper {
    padding-bottom: 30px;
    /* space for the absolute labeled active step */
    margin-bottom: 20px;
  }

  .step.active div:not(.dot) {
    bottom: -24px;
    font-weight: 700;
    color: var(--brand-primary);
  }

  .dot {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    border-width: 2px;
  }
}

.step.active {
  color: var(--brand-primary);
  font-weight: 700;
}

/* Main content */
.content {
  padding: var(--space-8) var(--space-6);
  max-width: 1000px;
  margin: 0 auto;
}

/* Modern Validation Banner */
.error-banner {
  border: 1px solid #FCA5A5;
  background: var(--error-bg);
  color: var(--error);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.error-title {
  font-weight: 700;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.error-title::before {
  content: "⚠️";
}

.error-list {
  margin: 0;
  padding-left: var(--space-6);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.section {
  margin-bottom: var(--space-8);
  padding: var(--space-8);
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all var(--transition-base);
}

.section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-light);
}

@media (max-width: 600px) {
  .section {
    padding: var(--space-5);
    border-radius: var(--radius-md);
  }

  .content {
    padding: var(--space-4);
  }
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  letter-spacing: -0.01em;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--gray-100);
}

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 36px;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

.field .label {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0;
  font-weight: 600;
}

.req {
  color: #dc2626;
  margin-left: 4px;
  font-weight: 800;
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Modern Form Controls - International Standard (44px touch targets) */
.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  min-height: 44px;
  background: var(--card-bg);
  color: var(--text-strong);
  font-size: var(--text-base);
  outline: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

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

.select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236B7280' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}

.textarea {
  min-height: 100px;
  height: auto;
  resize: vertical;
  line-height: 1.6;
}

/* Focus States - WCAG Compliant */
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1), var(--shadow);
  outline: none;
}

.input:hover:not(:focus),
.select:hover:not(:focus),
.textarea:hover:not(:focus) {
  border-color: var(--gray-300);
}

.input.invalid,
.select.invalid,
.textarea.invalid {
  border-color: #e11d48;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08);
  background: #fff5f5;
  animation: shake 420ms cubic-bezier(.36, .07, .19, .97);
}

.field-error {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #fff5f5;
  border: 1px solid #ffd2d2;
  color: #b91c1c;
  padding: 8px 12px;
  margin-top: 8px;
  border-radius: 6px;
  font-size: 13px;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  15% {
    transform: translateX(-6px);
  }

  30% {
    transform: translateX(6px);
  }

  45% {
    transform: translateX(-4px);
  }

  60% {
    transform: translateX(4px);
  }

  75% {
    transform: translateX(-2px);
  }

  100% {
    transform: translateX(0);
  }
}

/* Actions */
.actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .actions {
    flex-direction: column-reverse;
    gap: var(--space-2);
    padding-top: var(--space-4);
    margin-top: var(--space-6);
  }

  .actions button {
    width: 100%;
    padding: var(--space-4);
  }
}

.actions-right {
  position: static;
  background: transparent;
}

/* Modern Button Styles */
.actions button {
  min-height: 44px;
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--text-strong);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-6);
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-base);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.actions button:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.actions .primary {
  background: var(--brand-primary);
  color: #fff;
  border: 2px solid var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.actions .primary:hover {
  background: var(--brand-secondary);
  border-color: var(--brand-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Misc */
.note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-6);
  color: var(--text-muted);
  font-size: var(--text-sm);
  background: var(--gray-50);
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--brand-primary);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.footer a:hover {
  background: var(--brand-light);
  color: var(--brand-secondary);
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.footer-toast {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--success-bg);
  color: var(--success);
  font-weight: 600;
  border: 1px solid var(--success);
}

@media (max-width: 600px) {
  .footer {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .footer-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-actions .modal-btn,
  .footer-actions .secondary-btn {
    flex: 1 1 100%;
  }
}

.modal-btn {
  border: none;
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.secondary-btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-strong);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
}

.secondary-btn:hover {
  background: #f7fafc;
}

/* Modern Preferred Service Model bar */
.pref-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border: 1px solid var(--brand-light);
  background: var(--info-bg);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.pref-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.pref-label {
  color: var(--brand-primary);
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: var(--text-base);
}

.pref-desc {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.pref-options {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.pref-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-strong);
  font-size: var(--text-sm);
  position: relative;
  cursor: pointer;
}

/* Stylish pill radios for preferred service model */
.pref-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pref-option span {
  display: inline-block;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--text-strong);
  font-weight: 600;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.pref-option input[type="radio"]:checked+span {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.pref-option:hover span {
  border-color: var(--brand-accent);
}

@media (max-width: 700px) {
  .pref-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: var(--space-4);
  }

  .pref-options {
    flex-direction: column;
    width: 100%;
    gap: var(--space-2);
  }

  .pref-option span {
    width: 100%;
    text-align: center;
  }
}

/* Dropdown info panels */
.full-span {
  grid-column: 1 / -1;
}

.dropdown {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(14, 30, 54, 0.06);
}

.dropdown summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown summary::marker {
  display: none;
}

.dropdown summary::after {
  content: '▾';
  color: var(--text-muted);
}

.dropdown[open] summary::after {
  transform: rotate(180deg);
}

.dropdown-content {
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Step-specific spacing */
.content[data-step="3"] .grid-2 {
  column-gap: 40px;
}

/* Identification mobile tweaks */
@media (max-width: 700px) {
  .content[data-step="2"] .actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  #clientPhotoPreview {
    width: 140px;
    height: 140px;
  }
}

/* Modal success card */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 1000;
}

.success-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-xl);
  padding: var(--space-8);
  border: 1px solid var(--border);
  text-align: center;
  animation: modalPop var(--transition-slow) ease-out;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal and Success UI */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 1000;
}

.success-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-xl);
  padding: var(--space-10);
  border: 1px solid var(--border);
  text-align: center;
  animation: modalIn var(--transition-slow) ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.check {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.3);
}

.check svg {
  width: 44px;
  height: 44px;
  color: #fff;
}

.modal-title {
  font-weight: 800;
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: var(--text-base);
  margin-bottom: var(--space-8);
}

.modal-ref {
  display: inline-block;
  background: var(--gray-100);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  color: var(--brand-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}

.modal-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* File Upload Components */
.file-upload-wrapper {
  position: relative;
  width: 100%;
}

.file-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-6);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  transition: all var(--transition-base);
  text-align: center;
  gap: var(--space-2);
  cursor: pointer;
}

.file-upload-zone:hover {
  border-color: var(--brand-primary);
  background: var(--brand-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.file-icon {
  width: 48px;
  height: 48px;
  color: var(--brand-accent);
  opacity: 0.8;
  margin-bottom: var(--space-2);
}

.file-cta {
  font-weight: 700;
  color: var(--brand-secondary);
  font-size: var(--text-base);
}

.file-limit {
  font-size: var(--text-xs);
  color: var(--text-light);
}

.file-upload-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.file-upload-zone.has-file {
  border-style: solid;
  border-color: var(--success);
  background: var(--success-bg);
}

/* Investment Preferences Modern Redesign */
.invest-pref {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.pref-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: var(--space-8);
  border-bottom: 2px solid var(--gray-100);
}

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

.pref-cat {
  color: var(--brand-secondary);
  font-weight: 800;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.pref-items-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
  width: 100%;
}

@media (max-width: 600px) {
  .pref-items-group {
    grid-template-columns: 1fr;
  }
}

.pref-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  min-height: 56px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-default);
}

.pref-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pref-item:hover {
  border-color: var(--brand-accent);
  background: var(--brand-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pref-item:has(input:checked) {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Ensure children in checked item are also white */
.pref-item:has(input:checked) span {
  color: #fff;
}

.pref-other {
  grid-column: 1 / -1;
  margin-top: var(--space-2);
  display: none;
}

.pref-other.show {
  display: block;
}

@media (min-width: 800px) {
  .pref-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: flex-start;
    gap: var(--space-6);
  }
}

/* Preferred Service Model Bar Modernized */
.pref-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: var(--info-bg);
  border: 1px solid var(--brand-light);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.pref-label {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--brand-secondary);
  font-size: var(--text-base);
}

.pref-options {
  display: flex;
  gap: var(--space-3);
}

.pref-option span {
  display: inline-block;
  padding: var(--space-2) var(--space-6);
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all var(--transition-base);
}

.pref-option input:checked+span {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

/* Print Overrides */
@media print {
  body {
    background: #fff;
    padding: 0;
  }

  .header,
  .stepper,
  .error-banner,
  .actions,
  .footer,
  .file-upload-wrapper,
  #saveDraftBtn,
  #backBtn {
    display: none !important;
  }

  .app-shell {
    box-shadow: none;
    border-radius: 0;
  }

  .content {
    max-width: 100%;
    padding: 0;
  }

  .section {
    border: 1px solid #eee;
    box-shadow: none;
    margin-bottom: 2rem;
  }
}

/* Signature Pad Responsive */
.signature-pad {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  width: 100%;
  max-width: 600px;
  height: 200px;
  touch-action: none;
  /* Crucial for modifying signature on touch devices */
}

@media (max-width: 600px) {
  .signature-pad {
    height: 160px;
    /* slightly smaller on mobile */
  }

  .actions button,
  .modal-btn,
  .secondary-btn {
    width: 100%;
    margin-bottom: var(--space-2);
  }

  .file-upload-wrapper {
    max-width: 100%;
  }
}