.logistics-ftl {
  --ftl-bg: #0c1220;
  --ftl-bg-2: #14243b;
  --ftl-text: #f4f7fb;
  --ftl-soft: rgba(255, 255, 255, 0.68);
  --ftl-line: rgba(255, 255, 255, 0.1);
  --ftl-accent: #62d39d;
  --ftl-accent-2: #5caeff;
  --ftl-up: #9ef3ca;
  --ftl-down: #ff9fae;
  color: var(--ftl-text);
}

.logistics-ftl__shell {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 34px);
  border-radius: 32px;
  background: linear-gradient(145deg, var(--ftl-bg) 0%, #111a2c 52%, var(--ftl-bg-2) 100%);
  box-shadow: 0 34px 90px rgba(7, 12, 24, 0.28);
}

.logistics-ftl__shell::before,
.logistics-ftl__shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.logistics-ftl__shell::before {
  left: -90px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(98, 211, 157, 0.22), transparent 70%);
}

.logistics-ftl__shell::after {
  top: -120px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(92, 174, 255, 0.18), transparent 70%);
}

.logistics-ftl__shell > * {
  position: relative;
  z-index: 1;
}

.logistics-ftl__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.logistics-ftl__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--ftl-accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logistics-ftl__title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.logistics-ftl__lead {
  max-width: 520px;
  margin: 0;
  color: var(--ftl-soft);
  line-height: 1.7;
  font-size: 0.94rem;
}

.logistics-ftl__tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ftl-line);
}

