/* ========================================================
   بنك أبوظبي الأول - First Abu Dhabi Bank (FAB)
   Design System & Responsive Stylesheet (4-Step Flow + 3 AED Checkout)
   ======================================================== */

:root {
  /* FAB Signature Color Palette */
  --fab-navy-dark: #001A49;       /* كحلي داكن */
  --fab-navy-primary: #002664;    /* كحلي رئيسي */
  --fab-blue-primary: #003DA6;    /* أزرق FAB الملكي المميز للأزرار والروابط */
  --fab-blue-hover: #0050D8;      /* أزرق تفاعلي عند التحويم والتركيز */
  --fab-blue-light: #EBF1FF;      /* أزرق ثلجي فاتح */
  --fab-blue-subtle: #F2F6FC;     /* خلفيات الحقول والعناصر المدمجة */
  --fab-red-accent: #D91A2A;      /* الأحمر المميز لعلامة FAB والتنبيهات */
  --fab-red-light: #FDE8E9;

  /* Neutrals & Slate */
  --bg-page: #F4F6FB;             /* رمادي ناعم ونظيف */
  --bg-card: #FFFFFF;             /* أبيض ناصع */
  --text-main: #1A2533;           /* نصوص رئيسية عالية الوضوح */
  --text-secondary: #637488;      /* نصوص ثانوية وتسميات */
  --text-muted: #8E9BAE;          /* ملاحظات وحدود خفيفة */
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  --border-focus: #003DA6;

  /* States */
  --success-color: #0E9355;
  --success-bg: #EAF8F1;
  --warning-color: #E27D00;
  --danger-color: #D91A2A;
  --danger-bg: #FDF0F1;

  /* Typography Sizes (صغير ومدمج وأنيق للهاتف) */
  --font-family: 'IBM Plex Sans Arabic', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-xs: 11px;
  --font-sm: 12.5px;
  --font-base: 13.5px;
  --font-md: 15px;
  --font-lg: 17px;
  --font-xl: 20px;
  
  /* Radii & Shadows */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-subtle: 0 2px 8px rgba(0, 26, 73, 0.04);
  --shadow-card: 0 4px 18px rgba(0, 26, 73, 0.06);
  --shadow-elevated: 0 8px 26px rgba(0, 26, 73, 0.1);

  /* Transitions */
  --transition-fast: 0.16s ease;
  --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-page);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout Container (Responsive: Mobile 520px, Tablet 740px, Desktop 1080px) */
.container-compact {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 14px;
  padding-right: 14px;
  transition: max-width var(--transition-smooth), padding var(--transition-smooth);
}

