/* ==========================================================================
   Forward Express (FX) — Ocean Freight Design System
   Brand Tokens: Deep Navy #00355F | Forward Sky #29A8F0 | Vermilion #D64509
   ========================================================================== */

:root {
  --fx-navy-900: #00223E;
  --fx-navy-800: #002C50;
  --fx-navy-700: #00355F;
  --fx-navy-50: #F0F5FA;
  --fx-sky-500: #29A8F0;
  --fx-sky-600: #168DD4;
  --fx-sky-100: #E6F5FE;
  --fx-vermilion-600: #D64509;
  --fx-vermilion-700: #B53806;
  --fx-vermilion-50: #FFF3EE;
  --fx-surface: #FFFFFF;
  --fx-canvas: #F6F8FB;
  --fx-border: #D8E2EC;
  --fx-border-strong: #BCCCDC;
  --fx-text-primary: #0F2537;
  --fx-text-secondary: #334E68;
  --fx-text-muted: #5B7083;
  --fx-success: #0E8A5F;
  --fx-success-bg: #E6F7F1;
  --fx-warning: #C77700;
  --fx-warning-bg: #FFF6E5;
  --fx-error: #C62828;
  --fx-error-bg: #FDECEC;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 34, 62, 0.06);
  --shadow-md: 0 8px 24px -6px rgba(0, 53, 95, 0.12);
  --shadow-command: 0 20px 50px -12px rgba(0, 34, 62, 0.28);
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--fx-text-primary);
  background: var(--fx-canvas);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: clip;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Global focus ring */
:focus-visible {
  outline: 2px solid var(--fx-sky-500);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--fx-vermilion-600);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(214, 69, 9, 0.25);
}
.btn-primary:hover {
  background: var(--fx-vermilion-700);
}

.btn-navy {
  background: var(--fx-navy-700);
  color: #FFFFFF;
}
.btn-navy:hover {
  background: var(--fx-navy-900);
}

.btn-outline {
  background: var(--fx-surface);
  color: var(--fx-navy-700);
  border-color: var(--fx-border-strong);
}
.btn-outline:hover {
  background: var(--fx-navy-50);
  border-color: var(--fx-navy-700);
}

.btn-ghost {
  background: transparent;
  color: var(--fx-navy-700);
}
.btn-ghost:hover {
  background: var(--fx-navy-50);
}

.btn-sm {
  height: 36px;
  padding: 0 13px;
  font-size: 13px;
}

.btn-lg {
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
}

/* Form Controls */
.fx-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}

.fx-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--fx-text-muted);
}

