/* ==========================================================================
   Sea & Seas Shipping Private Limited
   Form RPS 01-A - Seafarer Comprehensive Bio-Data & Application Stylesheet
   Compatible with Plesk Obsidian / Mobile / Desktop / Print (A4)
   ========================================================================== */

/* ---------------- NAVIGATION & TOP BAR (ACCESSIBILITY & HEADER FIX) ---------------- */
/* Prevent header fixed overlap bug on apply.html */
header.nav,
header.nav.solid {
  position: relative !important;
  top: 0 !important;
  left: auto !important;
  right: auto !important;
  background: var(--midnight) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  z-index: 100 !important;
  padding: 12px 0 !important;
  display: block !important;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-inner .logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.nav-inner .logo img {
  display: block;
  height: 48px;
  width: auto;
  object-fit: contain;
}

/* Crisp White Navigation Links (WCAG AAA Contrast > 12:1) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  transition: color 0.2s ease;
  position: relative;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--brand-lime) !important;
}

.nav-right {
  display: inline-flex;
  align-items: center;
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 3px;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.nav-cta-btn:hover {
  background: var(--brand-lime);
  color: var(--midnight) !important;
  border-color: var(--brand-lime);
  box-shadow: 0 4px 14px rgba(167, 219, 40, 0.25);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
}

/* Subtle Integrated Top Bar (High Contrast WCAG AA/AAA) */
.top-bar {
  background: var(--midnight) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 9px 0 !important;
  position: relative;
  z-index: 105;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(167, 219, 40, 0.15) !important;
  border: 1px solid rgba(167, 219, 40, 0.35) !important;
  color: var(--brand-lime) !important;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.top-bar-cert {
  color: #e2e8f0 !important; /* Crisp Slate 200 (12.8:1 contrast against midnight) */
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-bar-link {
  color: #ffffff !important; /* Pure white (18.5:1 contrast against midnight) */
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.top-bar-link:hover {
  color: var(--brand-lime) !important;
}

.top-svg, .meta-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.top-bar-right .sep {
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 768px) {
  .top-bar-cert {
    display: none;
  }
}

/* ---------------- APPLICATION HERO ---------------- */
.apply-hero {
  background: linear-gradient(180deg, var(--midnight) 0%, var(--navy-deep) 100%);
  color: var(--white);
  padding: 36px 0 28px 0;
  border-bottom: 1px solid var(--line-dark);
  position: relative;
  overflow: hidden;
  clear: both;
}

.apply-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(167,219,40,0.06) 0%, rgba(36,88,166,0.05) 50%, transparent 70%);
  pointer-events: none;
}

.apply-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(167,219,40,0.12);
  border: 1px solid rgba(167,219,40,0.3);
  color: var(--brand-lime);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 5px 12px;
  border-radius: 2px;
  margin-bottom: 10px;
}

.apply-hero h1 {
  font-size: clamp(26px, 4vw, 42px);
  margin-bottom: 8px;
  line-height: 1.05;
}

.apply-hero-sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  max-width: 820px;
  line-height: 1.6;
}

.apply-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85); /* High contrast */
}

.apply-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.apply-hero-meta svg {
  color: var(--brand-lime);
  margin-right: 6px; /* 6px explicit separation from text */
  flex-shrink: 0;
}

/* ---------------- DRAFT AUTOSAVE CONTROLLER ---------------- */
.draft-bar {
  background: #0d1e33;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 8px 0;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  position: sticky;
  top: 0;
  z-index: 95;
  backdrop-filter: blur(8px);
}

.draft-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.draft-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
}

.draft-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-lime);
  box-shadow: 0 0 8px var(--brand-lime);
  display: inline-block;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.draft-indicator.saving {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.draft-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.draft-btn-link {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.65);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  padding: 4px;
}

.draft-btn-link:hover {
  color: var(--brand-lime);
}

/* ---------------- STEP PROGRESS NAVIGATOR (DESKTOP) ---------------- */
.wizard-nav-wrap {
  background: var(--midnight);
  padding: 14px 0 10px 0;
  border-bottom: 1px solid var(--line-dark);
}

.wizard-steps {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
}

/* Inactive Stepper Button (High Contrast & Clear Readability - WCAG AAA) */
.wizard-step-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 10px 14px;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  flex: 1;
  text-align: left;
}