@media (min-width: 768px) {
  .container-compact {
    max-width: 760px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (min-width: 992px) {
  .container-compact {
    max-width: 1080px;
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 1200px) {
  .container-compact {
    max-width: 1140px;
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* ========================================================
   TOP UTILITIES BAR (FAB Style)
   ======================================================== */
.top-nav-bar {
  background-color: #001233;
  color: #A0B2CD;
  font-size: var(--font-xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 0;
}

.top-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bank-tag {
  display: flex;
  align-items: center;
  gap: 5px;
}

.uae-flag {
  font-size: 13px;
  line-height: 1;
}

.compliance-tag {
  color: #CAD5E2;
  font-weight: 400;
  white-space: nowrap;
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 500;
  direction: ltr;
  transition: color var(--transition-fast);
}

.top-link:hover {
  color: #7AA2FF;
}

.top-icon {
  width: 12px;
  height: 12px;
}

.security-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  color: #B9D0F5;
}

/* ========================================================
   MAIN APP HEADER
   ======================================================== */
.app-header {
  background: linear-gradient(180deg, var(--fab-navy-dark) 0%, var(--fab-navy-primary) 100%);
  color: #FFFFFF;
  padding: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 26, 73, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition-fast);
}

.brand-logo:hover {
  opacity: 0.92;
}

.fab-logo-img {
  height: 38px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name-ar {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #FFFFFF;
  line-height: 1.2;
}

.brand-sub-ar,
.brand-sub-en {
  font-size: 10.5px;
  color: #CADDF8;
  font-weight: 500;
  letter-spacing: 0.2px;
  line-height: 1.1;
}

.footer-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.footer-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 9px;
  border-radius: var(--radius-full);
}

.portal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #2CD67D;
  box-shadow: 0 0 6px rgba(44, 214, 125, 0.8);
}

.portal-text {
  font-size: var(--font-xs);
  color: #E7EEF8;
  font-weight: 500;
}

/* Desktop Header Nav Hidden */
.desktop-header-nav {
  display: none !important;
}

/* ========================================================
   WIZARD PROGRESS CARD (4 STEPS COMPACT)
   ======================================================== */
.wizard-header-card {
  background: var(--bg-card);
  margin-top: 10px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
  padding: 8px 10px 10px;
}

.wizard-steps-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 2px;
}

.step-node {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.step-num-bubble {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  background: #EEF2F6;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.step-node.active .step-num-bubble {
  background: var(--fab-blue-primary);
  color: #FFFFFF;
  border-color: var(--fab-blue-primary);
  box-shadow: 0 0 0 2.5px rgba(0, 61, 166, 0.15);
}

.step-node.completed .step-num-bubble {
  background: var(--success-color);
  color: #FFFFFF;
  border-color: var(--success-color);
}

.step-node-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.step-node-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-node.active .step-node-title {
  color: var(--fab-blue-primary);
}

.step-node-sub {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-connector {
  width: 8px;
  height: 1px;
  background: var(--border-color);
  margin: 0 2px;
  flex-shrink: 0;
}

.wizard-progress-bar-bg {
  width: 100%;
  height: 3px;
  background: #EDF1F7;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.wizard-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fab-blue-primary), var(--fab-blue-hover));
  border-radius: var(--radius-full);
  transition: width var(--transition-smooth);
}

/* ========================================================
   FLOW CARD / STEP PANELS
   ======================================================== */
.flow-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  padding: 14px;
  margin-bottom: 12px;
  transition: all var(--transition-smooth);
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
  animation: fadeInStep 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Panel Header */
.panel-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #EEF2F6;
}

.panel-header-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--fab-blue-light);
  color: var(--fab-blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.panel-header-icon svg {
  width: 17px;
  height: 17px;
}

.panel-header-icon.payment-header-icon {
  background: #E8F8F0;
  color: var(--success-color);
}

.panel-header-text {
  flex: 1;
}

.panel-title {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--fab-navy-dark);
  line-height: 1.3;
}

.panel-subtitle {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-top: 2px;
}

/* User crumb strip */
.user-crumb-strip {
  background: #F3F7FD;
  border: 1px solid #DEE8F5;
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  margin-bottom: 12px;
}

.crumb-label {
  color: var(--text-secondary);
}

.crumb-val {
  font-weight: 600;
  color: var(--fab-navy-dark);
}

.crumb-phone {
  direction: ltr;
  color: var(--fab-blue-primary);
  font-weight: 600;
  margin-right: auto;
}

/* ========================================================
   COMPACT FORM SYSTEM (صغير ومدمج)
   ======================================================== */
.compact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compact-label {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.required-asterisk {
  color: var(--fab-red-accent);
}

.label-hint {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.currency-tag {
  font-size: var(--font-xs);
  background: #EDF3FA;
  color: var(--fab-navy-primary);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.tenure-badge {
  font-size: var(--font-xs);
  background: var(--fab-blue-light);
  color: var(--fab-blue-primary);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

/* Input Wrapper & Compact Sizing */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix-icon {
  position: absolute;
  right: 11px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-prefix-icon svg {
  width: 100%;
  height: 100%;
}

.compact-input {
  width: 100%;
  height: 40px;
  padding: 6px 34px 6px 42px;
  font-family: var(--font-family);
  font-size: var(--font-base);
  font-weight: 500;
  color: var(--text-main);
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition-fast);
}

.compact-input:hover {
  border-color: var(--border-hover);
}

.compact-input:focus {
  border-color: var(--border-focus);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(0, 61, 166, 0.12);
}

.compact-input.is-invalid {
  border-color: var(--danger-color);
  background-color: #FFF9F9;
}

.input-suffix-tag {
  position: absolute;
  left: 10px;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--text-secondary);
  pointer-events: none;
}

/* Phone input styling with UAE addon */
.phone-wrapper {
  direction: ltr;
}

.phone-country-addon {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #F1F4F9;
  border: 1px solid var(--border-color);
  border-right: none;
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
  height: 40px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
}

.phone-input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding-left: 10px;
  padding-right: 12px;
  text-align: left;
  letter-spacing: 0.8px;
}

/* Privacy note */
.privacy-note-box {
  background: #F6F8FB;
  border: 1px solid #E6ECF4;
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-secondary);
}

.privacy-icon {
  width: 15px;
  height: 15px;
  color: var(--fab-blue-primary);
  flex-shrink: 0;
}

/* Primary Amount Input */
.primary-amount-wrapper .compact-input {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--fab-navy-dark);
  padding-right: 12px;
}

.ltr-input {
  direction: ltr;
  text-align: right;
  letter-spacing: 0.5px;
}

.uppercase-input {
  text-transform: uppercase;
}

.text-center {
  text-align: center !important;
}

.field-error {
  display: none;
  font-size: var(--font-xs);
  color: var(--danger-color);
  font-weight: 500;
  padding-right: 2px;
}

.field-error.show {
  display: block;
}

/* ========================================================
   COMPACT RANGE SLIDER
   ======================================================== */
.slider-box {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.compact-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: #E3E9F2;
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  direction: ltr;
}

.compact-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fab-blue-primary);
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.compact-range-slider::-webkit-slider-thumb:hover,
.compact-range-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
  background: var(--fab-blue-hover);
}