.fx-input, .fx-select, .fx-textarea {
  height: 44px;
  width: 100%;
  padding: 0 13px;
  border: 1.5px solid var(--fx-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--fx-text-primary);
  background-color: var(--fx-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select.fx-select {
  background-color: var(--fx-surface);
  padding-right: 28px;
  cursor: pointer;
}

.fx-textarea {
  height: auto;
  padding: 10px 13px;
  min-height: 84px;
  resize: vertical;
}

.fx-input:focus, .fx-select:focus, .fx-textarea:focus {
  border-color: var(--fx-sky-500);
  box-shadow: 0 0 0 3px rgba(41, 168, 240, 0.18);
  outline: none;
}

.fx-input::placeholder {
  color: #829AB1;
  font-weight: 400;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge-success { background: var(--fx-success-bg); color: var(--fx-success); }
.badge-warning { background: var(--fx-warning-bg); color: var(--fx-warning); }
.badge-error { background: var(--fx-error-bg); color: var(--fx-error); }
.badge-sky { background: var(--fx-sky-100); color: var(--fx-navy-700); }
.badge-navy { background: var(--fx-navy-50); color: var(--fx-navy-700); }
.badge-vermilion { background: var(--fx-vermilion-50); color: var(--fx-vermilion-600); }

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  background: var(--fx-surface);
  border-bottom: 1px solid var(--fx-border);
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 13px;
  border-radius: var(--radius-md);
  color: var(--fx-text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  background: var(--fx-navy-50);
  color: var(--fx-navy-700);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Sticky Mini Quick-Action Bar (Appears when Hero Command Bar scrolls out) */
.sticky-quick-bar {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  height: 54px;
  background: var(--fx-navy-900);
  color: #FFFFFF;
  z-index: 55;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
  box-shadow: 0 8px 24px rgba(0, 22, 42, 0.25);
}

.sticky-quick-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-bar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sticky-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  max-width: 100%;
}

.sticky-pills::-webkit-scrollbar {
  display: none;
}

.sticky-pill {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

/* Mobile Nav Drawer & Toggle */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--fx-border-strong);
  background: var(--fx-surface);
  color: var(--fx-navy-700);
  font-size: 20px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-nav-drawer {
  display: none;
  background: var(--fx-surface);
  border-bottom: 1px solid var(--fx-border);
  padding: 12px 20px 16px;
  box-shadow: var(--shadow-md);
}

.mobile-nav-drawer.open {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-drawer .nav-link {
  padding: 10px 12px;
  display: block;
}

.sticky-pill:hover, .sticky-pill.active {
  background: var(--fx-sky-500);
  border-color: var(--fx-sky-500);
  color: #FFFFFF;
}

.sticky-track-form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sticky-track-input {
  height: 34px;
  width: 240px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 13px;
}

.sticky-track-input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   Hero & Unified Freight Command Bar
   ========================================================================== */
.hero-section {
  background:
    radial-gradient(circle at 82% 20%, rgba(41, 168, 240, 0.22), transparent 44%),
    radial-gradient(circle at 15% 85%, rgba(214, 69, 9, 0.16), transparent 40%),
    linear-gradient(135deg, var(--fx-navy-900) 0%, var(--fx-navy-700) 60%, #05487D 100%);
  color: #FFFFFF;
  padding: 54px 0 112px;
  position: relative;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(41, 168, 240, 0.18);
  border: 1px solid rgba(41, 168, 240, 0.35);
  color: #BFE8FF;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 780px;
}

.hero-subtitle {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.84);
  max-width: 680px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-metric strong {
  color: #FFFFFF;
  font-weight: 700;
}

/* Command Bar Overlapping Hero */
.command-bar-wrap {
  margin-top: -78px;
  position: relative;
  z-index: 30;
  margin-bottom: 36px;
}

.command-bar {
  background: var(--fx-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-command);
  border: 1px solid rgba(0, 53, 95, 0.1);
  overflow: visible;
}

.command-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--fx-navy-50);
  border-bottom: 1px solid var(--fx-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 8px 12px 0;
  gap: 10px;
  flex-wrap: wrap;
}

.command-tab-list {
  display: flex;
  gap: 4px;
}

.command-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--fx-text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
}

.command-tab:hover {
  color: var(--fx-navy-700);
  background: rgba(255, 255, 255, 0.65);
}

.command-tab.active {
  background: var(--fx-surface);
  color: var(--fx-navy-700);
  box-shadow: 0 -2px 0 var(--fx-vermilion-600) inset;
}

.command-portal-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--fx-navy-700);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
}

.command-portal-link:hover {
  background: rgba(0, 53, 95, 0.06);
  color: var(--fx-sky-600);
}

.command-body {
  padding: 20px 22px 22px;
}

.mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.mode-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--fx-canvas);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--fx-border);
  max-width: 100%;
}

.mode-pill {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--fx-text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-pill.active {
  background: var(--fx-sky-100);
  color: var(--fx-navy-700);
  border-color: var(--fx-sky-500);
}

.command-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.swap-btn {
  height: 44px;
  width: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--fx-border);
  background: var(--fx-navy-50);
  color: var(--fx-navy-700);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.15s ease;
}

.swap-btn:hover {
  background: var(--fx-sky-100);
  border-color: var(--fx-sky-500);
}

.swap-btn.rotated {
  transform: rotate(180deg);
}

/* Autocomplete Dropdown */
.autocomplete-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 90;
  max-height: 270px;
  overflow-y: auto;
  display: none;
}

.autocomplete-menu.open {
  display: block;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  cursor: pointer;
  border-bottom: 1px solid #F0F4F8;
  font-size: 13px;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--fx-navy-50);
}

.port-code-tag {
  font-weight: 800;
  color: var(--fx-navy-700);
  background: var(--fx-sky-100);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Active Workspace Panel (Rates / Schedules / Tracking / Booking)
   ========================================================================== */
.workspace-section {
  padding: 10px 0 48px;
  scroll-margin-top: 136px;
}

.card {
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
}

.rates-layout > *, .booking-layout > *, .tools-shell > *, .form-grid-2 > *, .form-grid-3 > *, .spec-grid > * {
  min-width: 0;
}

.card-pad {
  padding: 22px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.section-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--fx-navy-700);
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--fx-text-muted);
}

/* Rate Module */
.rates-layout {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 20px;
  align-items: start;
}

