/* ──────────────────────────────────────────────────────
   A2LogisticsCalc — Design System & Styles
   Dark world-map hero + SeaRates-inspired calculator
   ────────────────────────────────────────────────────── */

/* ─── RESET & TOKENS ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --white: #FFFFFF;
  --green-500: #22C55E;
  --green-50: #F0FDF4;
  --amber-500: #F59E0B;
  --amber-50: #FFFBEB;

  --hero-dark: #0B1929;
  --hero-mid: #112240;
  --hero-light: #1a3a5c;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .06), 0 2px 4px -2px rgba(0, 0, 0, .06);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, .08), 0 4px 6px -4px rgba(0, 0, 0, .04);
  --shadow-xl: 0 20px 50px -10px rgba(0, 0, 0, .12);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.55;
  overflow-x: hidden
}

a {
  color: inherit;
  text-decoration: none
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none
}

ul {
  list-style: none
}

select {
  font-family: inherit
}

/* ══════════════════════════════════════════════════════
   HERO — Dark World Map
   ══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1f38 url('fon.png') center center / cover no-repeat;
  overflow: hidden;
}

/* Dark filter over background image */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 25, 41, 0.75);
  z-index: 1;
}



/* Overlay gradient - darker to ensure text readability */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 25% 50%, rgba(11, 25, 41, .35) 0%, transparent 60%),
    linear-gradient(180deg, rgba(11, 25, 41, .2) 0%, rgba(11, 25, 41, .4) 100%);
}

.hero-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(0deg, var(--hero-dark) 0%, transparent 100%);
  z-index: 3;
}

.hero-inner {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  width: 100%;
  padding: 48px 40px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

/* ─── LOGO ─── */
.hero-logo {
  position: absolute;
  top: 10px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 20;
}

.logo-icon {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  object-fit: contain;
  opacity: 0.75;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, .95);
  letter-spacing: -.02em;
  line-height: 1;
}

.logo-highlight {
  color: var(--blue-400);
  font-weight: 700;
}

.logo-tagline {
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .4);
  text-transform: uppercase;
}

/* ─── HERO TEXT ─── */
.hero-text {
  padding-top: 80px;
  animation: heroTextIn .7s var(--ease) both;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .04em;
  line-height: 1.35;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .55);
  line-height: 1.65;
  max-width: 420px;
}

/* ─── INFO PANEL ─── */
.info-panel {
  margin-top: 32px;
  background: rgba(255, 255, 255, .06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  max-width: 360px;
  animation: fadeSlide .5s var(--ease);
}

.info-panel-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .35);
  margin-bottom: 12px;
}

.info-rates {
  display: flex;
  align-items: center;
  gap: 16px;
}

.info-rate {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-rate-pair {
  font-size: .68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .4);
  letter-spacing: .03em;
}

.info-rate-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(255, 255, 255, .9);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.info-rate-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, .1);
}

.info-ports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.info-port {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-port-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.info-port-green {
  background: #22C55E;
  box-shadow: 0 0 6px rgba(34, 197, 94, .5);
}

.info-port-yellow {
  background: #F59E0B;
  box-shadow: 0 0 6px rgba(245, 158, 11, .5);
}

.info-port-red {
  background: #EF4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, .5);
}

.info-port-name {
  font-size: .75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .55);
}

/* ══════════════════════════════════════════════════════
   CALCULATOR CARD
   ══════════════════════════════════════════════════════ */
.calc-card {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-radius: var(--r-xl);
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow:
    0 24px 60px -12px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .6);
  overflow: visible;
  width: 100%;
  max-width: 540px;
  justify-self: end;
  margin-top: 90px;
  animation: cardAppear .6s var(--ease) both;
}

/* ─── TABS ─── */
.calc-tabs {
  display: flex;
  background: rgba(248, 250, 252, .65);
  border-bottom: 1px solid rgba(226, 232, 240, .6);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  overflow: hidden;
}

.calc-tab {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gray-400);
  transition: all .2s var(--ease);
  position: relative;
  white-space: nowrap;
}

.calc-tab:hover {
  color: var(--gray-600)
}

.calc-tab.active {
  color: var(--blue-600);
  background: rgba(255, 255, 255, .75);
}

.calc-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563EB, #38BDF8);
}