.compact-range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fab-blue-primary);
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.slider-limits {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Quick Preset Chips */
.preset-chips-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  margin-top: 3px;
  scrollbar-width: none;
}

.preset-chips-scroll::-webkit-scrollbar {
  display: none;
}

.preset-chip {
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  background: #F8FAFC;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-chip:hover {
  background: var(--fab-blue-light);
  border-color: #B5CEFF;
  color: var(--fab-blue-primary);
}

.preset-chip.active {
  background: var(--fab-blue-light);
  border-color: var(--fab-blue-primary);
  color: var(--fab-blue-primary);
  font-weight: 600;
}

/* ========================================================
   CALCULATOR RESULTS CARD (FAB Style Micro-Grid)
   ======================================================== */
.calc-results-card {
  background: linear-gradient(145deg, #001A49 0%, #002D7A 100%);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 6px;
  box-shadow: 0 4px 14px rgba(0, 38, 100, 0.2);
}

.calc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rate-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.rate-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #FF5A67;
}

.rate-label {
  font-size: var(--font-xs);
  color: #D3E0F3;
}

.rate-val {
  font-size: var(--font-xs);
  font-weight: 700;
  color: #FFFFFF;
}

.calc-guarantee-note {
  font-size: var(--font-xs);
  color: #8EB7F7;
}

/* Metrics Grid */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.calc-metric-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-metric-box.highlight {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.calc-metric-box.full-width {
  grid-column: 1 / -1;
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.14);
}

.full-metric-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-metric-label {
  font-size: 11px;
  color: #B5CCE8;
  font-weight: 500;
}

.calc-metric-sub {
  display: block;
  font-size: 9.5px;
  color: #8BA8CC;
}

.calc-metric-val-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 3px;
}

.calc-metric-num {
  font-size: var(--font-lg);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
}

.calc-metric-num.primary {
  color: #55E1A2;
}

.calc-metric-cur {
  font-size: 10px;
  color: #CBDDF5;
}

/* DBR status box */
.dbr-status-box {
  margin-top: 10px;
  padding: 7px 10px;
  background: rgba(14, 147, 85, 0.18);
  border: 1px solid rgba(14, 147, 85, 0.35);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dbr-status-box.warning {
  background: rgba(226, 125, 0, 0.18);
  border-color: rgba(226, 125, 0, 0.35);
}

.dbr-icon {
  width: 16px;
  height: 16px;
  color: #2CD67D;
  flex-shrink: 0;
}

.dbr-status-box.warning .dbr-icon {
  color: #FFB347;
}

.dbr-text-col {
  flex: 1;
}

.dbr-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #FFFFFF;
}

.dbr-desc {
  font-size: 10px;
  color: #C0DECE;
}

/* ========================================================
   BUTTONS & ACTION SYSTEM (Small, tactile, smooth)
   ======================================================== */
.form-actions {
  margin-top: 6px;
}

.dual-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.dual-actions-row .btn-secondary-compact {
  flex: 0 0 auto;
  white-space: nowrap;
}

.dual-actions-row .btn-primary-compact {
  flex: 1 1 auto;
}

.back-only-row {
  margin-top: 10px;
}

.w-100 {
  width: 100%;
}

.btn-primary-compact {
  width: 100%;
  height: 42px;
  background-color: var(--fab-blue-primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 61, 166, 0.25);
}

.btn-primary-compact:hover {
  background-color: var(--fab-blue-hover);
  box-shadow: 0 3px 10px rgba(0, 61, 166, 0.35);
}

.btn-primary-compact:active {
  transform: translateY(1px);
}

.btn-secondary-compact {
  height: 42px;
  padding: 0 16px;
  background-color: #F1F4F9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-secondary-compact:hover {
  background-color: #E5EAF1;
  border-color: var(--border-hover);
}