.wizard-step-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white) !important;
}

.wizard-step-btn:hover .step-num {
  background: #284c78;
  border-color: rgba(255, 255, 255, 0.75);
}

/* Active Step: Lime Accent, Elevated Glow */
.wizard-step-btn.active {
  background: rgba(167, 219, 40, 0.15) !important;
  border-color: var(--brand-lime) !important;
  color: var(--white) !important;
  box-shadow: 0 0 16px rgba(167, 219, 40, 0.25);
}

.wizard-step-btn.active .step-num {
  background: var(--brand-lime) !important;
  border-color: var(--brand-lime) !important;
  color: var(--midnight) !important;
  font-weight: 800;
  box-shadow: 0 0 12px var(--brand-lime);
}

/* Completed Step: Emerald Accent, Checkmark */
.wizard-step-btn.completed {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.1);
  color: var(--white) !important;
}

.wizard-step-btn.completed .step-num {
  background: var(--emerald) !important;
  border-color: var(--emerald) !important;
  color: var(--white) !important;
}

/* Perfect Geometric Centering for Step Numbers & Icons (High Contrast 7.4:1) */
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1e3656;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.step-info {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.92);
}

/* ---------------- MOBILE STEPPER PROGRESS CARD (< 768px) ---------------- */
.mobile-stepper {
  display: none;
  background: var(--midnight);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-dark);
}

.mobile-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.mobile-step-counter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--brand-lime);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.mobile-step-title {
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
}

.mobile-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

.mobile-progress-fill {
  height: 100%;
  background: var(--brand-lime);
  border-radius: 3px;
  transition: width 0.3s ease;
}

@media (max-width: 768px) {
  .wizard-steps {
    display: none !important;
  }
  .mobile-stepper {
    display: block !important;
  }
}

/* ---------------- FORM MAIN CONTAINER (EXPANDED SEPARATION) ---------------- */
.apply-container {
  padding: 64px 0 84px 0; /* Expanded vertical gap separating context and action layers */
  background: var(--chart-paper);
}

@media (max-width: 768px) {
  .apply-container {
    padding: 36px 0 60px 0;
  }
}

/* High-Contrast Accessible Warning / Alert Banners (WCAG AAA) */
.apply-container .form-alert {
  display: none;
  padding: 16px 20px;
  border-radius: 4px;
  margin-bottom: 24px;
  font-size: 13.5px;
  line-height: 1.6;
  font-weight: 500;
}

.apply-container .form-alert.error-alert {
  background: #fef2f2 !important;
  border: 2px solid #b91c1c !important;
  color: #7f1d1d !important;
  box-shadow: 0 4px 16px rgba(185, 28, 28, 0.12);
}

.apply-container .form-alert.error-alert b {
  color: #991b1b !important;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.apply-container .form-alert.info-alert {
  background: #eff6ff !important;
  border: 2px solid #2563eb !important;
  color: #1e3a8a !important;
}

.apply-container .form-alert.success-alert {
  background: #f0fdf4 !important;
  border: 2px solid #16a34a !important;
  color: #14532d !important;
}

.apply-card {
  background: var(--white);
  border: 1px solid #dbe4ea;
  border-radius: 4px;
  box-shadow: var(--card-shadow);
  padding: 36px 40px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .apply-card {
    padding: 24px 20px;
  }
}

.step-header {
  border-bottom: 2px solid var(--chart-paper-2);
  padding-bottom: 16px;
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.step-header h2 {
  font-size: 24px;
  color: var(--midnight);
  margin-bottom: 4px;
}

.step-header p {
  color: var(--fog);
  font-size: 13px;
  margin: 0;
}

.step-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  background: var(--chart-paper-2);
  color: var(--brand-royal);
  padding: 4px 10px;
  border-radius: 2px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ---------------- FIELDSETS & GROUPINGS (GENEROUS SPACING) ---------------- */
.form-section-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-royal);
  background: var(--chart-paper-2);
  padding: 10px 18px; /* Consistent, balanced padding from accent line */
  border-left: 3px solid var(--brand-blue); /* Delicate 3px visual anchor */
  margin: 34px 0 24px 0; /* Expanded margin for visual grouping */
  border-radius: 0 3px 3px 0;
}