.calc-tab svg {
  color: currentColor
}

/* ─── FORM ─── */
.calc-form {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-row {
  display: flex;
  gap: 12px
}

.calc-row-2col>.calc-field {
  flex: 1;
  min-width: 0
}

.calc-field {
  position: relative
}

/* Input wrap */
.calc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.calc-input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #8A8F98;
  pointer-events: none;
  z-index: 2;
  flex-shrink: 0;
  transition: color .18s var(--ease);
}

.calc-input-wrap:hover .calc-input-icon {
  color: var(--gray-500);
}

.calc-input-wrap:focus-within .calc-input-icon {
  color: #3B82F6;
}

.calc-swap-icon {
  position: absolute;
  right: 12px;
  width: 18px;
  height: 18px;
  color: var(--gray-300);
  pointer-events: none;
}

.calc-chevron {
  position: absolute;
  right: 12px;
  width: 18px;
  height: 18px;
  color: var(--gray-400);
  pointer-events: none;
  z-index: 2;
}

.calc-input {
  width: 100%;
  height: 52px;
  padding: 16px 40px 0 42px;
  border: 1.5px solid #D0D5DD;
  border-radius: var(--r-md);
  font-size: .9rem;
  font-weight: 500;
  color: #1C1F23;
  background: #fff;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.calc-input::placeholder {
  color: transparent;
}

.calc-input:hover:not(:focus) {
  border-color: #B0B5BD;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.calc-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
  background: #fff;
}

/* ─── FLOATING LABELS ─── */
.calc-input-label {
  position: absolute;
  left: 42px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .875rem;
  font-weight: 400;
  color: #8A8F98;
  pointer-events: none;
  transition: top .18s var(--ease), transform .18s var(--ease), font-size .18s var(--ease), color .18s var(--ease);
  transform-origin: left center;
  z-index: 3;
  background: transparent;
  padding: 0;
  line-height: 1;
}

.calc-input:focus + .calc-input-label,
.calc-input:not(:placeholder-shown) + .calc-input-label {
  top: 14px;
  transform: translateY(-50%);
  font-size: .68rem;
  font-weight: 600;
  color: #3B82F6;
  letter-spacing: .02em;
  background: transparent;
  left: 42px;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.calc-input:not(:focus):not(:placeholder-shown) + .calc-input-label {
  color: #8A8F98;
  background: transparent;
  box-shadow: none;
}

.calc-select {
  appearance: none;
  cursor: pointer;
  padding-right: 36px;
}

.calc-select-wrap .calc-input {
  padding-right: 36px
}

/* ─── SEGMENTED CONTROL ─── */
.calc-segment-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.calc-segment-label svg {
  color: var(--gray-400);
  flex-shrink: 0;
}

.calc-segmented {
  display: flex;
  gap: 0;
  background: var(--gray-100);
  border-radius: var(--r-md);
  padding: 3px;
  width: 100%;
  position: relative;
}

.calc-seg-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  border-radius: calc(var(--r-md) - 2px);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), width .3s cubic-bezier(.4, 0, .2, 1);
  z-index: 0;
  pointer-events: none;
}

.calc-seg-btn {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: calc(var(--r-md) - 2px);
  background: transparent;
  color: var(--gray-500);
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color .25s var(--ease), transform .1s var(--ease);
  white-space: nowrap;
  padding: 0 12px;
  position: relative;
  z-index: 1;
}

.calc-seg-btn:hover:not(.active):not(.calc-seg-more-toggle) {
  color: var(--gray-700);
  background: rgba(255, 255, 255, .5);
}

.calc-seg-btn.active {
  background: transparent;
  color: var(--blue-600);
}

.calc-seg-btn:active:not(.active) {
  transform: scale(0.97);
}

.calc-seg-more {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: .72rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0 8px;
  cursor: pointer;
  transition: color .2s var(--ease);
  z-index: 1;
}

.calc-seg-more:hover {
  color: var(--blue-500);
}

.calc-seg-extras {
  display: flex;
  gap: 0;
  margin-top: 6px;
  background: var(--gray-100);
  border-radius: var(--r-md);
  padding: 3px;
  animation: fadeSlide .2s var(--ease);
}

.calc-seg-extras.hidden {
  display: none;
}