/* Ensure all buttons have strictly bounded SVG icons */
button svg {
  flex-shrink: 0;
}

.btn-primary-compact svg,
.btn-secondary-compact svg,
.btn-action-icon {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.btn-arrow-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.btn-primary-compact:hover .btn-arrow-icon {
  transform: translateX(-3px);
}

.btn-arrow-back {
  width: 16px;
  height: 16px;
}

/* ========================================================
   STEP 3 SPECIFIC STYLES (معلومات الحساب والوظيفة)
   ======================================================== */
.summary-pill-strip {
  background: var(--fab-blue-subtle);
  border: 1px solid #DFE7F3;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pill-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
}

.pill-label {
  color: var(--text-secondary);
}

.pill-val {
  color: var(--fab-navy-dark);
  font-weight: 600;
}

/* Segmented Control for Job Type (حكومي / خاص) */
.employment-segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segment-opt {
  position: relative;
  display: block;
  cursor: pointer;
}

.segment-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.segment-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  transition: all var(--transition-fast);
}

.segment-opt:hover .segment-content {
  border-color: #B5CEFF;
  background: #F9FBFF;
}

.segment-opt.active .segment-content {
  border-color: var(--fab-blue-primary);
  background: var(--fab-blue-light);
  box-shadow: 0 0 0 2px rgba(0, 61, 166, 0.1);
}

.segment-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: #EEF3FA;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.segment-icon svg {
  width: 16px;
  height: 16px;
}

.segment-opt.active .segment-icon {
  background: var(--fab-blue-primary);
  color: #FFFFFF;
}

.segment-text-wrap {
  display: flex;
  flex-direction: column;
}

.segment-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.segment-opt.active .segment-title {
  color: var(--fab-blue-primary);
}

.segment-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.optional-tag {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Terms Checkbox */
.terms-checkbox-box {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 2px;
}

.compact-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.compact-checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  background: #FFFFFF;
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.compact-checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--fab-blue-primary);
  border-color: var(--fab-blue-primary);
}

.compact-checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.checkbox-text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ========================================================
   STEP 4 SPECIFIC STYLES: التحقق من بطاقة استلام الراتب (Debit Card Verification)
   ======================================================== */
.salary-verification-banner {
  background: linear-gradient(135deg, #001A49 0%, #002B7A 60%, #003DA6 100%);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(0, 26, 73, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.wps-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.wps-tag {
  font-size: 10px;
  font-weight: 700;
  background: rgba(44, 214, 125, 0.18);
  border: 1px solid rgba(44, 214, 125, 0.4);
  color: #38E48B;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wps-bank-note {
  font-size: 11px;
  color: #CADDF8;
}

.salary-banner-desc {
  font-size: 11px;
  color: #E2EEFC;
  line-height: 1.45;
  margin-bottom: 8px;
}

.salary-guarantee-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: #A9CAFA;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 6px;
}

/* بطاقة الصراف التفاعلية (Interactive Virtual Salary Debit Card) */
.virtual-card-wrapper {
  perspective: 1000px;
  margin-bottom: 16px;
}