.step-header + .form-section-title,
.form-alert + .form-section-title {
  margin-top: 10px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

@media (max-width: 900px) {
  .form-grid-3, .form-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .form-grid-2, .form-grid-3, .form-grid-4 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

/* Required Asterisk Placement Immediately Adjacent to Label */
.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 2px;
}

.form-group label .req {
  color: #dc2626;
  font-weight: 700;
  font-size: 13.5px;
  margin-left: 1px;
}

.form-group label .hint {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--fog);
  font-weight: 400;
}

/* ---------------- CRITICAL INPUT AFFORDANCES (WCAG 1.4.11 HIGH CONTRAST) ---------------- */
.form-input, .form-select, .form-textarea {
  background-color: #f8fafc;
  border: 1.5px solid #94a3b8; /* Crisp, high-contrast boundary */
  color: #0f172a;
  padding: 10px 14px;
  min-height: 44px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13.5px;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #64748b;
  opacity: 0.85;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  background-color: #ffffff;
  border-color: #475569;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(36, 88, 166, 0.2);
}

/* Custom Dropdown Chevron for Unambiguous Click Affordance */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  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='%232458a6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 42px !important;
  cursor: pointer;
}

/* Native Date Picker Affordance & Visual Indicator */
input[type="date"].form-input {
  position: relative;
  cursor: pointer;
}

input[type="date"].form-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.28) sepia(1) saturate(5) hue-rotate(190deg);
  opacity: 0.9;
  transition: opacity 0.2s;
  padding: 4px;
}

input[type="date"].form-input::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.field-invalid {
  border-color: #dc2626 !important;
  background-color: #fffaf0 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15) !important;
}

.form-textarea {
  resize: vertical;
  min-height: 85px;
}

/* ---------------- TOGGLES & RADIO CARDS ---------------- */
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0 18px 0;
}

.toggle-card {
  border: 1.5px solid #94a3b8;
  border-radius: 4px;
  padding: 12px 16px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  box-sizing: border-box;
  transition: all 0.2s;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.toggle-card:hover {
  background: #ffffff;
  border-color: #475569;
}

.toggle-card label {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  cursor: pointer;
  flex: 1;
}

.radio-group {
  display: inline-flex;
  border: 1.5px solid #94a3b8;
  border-radius: 4px;
  overflow: hidden;
  background: #f8fafc;
  min-height: 44px;
  box-sizing: border-box;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.radio-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border-right: 1.5px solid #94a3b8;
  user-select: none;
  color: #334155;
  transition: all 0.2s;
  min-height: 42px;
}

.radio-label:last-child {
  border-right: none;
}

.radio-label:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.radio-group input[type="radio"] {
  display: none;
}

.radio-group input[type="radio"]:checked + .radio-label {
  background: var(--brand-royal);
  color: var(--white);
}

.radio-group input[type="radio"][value="YES"]:checked + .radio-label,
.radio-group input[type="radio"][value="Yes"]:checked + .radio-label {
  background: var(--brand-blue);
  color: var(--white);
}

/* ---------------- DYNAMIC DATA TABLES ---------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  margin: 16px 0 20px 0;
  background: #fff;
}

.data-entry-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 12.5px;
}

.data-entry-table th {
  background: #f1f5f9;
  color: #334155;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 8px;
  text-align: left;
  border-bottom: 2px solid #cbd5e1;
  font-weight: 700;
}

.data-entry-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.data-entry-table tr:hover {
  background: #f8fafc;
}

.data-entry-table input,
.data-entry-table select {
  font-size: 12.5px;
  padding: 8px 10px;
  border: 1.5px solid #94a3b8;
  border-radius: 3px;
  width: 100%;
  background: #f8fafc;
  color: #0f172a;
  min-height: 38px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.data-entry-table input:hover,
.data-entry-table select:hover {
  background: #ffffff;
  border-color: #475569;
}

.data-entry-table input:focus,
.data-entry-table select:focus {
  background: #ffffff;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 2px rgba(36, 88, 166, 0.2);
  outline: none;
}

.btn-remove-row {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-remove-row:hover {
  background: #ef4444;
  color: #fff;
}

.btn-add-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  color: var(--brand-royal);
  padding: 8px 16px;
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.btn-add-row:hover {
  background: #e2e8f0;
  border-color: var(--brand-royal);
}

/* ---------------- DECLARATION & AFFIRMATION ---------------- */
.declaration-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 20px 24px;
  margin: 20px 0;
  font-size: 13px;
  line-height: 1.7;
  color: #334155;
}