.rate-option-card {
  border: 1.5px solid var(--fx-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: var(--fx-surface);
  margin-bottom: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rate-option-card:hover {
  border-color: var(--fx-sky-500);
  box-shadow: var(--shadow-md);
}

.rate-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--fx-navy-700);
  line-height: 1.1;
}

.breakdown-list {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--fx-border);
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  color: var(--fx-text-secondary);
}

.container-steppers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stepper-box {
  border: 1.5px solid var(--fx-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  text-align: center;
  background: var(--fx-canvas);
}

.stepper-box.has-qty {
  border-color: var(--fx-sky-500);
  background: var(--fx-sky-100);
}

.stepper-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.stepper-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--fx-border-strong);
  background: var(--fx-surface);
  color: var(--fx-navy-700);
  font-weight: 800;
  cursor: pointer;
}

/* Schedules 5-Column Card-Table Hybrid */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: var(--fx-navy-50);
  border-bottom: 1px solid var(--fx-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.schedule-head, .schedule-row-main {
  display: grid;
  grid-template-columns: 2.1fr 1.4fr 1.6fr 1.2fr 1.4fr;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
}

.schedule-head {
  background: #F8FAFC;
  border-bottom: 1px solid var(--fx-border);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fx-text-muted);
}

.schedule-item {
  border-bottom: 1px solid var(--fx-border);
}

.schedule-item:last-child {
  border-bottom: none;
}

.schedule-row-main:hover {
  background: #FAFCFF;
}

.mini-route {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fx-navy-700);
}

.mini-route-line {
  flex: 1;
  height: 2px;
  background: var(--fx-sky-500);
  position: relative;
  min-width: 50px;
}

.mini-route-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fx-navy-700);
  position: absolute;
  top: -3px;
}

.mini-route-via {
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--fx-warning);
  white-space: nowrap;
}

.transit-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--fx-navy-50);
  color: var(--fx-navy-700);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--fx-border);
  cursor: help;
}

.transit-popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background: var(--fx-navy-900);
  color: #FFFFFF;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  z-index: 40;
  box-shadow: var(--shadow-md);
}

.transit-pill:hover .transit-popover {
  display: block;
}

.schedule-drawer {
  display: none;
  padding: 16px 20px 20px;
  background: #F8FBFF;
  border-top: 1px dashed var(--fx-border);
}

.schedule-drawer.open {
  display: block;
}

.route-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.route-step-node {
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--radius-md);
  padding: 12px;
  border-top: 3px solid var(--fx-sky-500);
}

/* Tracking 8-Stage Milestone Stepper */
.smart-track-wrap {
  position: relative;
  display: flex;
  gap: 10px;
}

.detect-chip {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.track-header-strip {
  background: var(--fx-navy-700);
  color: #FFFFFF;
  padding: 18px 22px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.milestone-stepper {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 24px 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--fx-border);
}

.milestone-node {
  flex: 1;
  min-width: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.milestone-node::after {
  content: '';
  position: absolute;
  top: 15px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 2px;
  background: var(--fx-border);
}

.milestone-node:last-child::after {
  display: none;
}

.milestone-node.done::after {
  background: var(--fx-navy-700);
}

.milestone-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  border: 2px solid var(--fx-border-strong);
  background: var(--fx-surface);
  color: var(--fx-text-muted);
  margin-bottom: 8px;
  z-index: 2;
}

.milestone-node.done .milestone-dot {
  background: var(--fx-navy-700);
  border-color: var(--fx-navy-700);
  color: #FFFFFF;
}

.milestone-node.active .milestone-dot {
  background: var(--fx-sky-500);
  border-color: var(--fx-sky-500);
  color: #FFFFFF;
  box-shadow: 0 0 0 6px rgba(41, 168, 240, 0.25);
}

/* Booking 4-Step Wizard */
.booking-layout {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 20px;
  align-items: start;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.wizard-step-btn {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--fx-border);
  background: var(--fx-surface);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.wizard-step-btn.active {
  border-color: var(--fx-sky-500);
  background: var(--fx-sky-100);
}

.wizard-step-btn.done {
  border-color: var(--fx-success);
  background: var(--fx-success-bg);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

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

.addon-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--fx-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--fx-surface);
}

.addon-card:has(input:checked) {
  border-color: var(--fx-sky-500);
  background: var(--fx-sky-100);
}

/* ==========================================================================
   Ocean Freight Services Showcase
   ========================================================================== */
.services-section {
  padding: 44px 0;
  background: var(--fx-surface);
  border-top: 1px solid var(--fx-border);
  border-bottom: 1px solid var(--fx-border);
  scroll-margin-top: 136px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.service-card {
  border: 1px solid var(--fx-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--fx-canvas);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--fx-sky-500);
  box-shadow: var(--shadow-md);
  background: var(--fx-surface);
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--fx-navy-700);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* ==========================================================================
   FX Ocean Tools Hub (4 Interactive Tools)
   ========================================================================== */
.tools-section {
  padding: 52px 0;
  scroll-margin-top: 136px;
}

.tools-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.tools-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--fx-border);
  background: var(--fx-surface);
  color: var(--fx-text-primary);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.tool-nav-btn:hover {
  border-color: var(--fx-sky-500);
}