.virtual-salary-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 1.586 / 1;
  background: linear-gradient(135deg, #001233 0%, #001A49 45%, #002B7A 100%);
  border-radius: 14px;
  padding: 16px 18px;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(0, 26, 73, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.virtual-salary-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(218, 41, 28, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.vcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vcard-bank-name {
  display: flex;
  flex-direction: column;
}

.vcard-bank-ar {
  font-size: 11.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.vcard-bank-en {
  font-size: 8.5px;
  color: #CADDF8;
  letter-spacing: 0.3px;
}

.vcard-type-badge {
  font-size: 9px;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.vcard-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
}

.vcard-chip {
  width: 32px;
  height: 24px;
  background: linear-gradient(135deg, #ECC880 0%, #D8A546 50%, #B88526 100%);
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
}

.vcard-chip::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.vcard-contactless {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.vcard-number-display {
  direction: ltr;
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  text-align: center;
  margin: 4px 0;
}

.vcard-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.vcard-holder-col {
  display: flex;
  flex-direction: column;
}

.vcard-label {
  font-size: 7.5px;
  color: #9ABAE6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vcard-holder-name {
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  text-transform: uppercase;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vcard-expiry-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.vcard-expiry-val {
  direction: ltr;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
}

/* Card Payment Styling */
.card-brands-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: #EEF3FA;
  color: #003DA6;
  border: 1px solid #D6E2F2;
}

.brand-pill.jeywan {
  background: #FDF2E9;
  color: #B85000;
  border-color: #F8DAC0;
}

.dual-compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cvv-help-icon {
  position: absolute;
  right: 10px;
  font-size: 12px;
  cursor: help;
}

.btn-pay-now,
.btn-verify-card {
  background-color: var(--fab-blue-primary);
  box-shadow: 0 3px 10px rgba(0, 61, 166, 0.3);
}

.btn-pay-now:hover,
.btn-verify-card:hover {
  background-color: var(--fab-blue-hover);
  box-shadow: 0 4px 14px rgba(0, 61, 166, 0.4);
}

.btn-icon-pay {
  width: 16px;
  height: 16px;
}

/* Payment Security Footer */
.payment-security-footer {
  margin-top: 10px;
  padding: 8px 10px;
  background: #F9FAFC;
  border-radius: var(--radius-xs);
  border: 1px solid #EEF2F6;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sec-badge {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.sec-icons-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.sec-tag {
  font-size: 9.5px;
  color: #7B8BA0;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 1px 6px;
  border-radius: 3px;
}

/* ========================================================
   FINAL STEP 5 (SUCCESS & RECEIPT SCREEN)
   ======================================================== */
.success-banner {
  text-align: center;
  padding: 8px 0 12px;
}

.success-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 2px solid var(--success-color);
  color: var(--success-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-svg {
  width: 22px;
  height: 22px;
}

.success-headline {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--fab-navy-dark);
}

.success-lead {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Receipt Card */
.fee-receipt-card {
  background: #F4F8FD;
  border: 1px solid #C8DBF2;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--fab-navy-dark);
  padding-bottom: 6px;
  border-bottom: 1px dashed #C8DBF2;
  margin-bottom: 6px;
}

.receipt-paid-tag {
  background: var(--success-bg);
  color: var(--success-color);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.receipt-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.receipt-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.receipt-mono {
  font-family: monospace;
  font-weight: 700;
  color: var(--fab-blue-primary);
}

/* Reference Card */
.ref-badge-card {
  background: #F0F4FA;
  border: 1px dashed #B8CCE8;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.ref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ref-label {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.ref-code {
  font-family: monospace;
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--fab-blue-primary);
  letter-spacing: 0.5px;
}

.btn-copy-ref {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 2px 7px;
  font-family: var(--font-family);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all var(--transition-fast);
}

.btn-copy-ref svg {
  width: 12px;
  height: 12px;
}

.btn-copy-ref:hover {
  background: var(--fab-blue-light);
  color: var(--fab-blue-primary);
  border-color: #B5CEFF;
}

.ref-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--success-color);
  font-weight: 600;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success-color);
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Final Summary Details */
.final-summary-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
}

.summary-card-head {
  background: #F4F7FB;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fab-navy-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.badge-approved {
  background: var(--success-bg);
  color: var(--success-color);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.summary-list {
  background: #FFFFFF;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid #F1F4F9;
  font-size: 11.5px;
}

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

.s-key {
  color: var(--text-secondary);
}

.s-val {
  color: var(--text-main);
  text-align: left;
}

.font-bold {
  font-weight: 600;
}

.text-brand {
  color: var(--fab-blue-primary);
}

.text-accent {
  color: var(--fab-red-accent);
}

.ltr-text {
  direction: ltr;
}

/* Next steps instructions */
.next-steps-card {
  background: #FAFCFF;
  border: 1px solid #E1EAF5;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 10px;
}

.next-step-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fab-navy-dark);
  margin-bottom: 5px;
}

.next-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.next-steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.bullet-num {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--fab-blue-primary);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ========================================================
   TRUST FEATURES STRIP
   ======================================================== */
.trust-features-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.trust-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.trust-icon {
  width: 22px;
  height: 22px;
  color: var(--fab-blue-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-icon svg {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
  display: block;
}

.trust-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--fab-navy-dark);
  line-height: 1.2;
}

.trust-sub {
  font-size: 9px;
  color: var(--text-muted);
}

/* ========================================================
   COMPACT FOOTER
   ======================================================== */
.app-footer {
  background: #001233;
  color: #97A9C2;
  font-size: 11px;
  padding: 16px 0 20px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.footer-logo-text {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.footer-disclaimer {
  max-width: 440px;
  line-height: 1.45;
  color: #8397B2;
}

.footer-links-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: #A9BDD8;
  text-decoration: none;
  font-size: 10.5px;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: #FFFFFF;
}

.sep {
  color: #415574;
}

.footer-copyright {
  font-size: 10px;
  color: #6C81A0;
}

/* ========================================================
   TOAST NOTIFICATION
   ======================================================== */
.toast-container {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 380px;
  pointer-events: none;
}

.toast-msg {
  background: #001A49;
  color: #FFFFFF;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  animation: slideToast 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  margin-top: 6px;
}

@keyframes slideToast {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-msg.success {
  border-right: 3px solid #2CD67D;
}

.toast-msg.error {
  border-right: 3px solid var(--fab-red-accent);
}

/* ========================================================
   DESKTOP & TABLET RESPONSIVE ENHANCEMENTS
   ======================================================== */
.desktop-grid-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.form-grid-2col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (min-width: 992px) {
  .main-content {
    padding-top: 10px;
    padding-bottom: 24px;
  }

  .desktop-grid-wrapper {
    display: block;
    max-width: 640px;
    margin: 0 auto;
  }

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

  .wizard-header-card {
    max-width: 640px;
    margin: 12px auto 18px;
    padding: 12px 18px 14px;
  }

  .trust-features-strip {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }

  .wizard-steps-track {
    gap: 10px;
    margin-bottom: 10px;
  }

  .step-connector {
    width: 24px;
  }

  .step-node-title {
    font-size: 12.5px;
  }

  .step-node-sub {
    font-size: 10.5px;
  }

  .step-num-bubble {
    width: 24px;
    height: 24px;
    font-size: 11.5px;
  }

  .flow-card {
    padding: 20px;
    margin-bottom: 16px;
  }

  .trust-features-strip {
    max-width: 820px;
    margin: 14px auto 18px;
    gap: 16px;
  }

  .trust-item {
    padding: 12px 10px;
  }

  .trust-title {
    font-size: 12px;
  }

  .trust-sub {
    font-size: 10.5px;
  }



  /* Desktop Sidebar Bank Advisor Card */
  .desktop-side-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-card);
  }

  .side-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #EEF2F6;
  }

  .side-card-icon {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-xs);
    background: var(--fab-blue-light);
    color: var(--fab-blue-primary);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .side-card-icon svg {
    width: 15px;
    height: 15px;
  }

  .side-card-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--fab-navy-dark);
  }

  .side-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-secondary);
  }

  .side-features-list li {
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .side-check-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success-color);
    flex-shrink: 0;
  }

  .side-support-box {
    margin-top: 12px;
    padding: 10px;
    background: var(--fab-blue-subtle);
    border: 1px solid #DFE8F4;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .side-support-text {
    font-size: 11px;
    color: var(--fab-navy-dark);
  }

  .side-support-num {
    font-weight: 700;
    color: var(--fab-blue-primary);
    direction: ltr;
    font-size: 12.5px;
    text-decoration: none;
  }

  /* Desktop Footer Layout */
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    gap: 20px;
  }

  .footer-brand {
    text-align: right;
  }

  .footer-disclaimer {
    max-width: 520px;
    font-size: 10.5px;
    text-align: right;
  }

  .footer-links-row {
    justify-content: flex-end;
    gap: 12px;
  }
}