.calc-seg-secondary {
  flex: 1;
  height: 36px;
  border: none;
  border-radius: calc(var(--r-md) - 2px);
  background: transparent;
  color: var(--gray-500);
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.calc-seg-secondary:hover {
  color: var(--gray-700);
  background: rgba(255, 255, 255, .5);
}

.calc-seg-secondary.active {
  color: var(--blue-600);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
  font-weight: 600;
}

/* CTA */
.calc-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #2563EB 0%, #38BDF8 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: var(--white);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: all .35s var(--ease);
  margin-top: 4px;
}

.calc-btn:hover:not(:disabled) {
  background-position: 100% 50%;
  box-shadow:
    0 6px 20px rgba(37, 99, 235, .45),
    0 0 0 3px rgba(59, 130, 246, .12);
  transform: translateY(-1px);
}

.calc-btn:active:not(:disabled) {
  transform: translateY(0)
}

.calc-btn:disabled {
  opacity: .4;
  cursor: not-allowed
}

/* ─── AUTOCOMPLETE ─── */
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.autocomplete-list.open {
  display: block;
  animation: fadeSlide .18s var(--ease)
}

.autocomplete-list li {
  padding: 10px 14px;
  font-size: .84rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .12s;
}

.autocomplete-list li:hover,
.autocomplete-list li.highlighted {
  background: var(--blue-50)
}

.autocomplete-list li .ac-flag {
  font-size: 1.1rem
}

.autocomplete-list li .ac-type {
  font-size: .67rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gray-400);
  margin-left: auto;
  letter-spacing: .04em;
}

/* Autocomplete status items (loading, empty) */
.autocomplete-list li.ac-status {
  padding: 14px 14px;
  font-size: .84rem;
  color: var(--gray-400);
  cursor: default;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.autocomplete-list li.ac-status:hover {
  background: transparent;
}

.ac-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Provider name in result cards */
.rc-provider-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--blue-600);
  padding: 4px 0 8px;
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  gap: 8px
}

.rc-provider-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 3px
}

/* ══════════════════════════════════════════════════════
   DATE PICKER
   ══════════════════════════════════════════════════════ */
.datepicker-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 25vh;
  background: rgba(0, 0, 0, .25);
  backdrop-filter: blur(2px);
  animation: fadeIn .15s var(--ease);
}

.datepicker-overlay.hidden {
  display: none
}

.datepicker-card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 20px 24px 24px;
  width: 320px;
  animation: slideUp .2s var(--ease);
}

.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px
}

.dp-month {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-800)
}

.dp-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all .15s;
}

.dp-nav:hover {
  background: var(--gray-100);
  color: var(--gray-800)
}

.dp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: .7rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px
}

.dp-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  color: var(--gray-700);
  border-radius: 50%;
  cursor: pointer;
  transition: all .15s;
}

.dp-day:hover {
  background: var(--blue-50);
  color: var(--blue-600)
}

.dp-day.today {
  font-weight: 700;
  color: var(--blue-600)
}

.dp-day.selected {
  background: var(--blue-600);
  color: var(--white);
  font-weight: 600
}

.dp-day.disabled {
  color: var(--gray-300);
  pointer-events: none
}

.dp-day.empty {
  pointer-events: none
}

/* ══════════════════════════════════════════════════════
   RESULTS SECTION (preserved from v1, Russian labels)
   ══════════════════════════════════════════════════════ */
.results-section {
  padding: 0 24px 80px;
  background: var(--gray-50)
}

.results-inner {
  max-width: 880px;
  margin: 0 auto
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-top: 32px
}

.results-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gray-900)
}

.results-count {
  font-size: .85rem;
  color: var(--gray-400);
  font-weight: 500;
  margin-left: 12px
}

.filters-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px
}

.filter-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .04em
}

.filter-select {
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: .8rem;
  color: var(--gray-700);
  background: var(--white);
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394A3B8'%3e%3cpath d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 16px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--blue-500)
}

.filter-static {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: .8rem;
  color: var(--gray-700);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  font-weight: 500
}

/* ─── ROUTE CARDS ─── */
.route-cards {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.route-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 32px;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
  animation: fadeSlide .35s var(--ease) both;
}

.route-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200)
}

.route-card:nth-child(1) {
  animation-delay: .05s
}

