:root {
  /* surfaces */
  --bg: #080c16;
  --surface: #111827;
  --surface-2: #161f31;
  --surface-3: #1c2740;
  --border: #22304b;
  --border-soft: #1a2438;

  /* text */
  --text: #f2f5fa;
  --text-dim: #94a3bb;
  --text-faint: #64748f;

  /* accent — freight teal */
  --accent: #35e0a1;
  --accent-2: #2bc9d4;
  --accent-dim: #1f9e73;
  --accent-ink: #05261a;
  --accent-glow: rgba(53, 224, 161, 0.16);

  --amber: #f6b73c;
  --danger: #f87272;
  --danger-soft: rgba(248, 114, 114, 0.12);
  --success: #35e0a1;

  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;

  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.34);
  --shadow-btn: 0 12px 26px rgba(53, 224, 161, 0.22);
  --shadow-modal: 0 40px 90px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ambient light in the corners — keeps the dark from going flat */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 420px at 12% -8%, rgba(53, 224, 161, 0.09), transparent 70%),
    radial-gradient(720px 480px at 96% 4%, rgba(43, 201, 212, 0.08), transparent 72%),
    radial-gradient(900px 600px at 50% 108%, rgba(43, 108, 246, 0.06), transparent 70%);
  z-index: 0;
}

