/* ─── MCC-MRF ULTRA-PREMIUM SPLIT LAYOUT FORM CSS ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --mcc-maroon: #751421;
  --mcc-red: #c0392b;
  --bg-main: #fcfcfd;
  --sidebar-bg: #1a1a1a;
  /* Darker for higher contrast */
  --sidebar-text: #ffffff;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --border-premium: #e5e7eb;
  --accent-gold: #c5a059;
  --shadow-premium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  overflow: hidden;
  /* Main container handles scroll */
}

h1,
h2,
h3,
h4,
.sidebar-brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
}

/* Layout Wrapper */
.premium-wrapper {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  /* Prevent body scroll, container handles it */
}

.main-container {
  display: flex;
  width: 100%;
  height: 100%;
}

.sidebar-nav {
  width: 350px;
  background: #f8fafc;
  /* Sidebar is white in screenshot */
  color: var(--text-primary);
  flex-shrink: 0;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-right: 1px solid #f1f5f9;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.sidebar-brand-name {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--mcc-maroon);
  line-height: 1;
}

.sidebar-tagline {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin: 0;
  margin-top: 2px;
}

/* Step Navigation Styles - Crystal Clear Contrast */
.step-navigation {
  margin-top: 30px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 35px;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  opacity: 0.4;
}

.nav-item.active {
  opacity: 1;
}

.nav-num {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  color: #94a3b8;
  background: white;
  transition: all 0.2s ease;
}

.nav-item.active .nav-num {
  border-color: var(--mcc-maroon);
  color: var(--mcc-maroon);
  border-width: 2px;
}

.nav-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.nav-desc {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 1px;
}

.nav-item.active .nav-label {
  color: var(--mcc-maroon) !important;
}

.nav-desc {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

/* Content Area */
.content-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #fcfcfd;
  /* Match exactly the gray-white background */
  position: relative;
}

.content-header {
  background: white;
  z-index: 50;
  position: sticky;
  top: 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 60px;
  border-bottom: 1px solid var(--border-premium);
}

.form-container-scroll {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0px 0;
}

.form-content-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 50px 0 50px;
}

/* Progress Bar */
.progress-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.progress-bar-wrap {
  width: 120px;
  height: 6px;
  background: #f3f4f6;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 25%;
  background: #10b981;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Form Steps */
.form-step {
  animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.step-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.banner-premium {
  border-left: 4px solid var(--mcc-maroon);
  padding: 5px 25px;
  margin-bottom: 50px;
  background: transparent;
}

.step-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0;
}

/* Premium Fields */
.premium-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: block;
}

.premium-input {
  border: 1.5px solid var(--border-premium);
  background-color: white;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s ease;
}

.premium-input:focus {
  border-color: var(--mcc-maroon);
  box-shadow: 0 0 0 4px rgba(117, 20, 33, 0.08);
  outline: none;
}

.required-star {
  color: var(--mcc-red);
}

.hint-text-premium {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 5px;
}

/* Custom Checkbox Cards */
.premium-check-card {
  position: relative;
}

.premium-check-card input {
  position: absolute;
  opacity: 0;
}

.premium-check-card label {
  display: block;
  padding: 16px;
  background: white;
  border: 1.5px solid var(--border-premium);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  margin: 0;
}

.premium-check-card input:checked+label {
  background: #fdf2f4;
  border-color: var(--mcc-maroon);
  color: var(--mcc-maroon);
}

.premium-check-card label span {
  font-size: 13px;
  font-weight: 600;
}

/* File Upload Zone */
.file-premium-zone {
  position: relative;
}

.icon-circle {
  width: 48px;
  height: 48px;
  background: white;
  border: 1px solid var(--border-premium);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
}

/* Navigation Buttons */
.btn-premium-maroon {
  background: var(--mcc-maroon);
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 12px;
  border: none;
  transition: all 0.3s;
}

.btn-premium-maroon:hover:not(:disabled) {
  background: #8b1c2a;
  box-shadow: 0 10px 15px -3px rgba(117, 20, 33, 0.2);
  transform: translateY(-2px);
  color: white;
}

.btn-premium-secondary {
  color: var(--text-primary);
  font-weight: 600;
  padding: 14px 32px;
  border: 1px solid var(--border-premium);
  border-radius: 12px;
  background: white;
}

.btn-premium-secondary:hover {
  background: #f9fafb;
}

/* Error Messages */
.error-msg {
  font-size: 12px;
  color: var(--mcc-red);
  margin-top: 6px;
  font-weight: 500;
  min-height: 18px;
}

.premium-input.error {
  border-color: var(--mcc-red);
  background-color: #fffafb;
}

/* Modal */
.premium-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

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