.route-card:nth-child(2) {
  animation-delay: .12s
}

.route-card:nth-child(3) {
  animation-delay: .19s
}

.route-card:nth-child(4) {
  animation-delay: .26s
}

.route-card:nth-child(5) {
  animation-delay: .33s
}

.rc-header {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap
}

.rc-route {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900)
}

.rc-arrow {
  color: var(--blue-500);
  font-weight: 400
}

.rc-badges {
  display: flex;
  gap: 6px;
  margin-left: auto
}

.rc-badge {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 100px
}

.rc-badge.sea {
  background: var(--blue-50);
  color: var(--blue-600)
}

.rc-badge.rail {
  background: var(--amber-50);
  color: var(--amber-500)
}

.rc-badge.fob {
  background: var(--gray-100);
  color: var(--gray-500)
}

.rc-body {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap
}

.rc-legs {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 260px
}

.rc-leg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding: 8px 0
}

.rc-leg::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: -8px;
  width: 2px;
  background: var(--gray-200)
}

.rc-leg:last-child::before {
  display: none
}

.rc-leg-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .7rem
}

.rc-leg-icon.sea-icon {
  background: var(--blue-50);
  color: var(--blue-600)
}

.rc-leg-icon.rail-icon {
  background: var(--amber-50);
  color: var(--amber-500)
}

.rc-leg-info {
  flex: 1
}

.rc-leg-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-800)
}

.rc-leg-detail {
  font-size: .78rem;
  color: var(--gray-400);
  margin-top: 2px
}

.rc-price-block {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  justify-self: end
}

.rc-price-label {
  font-size: .72rem;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .04em
}

.rc-price {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.02em;
  line-height: 1
}

.rc-transit {
  font-size: .82rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px
}

.rc-transit svg {
  width: 14px;
  height: 14px;
  color: var(--gray-400)
}

.rc-quote-btn {
  margin-top: 6px
}

/* ─── TERMS EXPANDABLE ─── */
.rc-terms {
  border-top: 1px solid var(--gray-100);
  margin-top: 4px;
  padding-top: 0;
}

.rc-terms-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--gray-400);
  cursor: pointer;
  transition: color .2s var(--ease);
  user-select: none;
}

.rc-terms-toggle:hover {
  color: var(--blue-600);
}

.rc-terms-chevron {
  transition: transform .25s var(--ease);
  flex-shrink: 0;
}

.rc-terms-toggle.open .rc-terms-chevron {
  transform: rotate(180deg);
}

.rc-terms-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s var(--ease), opacity .25s var(--ease);
  opacity: 0;
}

.rc-terms-content.open {
  max-height: 3000px;
  opacity: 1;
}

.rc-terms-section {
  padding: 10px 0;
  border-top: 1px dashed var(--gray-100);
}

.rc-terms-section:first-child {
  border-top: none;
}

.rc-terms-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.rc-terms-text {
  font-size: .78rem;
  color: var(--gray-600);
  line-height: 1.6;
  white-space: pre-line;
}

.rc-best {
  position: relative;
  border-color: var(--green-500)
}

.rc-best::before {
  content: 'BEST PRICE';
  position: absolute;
  top: -1px;
  right: -1px;
  background: var(--green-500);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 0 var(--r-lg) 0 var(--r-md)
}

/* ─── TRACKING ─── */
.trk-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  color: var(--gray-400);
  font-size: .85rem;
}
.trk-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.trk-empty {
  text-align: center;
  padding: 32px 16px;
}
.trk-empty-title {
  font-weight: 700;
  color: var(--gray-700);
  margin-top: 12px;
}
.trk-empty-text {
  color: var(--gray-400);
  font-size: .82rem;
  margin-top: 4px;
}
.trk-error {
  text-align: center;
  padding: 24px 16px;
  color: #DC2626;
  font-size: .85rem;
}