/* Disbursement timeline on desktop and receipt */
.disbursement-status-box {
  background: var(--fab-blue-subtle);
  border: 1px solid #DFE8F4;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.disbursement-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--fab-navy-dark);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #CBDCF0;
}

.status-dot-active {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success-color);
  box-shadow: 0 0 6px rgba(14, 147, 85, 0.6);
  animation: pulseDot 1.4s infinite;
}

.disbursement-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.timeline-bullet {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  flex-shrink: 0;
  background: #E2E8F0;
  color: var(--text-secondary);
}

.timeline-step.completed .timeline-bullet {
  background: var(--success-color);
  color: #FFFFFF;
}

.timeline-step.active .timeline-bullet {
  background: var(--fab-blue-primary);
  color: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(0, 61, 166, 0.2);
}

.timeline-text {
  display: flex;
  flex-direction: column;
}

.timeline-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fab-navy-dark);
  line-height: 1.3;
}

.timeline-time {
  font-size: 10px;
  color: var(--text-muted);
}

/* Micro-interactions & Mouse Polish */
@media (hover: hover) and (pointer: fine) {
  .btn-primary-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 61, 166, 0.25);
    background-color: var(--fab-blue-hover);
  }

  .btn-secondary-compact:hover {
    transform: translateY(-1px);
    border-color: #B0C4DE;
    background: #F8FAFD;
  }

  .preset-chip:hover {
    border-color: var(--fab-blue-primary);
    color: var(--fab-blue-primary);
    background: var(--fab-blue-light);
    cursor: pointer;
  }

  .compact-input:hover {
    border-color: #B5CEEE;
  }

  .step-node:hover .step-num-bubble {
    transform: scale(1.08);
  }

  .trust-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-subtle);
    border-color: #CBDDF5;
  }

  .segmented-btn:hover:not(.active) {
    background: rgba(0, 61, 166, 0.05);
    color: var(--fab-blue-primary);
  }

  .payment-radio-card:hover {
    border-color: #A3C2F0;
  }
}