.tool-nav-btn.active {
  background: var(--fx-navy-700);
  border-color: var(--fx-navy-700);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
}

.tool-nav-btn.active .tool-nav-sub {
  color: rgba(255, 255, 255, 0.78);
}

.tool-nav-sub {
  display: block;
  font-size: 12px;
  color: var(--fx-text-muted);
  margin-top: 2px;
}

/* CBM Fill Bars */
.fit-bar-row {
  margin-bottom: 12px;
}

.fit-track {
  height: 12px;
  background: #E2EBF3;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 5px;
}

.fit-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--fx-sky-500);
  transition: width 0.25s ease;
}

.fit-fill.optimal { background: var(--fx-success); }
.fit-fill.over { background: var(--fx-vermilion-600); }

/* Insurance Commodity Cards */
.commodity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.commodity-card {
  border: 1.5px solid var(--fx-border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--fx-surface);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s ease;
}

.commodity-card:hover {
  border-color: var(--fx-sky-500);
}

.commodity-card.active {
  border-color: var(--fx-navy-700);
  background: var(--fx-sky-100);
}

/* Container Specs Grid */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.spec-card .breakdown-row strong {
  white-space: nowrap;
}

.spec-card {
  border: 1.5px solid var(--fx-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--fx-surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

/* Incoterms Visual Bar */
.incoterm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.incoterm-pill {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--fx-border);
  background: var(--fx-surface);
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  color: var(--fx-navy-700);
  cursor: pointer;
}

.incoterm-pill.active {
  background: var(--fx-navy-700);
  border-color: var(--fx-navy-700);
  color: #FFFFFF;
}

.inco-matrix {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  margin: 18px 0;
}

.inco-cell {
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.inco-seller {
  background: var(--fx-navy-700);
  color: #FFFFFF;
}

.inco-buyer {
  background: var(--fx-sky-100);
  color: var(--fx-navy-700);
  border: 1px solid var(--fx-sky-500);
}

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 22, 42, 0.58);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--fx-surface);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-command);
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--fx-navy-900);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 120;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background: var(--fx-navy-900);
  color: rgba(255, 255, 255, 0.8);
  padding: 44px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-heading {
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--fx-sky-500);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .command-grid { grid-template-columns: 1fr 1fr; }
  .swap-btn { display: none; }
  .rates-layout, .booking-layout, .tools-shell { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-rail { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .tool-nav-btn { min-width: 210px; }
  .inco-matrix { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .header-inner { height: 62px; gap: 10px; }
  .brand-logo { height: 28px; }
  .main-nav { display: none; }
  #btnOpenPortal { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .sticky-quick-bar { top: 62px; height: 48px; }
  .sticky-track-form { display: none; }
  .command-tabs { padding: 8px 8px 0; }
  .command-tab-list { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .command-tab { padding: 10px 4px; font-size: 12px; justify-content: center; gap: 4px; }
  .command-body { padding: 16px 14px; }
  .command-grid { grid-template-columns: 1fr; }
  .smart-track-wrap { flex-direction: column; align-items: stretch !important; }
  .smart-track-wrap .btn { width: 100%; }
  .card-pad { padding: 16px 14px; }
  .schedule-head { display: none; }
  .schedule-row-main { grid-template-columns: 1fr; gap: 10px; }
  .milestone-stepper { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 14px; overflow-x: visible; }
  .milestone-node { flex-direction: row; align-items: flex-start; text-align: left; gap: 12px; min-width: 0; }
  .milestone-node::after { display: none; }
  .milestone-dot { flex-shrink: 0; margin-bottom: 0; }
  .route-stepper, .wizard-steps, .form-grid-2, .form-grid-3, .addon-grid, .commodity-grid, .container-steppers, .spec-grid, .services-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
}