/* faint warehouse rack grid over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(to right, rgba(53,224,161,0.038) 0 1.5px, transparent 1.5px 116px),
    repeating-linear-gradient(to bottom, rgba(53,224,161,0.028) 0 1.5px, transparent 1.5px 74px);
  mask-image: radial-gradient(1100px 700px at 50% 42%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(1100px 700px at 50% 42%, #000 20%, transparent 78%);
}

/* ---------- Ambient warehouse scene ---------- */
.scene {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 380px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(to top, #000 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, #000 40%, transparent 100%);
}

.scene svg {
  width: 100%;
  height: 100%;
  display: block;
}

.scene g {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scene .far { opacity: 0.16; }
.scene .racks { opacity: 0.24; }
.scene .lane { opacity: 0.22; }
.scene .containers { opacity: 0.15; }
.scene .truck { opacity: 0.3; }
.scene .sky { opacity: 0.24; }
.scene .ground { opacity: 0.18; }
.scene .crane { opacity: 0.13; }
.scene .forklift { opacity: 0.26; }

.scene .ground .dashes { stroke-width: 3; opacity: 0.6; }

.scene .route {
  stroke-dasharray: 9 13;
  stroke-width: 1.8;
}

.scene .plane {
  fill: var(--accent);
  stroke: none;
  offset-path: path("M120 96 C 420 24, 900 40, 1500 118");
  offset-rotate: auto;
  animation: fly 34s linear infinite;
}

.scene .truck {
  animation: drive 46s linear infinite;
}

.scene .boxes {
  animation: roll 9s ease-in-out infinite alternate;
}

@keyframes fly {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}

@keyframes drive {
  from { transform: translateX(-280px); }
  to { transform: translateX(1640px); }
}

@keyframes roll {
  from { transform: translateX(0); }
  to { transform: translateX(26px); }
}

@media (prefers-reduced-motion: reduce) {
  .scene .plane, .scene .truck, .scene .boxes { animation: none; }
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 28px 90px;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 14px 30px rgba(53, 224, 161, 0.26);
}
.brand-mark svg {
  width: 29px;
  height: 29px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand:hover .brand-mark svg { transform: translateX(3px); }

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.eyebrow.accent { color: var(--accent); }

.brand-title {
  margin: 5px 0 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 10px 17px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(53, 224, 161, 0.15);
}

/* ---------- Nav ---------- */
.nav-pill {
  display: flex;
  gap: 6px;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 7px;
  margin-bottom: 26px;
  backdrop-filter: blur(8px);
}

.nav-item {
  flex: 1;
  padding: 13px 20px;
  background: none;
  border: none;
  border-radius: 13px;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-item:hover { color: var(--text-dim); }

.nav-item.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* ---------- Hero card ---------- */
.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(168deg, var(--surface-2), var(--surface) 62%);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 40px 40px 34px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-card);
}

.hero-glow {
  position: absolute;
  top: -140px;
  right: -100px;
  width: 420px;
  height: 340px;
  background: radial-gradient(circle at center, var(--accent-glow), transparent 66%);
  pointer-events: none;
}

.hero-art {
  position: absolute;
  right: 30px;
  top: 26px;
  width: 216px;
  height: 166px;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.16;
  pointer-events: none;
}

.hero-title {
  margin: 14px 0 0;
  font-size: 42px;
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-sub {
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 52ch;
}

.hero-actions { margin-top: 28px; }

/* keep hero copy above the decorative art */
.hero-card .eyebrow,
.hero-title,
.hero-sub,
.hero-actions,
.stat-strip { position: relative; z-index: 1; }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.stat { flex: 1; }

.stat-value {
  display: block;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  display: block;
  margin-top: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.stat-divider {
  width: 1px;
  height: 34px;
  background: var(--border);
  flex-shrink: 0;
}

/* ---------- Section label ---------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}

.section-label span {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #2c3d5f, transparent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  border-radius: 15px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.008em;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4ae7b4);
  color: var(--accent-ink);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:disabled {
  background: var(--surface-3);
  color: var(--text-faint);
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
}

.btn-block { width: 100%; }
.btn-lg { padding: 18px 26px; font-size: 15.5px; border-radius: 17px; }

.btn-ghost {
  background: var(--surface-3);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); background: #223052; }

.btn-soft {
  background: rgba(53, 224, 161, 0.1);
  color: var(--accent);
  border: 1px solid rgba(53, 224, 161, 0.24);
}
.btn-soft:hover { background: rgba(53, 224, 161, 0.16); }

.btn-sm { padding: 9px 15px; font-size: 13px; border-radius: 11px; }
.btn-sm svg { width: 15px; height: 15px; }

.btn-icon {
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-faint);
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.btn-icon svg { width: 15px; height: 15px; }
.btn-icon:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(248, 114, 114, 0.28);
}

/* ---------- Warehouse cards ---------- */
.warehouses-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.warehouse-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.warehouse-card:hover {
  border-color: var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.warehouse-card.expanded {
  border-color: rgba(53, 224, 161, 0.26);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32);
}

.warehouse-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  cursor: pointer;
  user-select: none;
}

.warehouse-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.warehouse-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(53, 224, 161, 0.1);
  border: 1px solid rgba(53, 224, 161, 0.2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.warehouse-icon svg { width: 21px; height: 21px; }

.warehouse-name-block { min-width: 0; }

.warehouse-name-block h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.018em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-meta {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-faint);
  font-weight: 500;
}

.warehouse-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chevron {
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  transition: transform 0.22s ease;
}
.warehouse-card.expanded .chevron { transform: rotate(180deg); color: var(--accent); }

.warehouse-body {
  display: none;
  padding: 4px 22px 22px;
}
.warehouse-card.expanded .warehouse-body { display: block; }

.warehouse-body-inner {
  border-top: 1px dashed var(--border);
  padding-top: 20px;
}

.couriers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.courier-card {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  padding: 16px 17px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.courier-card:hover { border-color: var(--border); transform: translateY(-1px); }

.courier-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.courier-name-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.courier-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.courier-icon svg {
  width: 17px;
  height: 17px;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* the little truck rolls forward when you hover its card */
.courier-card:hover .courier-icon svg { transform: translateX(3px); }
.courier-card:hover .courier-icon {
  border-color: rgba(53, 224, 161, 0.35);
  color: var(--accent);
}

.courier-name {
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.012em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-status {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  width: fit-content;
}

.pricing-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pricing-status.has-pricing {
  color: var(--accent);
  background: rgba(53, 224, 161, 0.1);
  border: 1px solid rgba(53, 224, 161, 0.22);
}
.pricing-status.has-pricing .dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(53, 224, 161, 0.16);
}

.pricing-status.no-pricing {
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
}
.pricing-status.no-pricing .dot { background: var(--text-faint); }

.courier-card-actions { display: flex; gap: 8px; }

.empty-couriers {
  color: var(--text-faint);
  font-size: 13.5px;
  padding: 2px 0 18px;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 66px 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
}

.empty-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 19px;
  background: rgba(53, 224, 161, 0.09);
  border: 1px solid rgba(53, 224, 161, 0.18);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-icon svg { width: 29px; height: 29px; }

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.empty-state p { margin: 0; font-size: 14px; color: var(--text-dim); }

/* ---------- Panel (calculator) ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 26px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
}

.panel-head-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(53, 224, 161, 0.1);
  border: 1px solid rgba(53, 224, 161, 0.2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.panel-head-icon svg { width: 22px; height: 22px; }

.panel-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.panel-head p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--text-faint);
}

/* ---------- Fields ---------- */
.field-group { margin-bottom: 30px; }

.group-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.field + .grid-2 { margin-top: 18px; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: -0.005em;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 13px;
  padding: 14px 15px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input::placeholder { color: var(--text-faint); font-weight: 400; }

input:focus, select:focus {
  border-color: var(--accent-dim);
  background: #060a12;
  box-shadow: 0 0 0 3.5px rgba(53, 224, 161, 0.13);
}

input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* custom select arrow */
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}
select:disabled { opacity: 0.45; cursor: not-allowed; }

/* input with unit suffix */
.input-suffix { position: relative; flex: 1; min-width: 0; }
.input-suffix input { padding-right: 44px; }
.input-suffix .suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-faint);
  pointer-events: none;
}

.dims-row { display: flex; align-items: center; gap: 8px; }
.dims-x { color: var(--text-faint); font-size: 13px; flex-shrink: 0; }

/* ---------- Product type chips ---------- */
.chip-select { display: flex; flex-wrap: wrap; gap: 9px; }

.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 13px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.type-chip svg { width: 17px; height: 17px; }
.type-chip:hover { border-color: #2c3d5f; color: var(--text); }

.type-chip.active {
  background: rgba(53, 224, 161, 0.11);
  border-color: rgba(53, 224, 161, 0.42);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(53, 224, 161, 0.08);
}

/* ---------- Courier badges ---------- */
.courier-card-tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

.btn-icon.subtle:hover {
  color: var(--accent);
  background: rgba(53, 224, 161, 0.1);
  border-color: rgba(53, 224, 161, 0.28);
}

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }

.type-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.vol-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(246, 183, 60, 0.11);
  border: 1px solid rgba(246, 183, 60, 0.3);
  color: var(--amber);
}

/* ---------- Checkbox row ---------- */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}
.check-row input { position: absolute; opacity: 0; width: 0; height: 0; }

.check-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: all 0.15s ease;
}
.check-row:hover .check-box { border-color: #2c3d5f; }

.check-row input:checked + .check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.check-row input:checked + .check-box::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border-right: 2.4px solid var(--accent-ink);
  border-bottom: 2.4px solid var(--accent-ink);
  transform: rotate(42deg);
}