/* ========================================================
   OTP VERIFICATION SCREEN
   ======================================================== */
.otp-header-banner {
  text-align: center;
  padding: 8px 0 14px;
}

.otp-icon-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--fab-blue-light);
  border: 2px solid #C4D7F5;
  color: var(--fab-blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 61, 166, 0.12);
  animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.otp-icon-ring svg {
  width: 28px;
  height: 28px;
}

.otp-icon-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success-color);
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 0 0 0 rgba(14, 147, 85, 0.7);
  animation: otpPulse 2s infinite;
}

@keyframes otpPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 147, 85, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(14, 147, 85, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 147, 85, 0);
  }
}

.otp-phone-card {
  background: #F4F8FD;
  border: 1px solid #C8DBF2;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.otp-phone-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.otp-phone-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid #D2E3F8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fab-blue-primary);
  flex-shrink: 0;
}

.otp-phone-text-col {
  display: flex;
  flex-direction: column;
}

.otp-phone-label {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.otp-phone-number {
  font-size: var(--font-md);
  font-weight: 700;
  color: var(--fab-navy-dark);
  letter-spacing: 0.5px;
  direction: ltr;
  text-align: right;
}

.otp-sms-badge {
  background: #FFFFFF;
  border: 1px solid #D2E3F8;
  border-radius: var(--radius-full);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fab-blue-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* OTP Digits Container */
.otp-inputs-wrapper {
  margin: 16px 0 14px;
}

.otp-inputs-label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--fab-navy-dark);
  text-align: center;
  margin-bottom: 10px;
}

.otp-cells-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  direction: ltr;
}

.otp-cell {
  width: 48px;
  height: 54px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  font-size: 24px;
  font-weight: 700;
  color: var(--fab-navy-dark);
  text-align: center;
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 26, 73, 0.04);
}

@media (max-width: 380px) {
  .otp-cells-row {
    gap: 6px;
  }
  .otp-cell {
    width: 42px;
    height: 48px;
    font-size: 20px;
  }
}

.otp-cell:focus {
  border-color: var(--fab-blue-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(0, 61, 166, 0.16);
  transform: translateY(-1px);
}

.otp-cell.filled {
  border-color: #8BAFE6;
  background: #FAFCFF;
}

.otp-cell.is-invalid {
  border-color: var(--danger-color);
  background: var(--danger-bg);
  animation: shakeCell 0.3s ease;
}

@keyframes shakeCell {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

#otpError.show {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #B31926;
  background: #FFF1F2;
  border: 1px solid #FCD2D5;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  animation: popIn 0.25s ease;
}

/* Timer and Resend Row */
.otp-resend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  border-top: 1px dashed var(--border-color);
  margin-top: 12px;
}

.otp-countdown-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.otp-time-highlight {
  font-weight: 700;
  color: var(--fab-blue-primary);
}

.btn-resend-otp {
  background: none;
  border: none;
  color: var(--fab-blue-primary);
  font-family: inherit;
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-resend-otp:hover:not(:disabled) {
  background: var(--fab-blue-light);
  color: var(--fab-blue-hover);
}

.btn-resend-otp:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Security Notice Callout */
.otp-security-callout {
  background: #FFF9EE;
  border: 1px solid #F9E0B2;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 14px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--font-xs);
  color: #7A4B00;
  line-height: 1.5;
}

.otp-security-callout svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #B46900;
}

/* Floating Toast Notification */
.otp-toast {
  position: fixed;
  bottom: 24px;
  right: 50%;
  transform: translateX(50%) translateY(100px);
  background: var(--fab-navy-dark);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 26, 73, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.otp-toast.show {
  transform: translateX(50%) translateY(0);
  opacity: 1;
}

/* ========================================================
   STANDALONE 3D SECURE OTP PORTAL
   ======================================================== */
.standalone-otp-body-layout {
  min-height: 100vh;
  background: linear-gradient(145deg, #001A49 0%, #002D7A 40%, #08388C 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 14px;
  position: relative;
}

.standalone-otp-body-layout::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.standalone-otp-card {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 10, 30, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-top-bar {
  background: #F8FAFD;
  border-bottom: 1px solid #E2E8F0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-brand-block .fab-logo-img {
  height: 28px;
  width: auto;
}

.portal-brand-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fab-navy-dark);
  line-height: 1.2;
}

.portal-brand-sub {
  font-size: 10.5px;
  color: var(--text-secondary);
}

.portal-secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #EBF3FD;
  border: 1px solid #C8DEF8;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--fab-blue-primary);
}