.trk-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.trk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.trk-container-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: .04em;
  font-family: 'JetBrains Mono', monospace;
}
.trk-status {
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.trk-arrived { background: #ECFDF5; color: #059669; }
.trk-moving { background: #EFF6FF; color: #2563EB; }
.trk-slow { background: #FFFBEB; color: #D97706; }
.trk-stuck { background: #FEF2F2; color: #DC2626; }
.trk-header-badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.trk-source {
  font-size: .6rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}
.trk-src-sheet { background: #F0FDF4; color: #15803D; }
.trk-src-trcont { background: #EFF6FF; color: #1D4ED8; }

.trk-route {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.trk-route-from, .trk-route-to {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
}
.trk-route-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 3px;
  flex-shrink: 0;
}
.trk-dot-blue { background: var(--blue-600); }
.trk-dot-green { background: #059669; }
.trk-route-label {
  font-size: .68rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.trk-route-station {
  font-size: .88rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-top: 2px;
}
.trk-route-line {
  flex: 0 0 auto;
  width: 40px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--gray-300) 0 4px, transparent 4px 8px);
  margin-top: 10px;
}

.trk-progress-wrap { margin-bottom: 12px; }
.trk-progress-bar {
  position: relative;
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: visible;
}
.trk-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s var(--ease);
}
.trk-progress-fill.trk-arrived { background: #059669; }
.trk-progress-fill.trk-moving { background: var(--blue-600); }
.trk-progress-fill.trk-slow { background: #D97706; }
.trk-progress-fill.trk-stuck { background: #DC2626; }
.trk-progress-train {
  position: absolute;
  top: -10px;
  transform: translateX(-50%);
  font-size: 16px;
  transition: left .5s var(--ease);
}
.trk-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--gray-400);
  margin-top: 6px;
}

.trk-history { margin-top: 8px; border-top: 1px solid var(--gray-100); }
.trk-history-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0 0;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  user-select: none;
}
.trk-history-chevron {
  transition: transform .25s var(--ease);
}
.trk-history.open .trk-history-chevron {
  transform: rotate(180deg);
}
.trk-history-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease);
}
.trk-history.open .trk-history-list {
  max-height: 600px;
}
.trk-history-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-50);
  font-size: .78rem;
}
.trk-history-date {
  color: var(--gray-400);
  font-weight: 600;
}
.trk-history-station {
  color: var(--gray-700);
  font-weight: 600;
}
.trk-history-dist {
  color: var(--gray-400);
  text-align: right;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 28px;
  border: none;
  border-radius: var(--r-md);
  background: var(--blue-600);
  color: var(--white);
  font-size: .9rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .3);
  transition: all .2s var(--ease);
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-700);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
  transform: translateY(-1px)
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0)
}

.btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed
}

.btn-primary svg {
  color: var(--white)
}

.btn-full {
  width: 100%;
  justify-content: center
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--gray-700);
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s var(--ease);
}

.btn-outline:hover {
  border-color: var(--blue-500);
  color: var(--blue-600);
  background: var(--blue-50)
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: .8rem
}

/* ─── SKELETONS ─── */
.skeleton-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px
}

.sk-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite
}

.sk-block {
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite
}

.sk-w60 {
  width: 60%
}

.sk-w40 {
  width: 40%
}

.sk-w30 {
  width: 30%
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 64px 24px
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: .6
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px
}

.empty-text {
  font-size: .9rem;
  color: var(--gray-400);
  margin-bottom: 20px
}

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .2s var(--ease)
}

.modal-overlay.hidden {
  display: none
}

.modal-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: 36px 32px;
  max-width: 520px;
  width: 100%;
  position: relative;
  animation: slideUp .3s var(--ease)
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-800)
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px
}

.modal-subtitle {
  font-size: .85rem;
  color: var(--gray-400);
  margin-bottom: 24px
}

.quote-form label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-family: inherit;
  color: var(--gray-800);
  transition: border-color .2s var(--ease)
}

.quote-form input:focus,
.quote-form textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12)
}

.quote-form textarea {
  resize: vertical
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px
}

.form-field {
  margin-bottom: 14px
}

.form-row .form-field {
  margin-bottom: 0
}

.quote-form .btn-primary {
  margin-top: 8px
}

/* ─── UTILITIES ─── */
.hidden {
  display: none !important
}

/* ─── ANIMATIONS ─── */
/* ─── MAP CITY POINTS ─── */
.map-points {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.map-point {
  position: absolute;
  pointer-events: auto;
  cursor: default;
}

.map-point-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-400);
  opacity: 0.5;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  position: relative;
}

.map-point-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--blue-400);
  opacity: 0;
  animation: mapPulse 3s ease-out infinite;
}