.check-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.check-label em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-faint);
}

.volumetric-field { margin-top: 16px; }

/* ---------- Quote result ---------- */
.calc-result {
  margin-top: 24px;
  padding: 0;
  border-radius: var(--r-md);
  background: rgba(53, 224, 161, 0.06);
  border: 1px solid rgba(53, 224, 161, 0.26);
  overflow: hidden;
}

.calc-result.is-error {
  background: var(--danger-soft);
  border-color: rgba(248, 114, 114, 0.3);
}

.quote-error {
  padding: 18px 22px;
  font-size: 14px;
  line-height: 1.55;
  color: #fca5a5;
  font-weight: 600;
}

.quote-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 20px;
  border-bottom: 1px solid rgba(53, 224, 161, 0.18);
}

.quote-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.quote-price {
  margin-top: 8px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--text);
}

.quote-meta {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  line-height: 1.55;
}

.quote-rows { padding: 6px 24px 18px; }

.quote-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-soft);
  font-size: 13.5px;
}
.quote-row:last-child { border-bottom: none; }

.quote-row span:first-child {
  color: var(--text-faint);
  font-weight: 600;
  white-space: nowrap;
}
.quote-row span:last-child {
  color: var(--text-dim);
  text-align: right;
  font-weight: 500;
}

.quote-row.highlight span:last-child {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Modals ---------- */
.modal-overlay[hidden] { display: none; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.76);
  backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}