.declaration-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.declaration-item:last-child {
  margin-bottom: 0;
}

.declaration-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--brand-royal);
  cursor: pointer;
}

.declaration-item label {
  cursor: pointer;
}

.zero-fee-banner {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 4px;
  padding: 14px 18px;
  margin: 16px 0;
  color: #065f46;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.zero-fee-banner b {
  color: #047857;
}

/* ---------------- WIZARD CONTROLS FOOTER & AUTOSAVE BADGE ---------------- */
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid var(--chart-paper-2);
  padding-top: 20px;
  margin-top: 28px;
  flex-wrap: wrap;
  gap: 14px;
}

/* Inline Autosave Status right next to Action Buttons */
.footer-draft-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--fog);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 7px 14px;
  border-radius: 3px;
}

.btn-prev {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--ink);
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-prev:hover {
  background: #e2e8f0;
}

.btn-next, .btn-submit-app {
  background: var(--brand-royal);
  border: 1px solid var(--brand-royal);
  color: var(--white);
  padding: 11px 26px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-next:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  box-shadow: 0 4px 12px rgba(36, 88, 166, 0.25);
}

.btn-submit-app {
  background: #059669;
  border-color: #059669;
}

.btn-submit-app:hover {
  background: #047857;
  border-color: #047857;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.btn-print-bio {
  background: #f8fafc;
  border: 1px solid #94a3b8;
  color: var(--brand-royal);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-print-bio:hover {
  background: #e2e8f0;
  border-color: var(--brand-royal);
}

/* ---------------- SUCCESS SUBMISSION VIEW ---------------- */
.submission-success-card {
  text-align: center;
  padding: 48px 24px;
}

.success-icon-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px auto;
  border: 2px solid #86efac;
}

.submission-ref-box {
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  display: inline-block;
  padding: 10px 24px;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-royal);
  margin: 16px 0 24px 0;
}

/* ---------------- OFFICE USE SECTION ---------------- */
.office-use-card {
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  border-radius: 4px;
  padding: 20px;
  margin-top: 24px;
}

.office-use-badge {
  display: inline-block;
  background: #e2e8f0;
  color: #475569;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 12px;
}

/* ---------------- CORPORATE FOOTER (APPLY PAGE) ---------------- */
footer {
  background: var(--navy-deep, #10233C);
  border-top: 1px solid var(--line-dark, rgba(255, 255, 255, 0.12));
  padding: 44px 0 24px;
  color: var(--white);
  margin-top: 60px;
}

footer .wrap {
  display: block;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1fr;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-col--brand {
  max-width: 440px;
}

.footer-desc {
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 12px;
}

.footer-col-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-lime, #A7DB28);
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links li a {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links li a:hover {
  color: var(--brand-lime, #A7DB28);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ---------------- PRINT MEDIA STYLESHEET (FORM RPS 01-A COMPLIANCE) ---------------- */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt;
    line-height: 1.3;
  }

  .top-bar, .nav, .apply-hero, .draft-bar, .wizard-nav-wrap, .mobile-stepper, .wizard-footer, footer, .btn, .btn-add-row, .btn-remove-row, .file-upload-box {
    display: none !important;
  }

  .apply-container {
    padding: 0 !important;
    background: #fff !important;
  }

  .apply-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .step-content {
    display: block !important;
    page-break-after: always;
  }

  table {
    border-collapse: collapse !important;
    width: 100% !important;
    page-break-inside: auto;
  }

  tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  th, td {
    border: 1px solid #333 !important;
    padding: 4px 6px !important;
    font-size: 8.5pt !important;
  }

  th {
    background: #eee !important;
    color: #000 !important;
  }

  .form-input, .form-select, .form-textarea {
    border: 1px solid #888 !important;
    background: transparent !important;
    color: #000 !important;
    padding: 3px 5px !important;
    font-size: 9pt !important;
  }
}
/* Conditional details use the existing grid and error styling. */
[data-condition] { display: none; }
[aria-invalid="true"] { border-color: #b91c1c !important; }
.form-alert { white-space: pre-line; }