.premium-modal {
  max-width: 500px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.success-lottie span {
  font-size: 64px;
}

/* Tablet and Intermediate Desktop Optimization (768px to 1280px) */
@media (min-width: 769px) and (max-width: 1280px) {
  .sidebar-nav {
    width: 250px; /* Slimmer sidebar */
    padding: 30px 20px;
  }

  .sidebar-brand-name { font-size: 20px; }
  .sidebar-tagline { font-size: 9px; letter-spacing: 0.15em; }

  .content-header {
    padding: 15px 25px;
    min-height: 80px;
  }

  .form-content-wrapper {
    padding: 25px 30px 0 30px;
  }

  .step-title {
    font-size: 24px;
    margin-bottom: 5px;
  }

  .banner-premium {
    margin-bottom: 25px;
    padding: 5px 15px;
  }

  /* Force fields to stack in this mid-range to prevent cramped 3-column layout */
  .col-md-3, .col-md-4, .col-md-6, .col-6 {
    width: 100% !important;
    margin-bottom: 25px;
  }

  /* Keep labels bold and all-caps for consistency with smaller range */
  .premium-field label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #4b5563;
  }

  .nav-item { gap: 10px; margin-bottom: 20px; }
  .nav-num { width: 30px; height: 30px; font-size: 12px; }
  .nav-label { font-size: 13px; }
  .nav-desc { display: none; } /* Hide desc to save height space on tablets */
}

@media (max-width: 768px) {

  body,
  html {
    overflow: auto;
  }

  .premium-wrapper {
    flex-direction: column;
    height: auto;
    width: 100%;
  }

  .main-container {
    flex-direction: column;
  }

  .sidebar-nav {
    width: 100%;
    height: auto;
    padding: 40px 20px 0 20px;
    border-right: none;
    border-bottom: none;
    text-align: center;
    background: #f8faff;
  }

  .brand-section {
    margin-bottom: 0px !important;
  }

  .brand-section .d-flex {
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .sb-brand-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  .brand-logo {
    width: 90px;
    height: 90px;
    margin-bottom: 5px;
  }

  .sidebar-brand-name {
    font-size: 24px;
    font-weight: 800;
    color: #751421;
    margin-bottom: 0 !important;
  }

  .sidebar-tagline {
    letter-spacing: 0.15em;
    font-size: 11px;
    color: #475569;
    font-weight: 600;
  }

  .step-navigation {
    display: none !important;
  }

  .sidebar-footer {
    display: none !important;
  }

  .content-area {
    background: #f8faff;
  }

  .content-header {
    height: auto;
    padding: 20px 20px 30px 20px;
    justify-content: center !important;
    display: flex;
    align-items: center;
    background: #f8faff;
    border-bottom: none;
    text-align: center;
    flex-direction: column-reverse;
  }

  .progress-container {
    width: 100%;
    max-width: 340px;
    justify-content: space-between;
    background: transparent;
    padding: 0;
    margin-top: 40px;
    order: 1;
    /* Move progress above title */
  }

  .step-header.banner-premium {
    margin-bottom: 0 !important;
    padding: 0 !important;
    border: none;
    order: 2;
    /* Title below progress */
  }

  .step-title {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    margin: 0px 0 10px 0;
    line-height: 1.2;
    max-width: 320px;
  }

  .step-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    max-width: 320px;
    font-family: 'Inter', sans-serif;
  }

  .progress-bar-wrap {
    flex-grow: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    margin-right: 15px;
  }

  .progress-bar-fill {
    background: #10b981;
  }

  .progress-text {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
  }

  .form-container-scroll {
    background: white;

  }

  .form-content-wrapper {
    padding: 40px 25px;
  }

  /* Mobile Label Overrides */
  .premium-field label {
    font-size: 13px;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  /* Force stack fields on mobile */
  .col-md-3,
  .col-md-4,
  .col-md-6,
  .col-md-8,
  .col-6,
  .col-12 {
    width: 100% !important;
    margin-bottom: 25px;
  }

  .navigation-bar-premium {
    flex-direction: column !important;
    gap: 0;
    padding: 20px 25px 40px 25px !important;
    background: white;
    border: none;
  }

  .navigation-bar-premium .ms-auto {
    margin: 0 !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .btn-premium-maroon {
    width: 100%;
    max-width: 340px;
    background: #751421;
    padding: 16px !important;
    font-size: 16px;
    height: 56px;
    border-radius: 12px;
    margin-bottom: 15px;
  }

  #prevBtn {
    width: 100%;
    max-width: 340px;
    margin-bottom: 15px;
    height: 56px;
  }

  #clearBtn {
    width: auto;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    color: #94a3b8 !important;
    text-decoration: none;
    font-weight: 500;
    display: block !important;
  }
}

@media (max-width: 480px) {
  .sidebar-brand-name {
    font-size: 22px;
  }

  .step-title {
    font-size: 22px;
  }
}

/* ─── DYNAMIC UPLOAD & CONDITIONAL FIELDS ─── */
.financial-proof-zone {
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

.dynamic-upload-area {
  transition: all 0.3s ease;
  background: #f8fafc !important;
}

.dynamic-upload-area:hover {
  border-color: var(--mcc-maroon) !important;
  background: #fff !important;
  box-shadow: 0 4px 12px rgba(117, 20, 33, 0.05);
}

.dynamic-upload-area .icon-circle {
  transition: all 0.3s ease;
}

.dynamic-upload-area:hover .icon-circle {
  background: var(--mcc-maroon);
  color: white;
  border-color: var(--mcc-maroon);
}

.financial-proof-zone .required-star {
  font-size: 14px;
}

.text-maroon {
  color: #751421 !important;
}

.bg-light {
  background-color: #f8fafc !important;
}

.hover-shadow-sm:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border-color: #751421 !important;
  cursor: pointer;
}

.extra-small {
  font-size: 10px;
}

.file-premium-zone {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.file-premium-zone:active {
  transform: scale(0.98);
}


.rule-hint {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 500;
  opacity: 0.8;
}