.map-point:hover .map-point-dot {
  opacity: 1;
  transform: scale(1.5);
}

.map-point:hover .map-point-dot::after {
  animation: none;
  opacity: 0;
}

.map-point-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15, 23, 42, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 5;
  line-height: 1.4;
}

.map-point-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(15, 23, 42, .92);
}

.map-point:hover .map-point-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── REVERSE ROUTE BUTTON ─── */
.calc-reverse-wrap {
  display: flex;
  justify-content: center;
  margin: -4px 0;
  position: relative;
  z-index: 5;
}

.calc-reverse-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .3s var(--ease);
  color: var(--gray-400);
}

.calc-reverse-btn:hover {
  border-color: var(--blue-400);
  color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .15);
  transform: rotate(180deg);
}

.calc-reverse-btn:active {
  transform: rotate(180deg) scale(.92);
}

.calc-reverse-btn svg {
  width: 18px;
  height: 18px;
}

/* ─── CURRENCY WIDGET ─── */
.currency-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 80;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 160px;
  animation: widgetSlideIn .5s var(--ease) .3s both;
}

.currency-widget-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.currency-widget-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.currency-widget-icon.usd {
  background: rgba(34, 197, 94, .2);
  color: #22C55E;
}

.currency-widget-icon.cny {
  background: rgba(239, 68, 68, .2);
  color: #EF4444;
}

.currency-widget-pair {
  font-size: .7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .5);
  letter-spacing: .02em;
  min-width: 52px;
}

.currency-widget-value {
  font-size: .95rem;
  font-weight: 800;
  color: rgba(255, 255, 255, .92);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.currency-widget-divider {
  height: 1px;
  background: rgba(255, 255, 255, .1);
}

/* ─── HERO ENTRANCE ANIMATIONS ─── */

@keyframes heroTextIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes widgetSlideIn {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes mapPulse {
  0%   { transform: scale(1);   opacity: .3; }
  50%  { transform: scale(2.5); opacity: 0; }
  100% { transform: scale(2.5); opacity: 0; }
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.97)
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0
  }

  100% {
    background-position: -200% 0
  }
}

/* ─── RESPONSIVE ─── */
@media(max-width:960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 100px 24px 48px
  }

  .hero-text {
    padding-top: 0
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto
  }

  .calc-card {
    max-width: 540px;
    justify-self: center;
    margin-top: 32px
  }

  .hero-logo {
    left: 50%;
    transform: translateX(-50%)
  }

  .info-panel {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media(max-width:600px) {
  .map-points {
    display: none;
  }

  .currency-widget {
    bottom: 10px;
    left: 10px;
    padding: 10px 14px;
    min-width: 140px;
    border-radius: 10px;
  }

  .currency-widget-value {
    font-size: .85rem;
  }

  .hero-title {
    font-size: 1.7rem
  }

  .hero-subtitle {
    font-size: .92rem
  }

  .calc-row-2col {
    flex-direction: column
  }

  .filters-bar {
    flex-direction: column
  }

  .route-card {
    grid-template-columns: 1fr;
    gap: 16px
  }

  .rc-price-block {
    text-align: left;
    align-items: flex-start;
    justify-self: start;
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap
  }

  .rc-badges {
    margin-left: 0
  }
}

/* ─── USER BADGE ─── */
.user-badge {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1e293b, #334155);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-md);
  padding: 6px 12px;
  color: #fff;
  font-size: .8rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .1);
}

.user-badge-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badge-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .6);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: color .2s, background .2s;
}

.user-badge-logout:hover {
  color: #fff;
  background: rgba(255, 255, 255, .15);
}

/* Login modal — blur the page behind */
#loginModal .modal-card {
  animation: slideUp .4s var(--ease) both;
}

/* ─── NOTIFICATION BELL ─── */
.notif-bell {
  position: relative;
}

.notif-bell-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, .7);
  padding: 2px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color .2s, background .2s;
}

.notif-bell-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, .15);
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1e293b;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 420px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
  overflow: hidden;
  z-index: 200;
  animation: fadeSlide .2s var(--ease);
}

.notif-dropdown-header {
  padding: 14px 18px;
  font-weight: 700;
  font-size: .85rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
}