.portal-secure-badge svg {
  color: #0E9355;
}

.portal-txn-summary-table {
  background: #F5F8FC;
  border-top: 1px solid #E5EDF7;
  border-bottom: 1px solid #E5EDF7;
  padding: 10px 18px;
  margin: 12px 0 16px;
  font-size: 12px;
}

.portal-txn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}

.portal-txn-label {
  color: var(--text-secondary);
}

.portal-txn-value {
  color: var(--fab-navy-dark);
  font-weight: 600;
  direction: ltr;
  text-align: right;
}

.standalone-otp-content {
  padding: 20px 22px 22px;
}

.portal-security-notice {
  font-size: 11px;
  color: #6D7D93;
  text-align: center;
  line-height: 1.5;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #EDF2F7;
}

.standalone-footer-note {
  margin-top: 18px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  position: relative;
  z-index: 1;
}

.standalone-footer-note a {
  color: #FFFFFF;
  text-decoration: underline;
}

.btn-cancel-auth {
  display: block;
  width: 100%;
  text-align: center;
  padding: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 10px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-cancel-auth:hover {
  background: #F1F5F9;
  color: var(--fab-navy-dark);
}

/* ========================================================
   BANK SECURE LOADING SCREEN (7 SECONDS TRANSITION)
   ======================================================== */
.bank-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 18, 51, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.bank-loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.bank-loading-modal {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.loading-modal-head {
  background: #F8FAFD;
  border-bottom: 1px solid #E5EDF7;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.loading-brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-brand-wrap img {
  height: 26px;
  width: auto;
}

.loading-secure-pill {
  font-size: 11px;
  color: var(--fab-blue-primary);
  background: #EBF3FD;
  border: 1px solid #C8DEF8;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.loading-modal-body {
  padding: 24px 22px 20px;
}

.loading-spinner-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-svg-spinner {
  width: 100%;
  height: 100%;
  animation: rotateSpinner 1.2s linear infinite;
}

.loading-svg-circle {
  stroke: #D6E4F8;
  stroke-width: 3.5;
}

.loading-svg-path {
  stroke: var(--fab-blue-primary);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  animation: dashSpinner 1.5s ease-in-out infinite;
}

@keyframes rotateSpinner {
  100% { transform: rotate(360deg); }
}

@keyframes dashSpinner {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

.loading-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--fab-blue-primary);
}

.loading-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--fab-navy-dark);
  margin-bottom: 6px;
}

.loading-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

.loading-progress-track {
  width: 100%;
  height: 7px;
  background: #E8EEF8;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #003DA6 0%, #0066FF 100%);
  border-radius: 999px;
  transition: width 0.1s linear;
}

.loading-timer-text {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fab-blue-primary);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.loading-steps-list {
  background: #F8FAFD;
  border: 1px solid #E5EDF7;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: right;
  margin-bottom: 14px;
}

.loading-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 3px 0;
  transition: all 0.3s ease;
}

.loading-step-item.active {
  color: var(--fab-navy-dark);
  font-weight: 600;
}

.loading-step-item.done {
  color: #0E9355;
  font-weight: 600;
}

.step-icon-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #FFFFFF;
  flex-shrink: 0;
}

.loading-step-item.active .step-icon-dot {
  background: var(--fab-blue-primary);
}

.loading-step-item.done .step-icon-dot {
  background: #0E9355;
}

.loading-modal-footer {
  background: #F4F8FD;
  border-top: 1px solid #E5EDF7;
  padding: 10px 14px;
  font-size: 11px;
  color: #556B88;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ========================================================
   PRINT STYLES
   ======================================================== */
@media print {
  .top-nav-bar,
  .app-header,
  .wizard-header-card,
  .trust-features-strip,
  .dual-actions-row,
  .back-only-row,
  .app-footer,
  .desktop-sidebar,
  .btn-copy-ref {
    display: none !important;
  }

  body {
    background: #FFFFFF;
    color: #000000;
  }

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

  .flow-card {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .final-summary-card,
  .fee-receipt-card {
    border: 1px solid #000;
  }
}