.logistics-ftl__tab {
  border: 0;
  background: transparent;
  color: var(--ftl-soft);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.logistics-ftl__tab.is-active {
  background: rgba(98, 211, 157, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(98, 211, 157, 0.28);
}

.logistics-ftl__body {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.logistics-ftl__index-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ftl-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.logistics-ftl__index-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logistics-ftl__index-value {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.logistics-ftl__index-note {
  margin: 14px 0 0;
  color: var(--ftl-soft);
  font-size: 0.82rem;
  line-height: 1.6;
}

.logistics-ftl__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.logistics-ftl__metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ftl-line);
}

.logistics-ftl__metric-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logistics-ftl__metric-value {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.logistics-ftl__metric.is-up .logistics-ftl__metric-value { color: var(--ftl-up); }
.logistics-ftl__metric.is-down .logistics-ftl__metric-value { color: var(--ftl-down); }
.logistics-ftl__metric.is-flat .logistics-ftl__metric-value { color: #fff; }

.logistics-ftl__chart-wrap {
  grid-column: 1 / -1;
  padding: 18px 18px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ftl-line);
}

.logistics-ftl__chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.logistics-ftl__chart-head-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.logistics-ftl__chart-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.logistics-ftl__chart-period {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.logistics-ftl__chart-period:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.logistics-ftl__chart-period.is-active {
  background: rgba(98, 211, 157, 0.16);
  border-color: rgba(98, 211, 157, 0.42);
  color: #d8ffec;
}

.logistics-ftl__chart-period:disabled {
  opacity: 0.55;
  cursor: wait;
}

.logistics-ftl__chart-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.logistics-ftl__chart-meta {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  text-align: right;
  padding-top: 2px;
}

.logistics-ftl.is-chart-loading .logistics-ftl__chart-plot {
  opacity: 0.55;
}

@media (max-width: 720px) {
  .logistics-ftl__chart-head {
    flex-direction: column;
    align-items: stretch;
  }

  .logistics-ftl__chart-meta {
    text-align: left;
    padding-top: 0;
  }
}

.logistics-ftl__chart {
  --ftl-chart-plot-h: 189px;
  min-height: calc(var(--ftl-chart-plot-h) + 26px);
}

.logistics-ftl__chart-layout {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0 8px;
  align-items: start;
}

.logistics-ftl__chart-yaxis {
  position: relative;
  height: var(--ftl-chart-plot-h);
}

.logistics-ftl__chart-y-label {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
}

.logistics-ftl__chart-main {
  min-width: 0;
}

.logistics-ftl__chart-plot {
  position: relative;
  height: var(--ftl-chart-plot-h);
}

.logistics-ftl__chart-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.logistics-ftl__chart-hit {
  cursor: crosshair;
  touch-action: none;
}

.logistics-ftl__chart-guide {
  stroke: rgba(98, 211, 157, 0.55);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.logistics-ftl__chart-marker {
  position: absolute;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 50%;
  background: #62d39d;
  border: 2px solid #0f1a24;
  box-shadow: 0 0 0 2px rgba(98, 211, 157, 0.35);
  pointer-events: none;
  z-index: 1;
}

.logistics-ftl__chart-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 108px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(12, 16, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  z-index: 2;
}

.logistics-ftl__chart-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: rgba(12, 16, 24, 0.94);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(-50%) rotate(45deg);
}

.logistics-ftl__chart-tooltip-date {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.2;
}

.logistics-ftl__chart-tooltip-value {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 4px;
}

.logistics-ftl__chart-xaxis {
  position: relative;
  height: 20px;
  margin-top: 6px;
}

.logistics-ftl__chart-x-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, 0.48);
  text-transform: lowercase;
  white-space: nowrap;
}

.logistics-ftl__chart-x-label.is-start {
  transform: translateX(0);
}

.logistics-ftl__chart-x-label.is-end {
  transform: translateX(-100%);
}

.logistics-ftl__chart-grid {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.logistics-ftl__chart-grid.is-vertical {
  stroke: rgba(255, 255, 255, 0.1);
}

.logistics-ftl__chart-axis {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.logistics-ftl__chart-line {
  fill: none;
  stroke: #62d39d;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.logistics-ftl__chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
}

.logistics-ftl__insight {
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ftl-line);
}

.logistics-ftl__insight[hidden] {
  display: none;
}

.logistics-ftl__insight-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.logistics-ftl__insight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logistics-ftl__insight-badge.is-up {
  background: rgba(158, 243, 202, 0.14);
  color: var(--ftl-up);
}

.logistics-ftl__insight-badge.is-down {
  background: rgba(255, 159, 174, 0.14);
  color: var(--ftl-down);
}

.logistics-ftl__insight-badge.is-flat {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
}

.logistics-ftl__insight-badge.is-level-high {
  background: rgba(255, 214, 130, 0.14);
  color: #ffd98a;
}

.logistics-ftl__insight-badge.is-level-low {
  background: rgba(92, 174, 255, 0.14);
  color: #9ed0ff;
}

.logistics-ftl__insight-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
  color: #fff;
}

.logistics-ftl__insight-text {
  margin: 0;
  color: var(--ftl-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.logistics-ftl__insight-text + .logistics-ftl__insight-text {
  margin-top: 10px;
}

.logistics-ftl__insight-text strong {
  color: #fff;
  font-weight: 700;
}

.logistics-ftl__insight-legend {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
}

.logistics-ftl__insight-legend-title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.logistics-ftl__insight-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.logistics-ftl__insight-legend-item {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  line-height: 1.55;
}

.logistics-ftl__insight-legend-item strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.logistics-ftl__insight-hint {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  line-height: 1.65;
}

.logistics-ftl__foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ftl-line);
  color: var(--ftl-soft);
  font-size: 0.8rem;
  line-height: 1.65;
}

.logistics-ftl__foot a {
  color: var(--ftl-accent-2);
  text-decoration: none;
}

.logistics-ftl__foot a:hover {
  text-decoration: underline;
}

.logistics-ftl__status {
  margin-top: 10px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

.logistics-ftl__status[data-kind="error"] {
  color: #ff9fae;
}

.logistics-ftl.is-loading .logistics-ftl__index-value {
  opacity: 0.45;
}

@media (max-width: 991px) {
  .logistics-ftl__body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .logistics-ftl__metrics {
    grid-template-columns: 1fr;
  }

  .logistics-ftl__insight-legend-grid {
    grid-template-columns: 1fr;
  }

  .logistics-ftl__shell {
    border-radius: 24px;
    padding: 20px;
  }
}