.modal {
  background: linear-gradient(170deg, var(--surface-2), var(--surface) 65%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px;
  width: 470px;
  max-width: 100%;
  box-shadow: var(--shadow-modal);
}

.modal-wide { width: 680px; max-height: 86vh; overflow-y: auto; }

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 26px;
}

.modal-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(53, 224, 161, 0.1);
  border: 1px solid rgba(53, 224, 161, 0.2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-icon svg { width: 22px; height: 22px; }

.modal-head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.024em;
}
.modal-head p {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-faint);
}
.modal-head code {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--accent);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 11px;
  margin-top: 26px;
}

/* ---------- Dropzone ---------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 34px 24px;
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
  text-align: center;
}
.dropzone:hover {
  border-color: rgba(53, 224, 161, 0.45);
  background: rgba(53, 224, 161, 0.035);
}
.dropzone input[type="file"] { display: none; }

.dropzone-icon { width: 30px; height: 30px; color: var(--accent); margin-bottom: 7px; }
.dropzone-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.dropzone-sub { font-size: 12.5px; color: var(--text-faint); }
.dropzone.has-file { border-color: rgba(53, 224, 161, 0.5); background: rgba(53, 224, 161, 0.05); }

/* ---------- Pricing preview ---------- */
.pricing-preview { margin-top: 20px; }

.preview-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 13px;
}

.dest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.dest-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(53, 224, 161, 0.09);
  border: 1px solid rgba(53, 224, 161, 0.24);
  color: var(--accent);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.dest-chip em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.65;
  font-size: 11px;
}

.dest-chip.skipped {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-soft);
  color: var(--text-faint);
}

.field-hint {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 500;
}

.preview-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  background: var(--bg);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.preview-table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  text-align: left;
  padding: 12px 14px;
  color: var(--text-faint);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.preview-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-weight: 500;
}
.preview-table tr:last-child td { border-bottom: none; }
.preview-table .more-row td { text-align: center; color: var(--text-faint); font-style: italic; }

.pricing-error {
  margin-top: 16px;
  background: var(--danger-soft);
  border: 1px solid rgba(248, 114, 114, 0.28);
  color: #fca5a5;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-modal);
  z-index: 300;
}
.toast.error {
  border-color: rgba(248, 114, 114, 0.45);
  color: #fca5a5;
}

/* ---------- Views ---------- */
.view { display: none; animation: fade 0.22s ease; }
.view.active { display: block; }

@keyframes fade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .page { padding: 26px 18px 70px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-card { padding: 30px 24px 26px; }
  .hero-title { font-size: 32px; }
  .hero-art { display: none; }
  .scene { height: 260px; opacity: 0.75; }
  .hero-card::after { display: none; }
  .panel { padding: 24px 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-strip { flex-wrap: wrap; gap: 20px; }
  .stat-divider { display: none; }
  .stat { flex: 0 0 45%; }
  .dims-row { flex-direction: column; align-items: stretch; }
  .dims-row .dims-x { display: none; }
  .modal { padding: 24px 20px; }
}