.notif-dropdown-list {
  overflow-y: auto;
  max-height: 360px;
}

.notif-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--gray-50);
  font-size: .82rem;
  color: var(--gray-600);
  transition: background .15s;
}

.notif-item:hover {
  background: var(--gray-50);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item strong {
  color: var(--gray-800);
}

.notif-item-time {
  font-size: .7rem;
  color: var(--gray-400);
  margin-top: 3px;
}

.notif-empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--gray-400);
  font-size: .85rem;
}

/* ─── NOTIFICATION TOAST ─── */
.notification-toast {
  position: fixed;
  top: 60px;
  right: 24px;
  z-index: 300;
  background: var(--hero-mid);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: .84rem;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .1);
  transform: translateX(calc(100% + 32px));
  transition: transform .35s var(--ease);
}

.notification-toast.show {
  transform: translateX(0);
}

.notification-toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ─── RATE VALIDITY ─── */
.rc-validity {
  font-size: .78rem;
  font-weight: 500;
  margin-top: 6px;
  font-style: italic;
  letter-spacing: .01em;
}

.rc-validity-active {
  color: #059669;
}

.rc-validity-expired {
  color: #dc2626;
}

.rc-expired {
  opacity: .55;
  filter: grayscale(30%);
  position: relative;
}

.rc-expired::after {
  content: 'Ставка устарела';
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fef2f2;
  color: #dc2626;
  font-size: .7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(220, 38, 38, .15);
}

/* ─── QUOTE HISTORY ─── */
.user-badge-history {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .6);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: color .2s, background .2s;
}

.user-badge-history:hover {
  color: #fff;
  background: rgba(255, 255, 255, .15);
}

.quote-history-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.quote-history-item:last-child {
  border-bottom: none;
}

.quote-history-route {
  font-weight: 700;
  font-size: .9rem;
  color: var(--gray-800);
  min-width: 180px;
}

.quote-history-meta {
  flex: 1;
  font-size: .78rem;
  color: var(--gray-400);
  min-width: 120px;
}

/* ─── RATE HISTORY MODAL ─── */
.rh-filters {
  margin-bottom: 16px;
}

.rh-filter-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.rh-filter-group {
  flex: 1;
  min-width: 120px;
}

.rh-filter-group label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.rh-filter-group select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color .2s;
}

.rh-filter-group select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.rh-search-btn {
  padding: 7px 20px;
  font-size: .82rem;
  white-space: nowrap;
  align-self: flex-end;
}

/* ─── Rate History: Autocomplete fields ─── */

.rh-ac-field {
  position: relative;
  flex: 1;
  min-width: 150px;
}

.rh-ac-wrap {
  position: relative;
}

.rh-ac-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color .2s;
  box-sizing: border-box;
}

.rh-ac-input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.rh-ac-field .autocomplete-list {
  z-index: 300;
}

/* ─── Rate History: Container segmented ─── */

.rh-seg-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.rh-seg-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.rh-seg-btn {
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 600;
  font-family: inherit;
  border: 1.5px solid var(--gray-200);
  border-radius: 100px;
  background: var(--white);
  color: var(--gray-500);
  cursor: pointer;
  transition: all .18s;
}

.rh-seg-btn:hover {
  border-color: var(--blue-300);
  color: var(--blue-600);
}

.rh-seg-btn.active {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: var(--white);
}

/* ─── Rate History: Cards ─── */

.rh-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rh-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 24px;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
  animation: fadeSlide .3s var(--ease) both;
}

.rh-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200);
}

.rh-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: .8rem;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.rh-summary-item {
  background: var(--gray-50);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-weight: 500;
}

.rh-summary-item strong {
  color: var(--gray-800);
}

/* ─── SPARKLINE ─── */
.rc-sparkline {
  margin-bottom: 6px;
}

.rc-sparkline svg {
  display: block;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 8px;
  font-size: 1.2rem;
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

@media (max-width: 600px) {
  .user-badge {
    top: 10px;
    right: 12px;
    font-size: .72rem;
    padding: 5px 10px;
  }

  .notif-bell-btn svg {
    width: 14px;
    height: 14px;
  }

  .notif-dropdown {
    width: 300px;
    right: -60px;
  }

  .notification-toast {
    top: auto;
    bottom: 20px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}