:root {
  --bg: #091018;
  --bg-elevated: #0f1724;
  --bg-panel: rgba(17, 24, 39, 0.88);
  --bg-panel-strong: rgba(13, 19, 31, 0.96);
  --line: rgba(117, 154, 215, 0.16);
  --line-strong: rgba(98, 171, 255, 0.3);
  --line-active: rgba(73, 148, 255, 0.66);
  --text: #f6f9ff;
  --text-soft: #a4b4cc;
  --text-muted: #70839d;
  --accent: #2f89ff;
  --accent-strong: #52a9ff;
  --success: #29d18b;
  --warning: #f7b955;
  --danger: #ff6d7a;
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.28);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --transition: 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100%; }

/* ─── Scroll Fade-in Animations ─── */
.lp-fade-section {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lp-fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}
.lp-fade-section:nth-child(even) {
  transition-delay: 0.08s;
}

body {
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(47, 137, 255, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(41, 209, 139, 0.06), transparent 24%),
    linear-gradient(145deg, #060c13 0%, #0b1220 42%, #09131d 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 13px;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button { border: 0; }

/* ─── Wizard App Layout ─── */

.wizard-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ─── Wizard Header / Progress ─── */

.wizard-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: rgba(9, 16, 24, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  flex-wrap: wrap;
  flex-shrink: 0;
  position: relative;
  z-index: 10000;
}

.wizard-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.wizard-brand h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  line-height: 1.2;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(47, 137, 255, 0.22), rgba(47, 137, 255, 0.06)), rgba(15, 23, 36, 0.8);
  border: 1px solid rgba(82, 169, 255, 0.24);
  color: var(--accent-strong);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.eyebrow {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  line-height: 1.2;
}

/* ─── Progress Steps ─── */

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  position: relative;
  padding-bottom: 4px;
}

.wizard-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 999px;
  transition: width 300ms ease;
}

.wizard-step-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.wizard-step-btn:hover {
  background: rgba(47, 137, 255, 0.08);
  color: var(--text-soft);
}

.wizard-step-btn.active {
  background: rgba(47, 137, 255, 0.14);
  color: var(--text);
}

.wizard-step-btn.done {
  color: var(--success);
}

.wizard-step-btn.done .step-index {
  background: rgba(41, 209, 139, 0.18);
  color: var(--success);
}

.step-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(47, 137, 255, 0.12);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.wizard-step-btn.active .step-index {
  background: rgba(47, 137, 255, 0.28);
  color: #fff;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
}

.wizard-status-pills {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ─── Body: Panel + Map ─── */

.wizard-body {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.wizard-panel-col {
  width: 420px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(9, 16, 24, 0.92);
  height: 100%;
  overflow: hidden;
  transition: width var(--transition), padding var(--transition), opacity var(--transition);
}

.wizard-panel-col > * {
  min-width: 420px;
  transition: opacity var(--transition);
}

.wizard-body.sidebar-closed .wizard-panel-col {
  width: 0;
  border-right-color: transparent;
}

.wizard-body.sidebar-closed .wizard-panel-col > * {
  opacity: 0;
  pointer-events: none;
}

.wizard-step-header {
  padding: 12px 20px 0;
  flex-shrink: 0;
}

.step-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-step-header h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
}

.wizard-step-header .panel-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
  font-weight: 700;
  background: rgba(47, 137, 255, 0.12);
  padding: 2px 6px;
  border-radius: 6px;
}

.step-desc {
  color: var(--text-soft);
  font-size: 11px;
  margin-top: 4px;
}

/* ─── Wizard Panels ─── */

.wizard-panels {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  height: 100%;
}

.wizard-panels::-webkit-scrollbar { width: 5px; }
.wizard-panels::-webkit-scrollbar-thumb { background: rgba(98, 171, 255, 0.18); border-radius: 999px; }

.wizard-panel {
  display: none;
}

.wizard-panel.visible {
  display: block;
  animation: fadeIn var(--transition);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Wizard Nav ─── */

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(9, 16, 24, 0.96);
  flex-shrink: 0;
}

.wizard-nav-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ─── Map Column ─── */

.wizard-map-col {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.map-sidebar-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: -14px;
  z-index: 1000;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all var(--transition);
}

.map-sidebar-toggle:hover {
  background: var(--bg-panel-strong);
  color: var(--text);
  transform: translateY(-50%) scale(1.1);
  border-color: var(--line-active);
}

.wizard-body.sidebar-closed .map-sidebar-toggle {
  left: 16px;
}

.map-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: calc(100vh - 120px);
  overflow: hidden;
}

/* ─── Shared Components ─── */

.header-pill, .mini-pill, .panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 34, 0.88);
  color: var(--text-soft);
  font-size: 10px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.dot-success {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(41, 209, 139, 0.12);
}

.dot-info {
  background: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(82, 169, 255, 0.12);
}

/* ─── Panel Body ─── */

.panel-body {
  display: grid;
  gap: 14px;
}

.panel-text {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

/* ─── Info & Calc Grids ─── */

.info-grid, .calc-grid, .health-grid {
  display: grid;
  gap: 8px;
}

.info-grid, .calc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card, .calc-card, .health-card, .hero-stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 28, 45, 0.86);
  padding: 12px;
}

.info-label, .calc-card > span, .health-card > span, .hero-stat > span, .overlay-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.hero-stat > span > span:first-child,
.calc-card > span > span:first-child,
.health-card > span > span:first-child {
  flex: 1;
  word-break: break-word;
  min-width: 0;
}

.info-card strong, .calc-card strong, .health-card strong, .hero-stat strong, .overlay-card strong, .map-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--text);
}

.info-card small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.health-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.note-card {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(82, 169, 255, 0.2);
  background: rgba(47, 137, 255, 0.06);
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.5;
}

/* ─── Forms ─── */

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field, .field-stack {
  display: grid;
  gap: 5px;
}

.form-field > span, .field-label {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 34, 0.92);
  color: var(--text);
  font-size: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:hover, select:hover { border-color: var(--line-strong); }

input:focus, select:focus {
  outline: none;
  border-color: var(--line-active);
  box-shadow: 0 0 0 3px rgba(47, 137, 255, 0.14);
}

input:disabled, select:disabled { opacity: 0.58; cursor: not-allowed; }

/* ─── File Upload ─── */

.area-methods-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(12, 20, 34, 0.4);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.area-method-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.method-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.method-desc {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.5;
  padding-left: 24px;
}

.method-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 4px 0;
}

.method-divider::before,
.method-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.method-divider span {
  padding: 0 10px;
}

.file-upload-wrapper {
  display: grid;
  gap: 5px;
}

.file-upload-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-input-hidden {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.file-upload-btn {
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
}

.file-upload-name {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* ─── Segmented Control ─── */

.segmented-control {
  display: flex;
  padding: 4px;
  gap: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 34, 0.9);
}

.segment-option {
  position: relative;
  flex: 1;
  cursor: pointer;
}

.segment-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.segment-option > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  border-radius: 9px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.segment-option input:checked + span {
  background: linear-gradient(180deg, rgba(47, 137, 255, 0.22), rgba(47, 137, 255, 0.1));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(82, 169, 255, 0.28);
}


.pro-badge-inline {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f7b955, #ff9500);
  color: #1a1a1a;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 1px 4px rgba(247, 185, 85, 0.3);
}

/* ─── Buttons ─── */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.48; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #1f76ff, #4ca8ff);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(34, 118, 255, 0.24);
}

.btn-secondary {
  background: rgba(17, 27, 44, 0.88);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px dashed var(--line);
}

.btn-danger {
  background: rgba(255, 109, 122, 0.1);
  color: #ffd8dd;
  border: 1px solid rgba(255, 109, 122, 0.24);
}

.btn-takeoff {
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #fff;
  border: 1px solid rgba(74, 222, 128, 0.65);
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6), 0 6px 18px rgba(21, 128, 61, 0.4);
  animation: takeoff-halo 2s ease-in-out infinite;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-takeoff:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.22), 0 10px 24px rgba(21, 128, 61, 0.5);
  animation: none;
}
@keyframes takeoff-halo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6), 0 6px 18px rgba(21, 128, 61, 0.4); }
  50%      { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0), 0 6px 18px rgba(21, 128, 61, 0.4); }
}

.takeoff-cta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(21, 128, 61, 0.08));
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-left: 3px solid #22c55e;
  border-radius: 8px;
}
.takeoff-cta-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  background: #22c55e;
  color: #06210f;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  white-space: nowrap;
}
.takeoff-cta-text {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}


.check-stack {
  display: grid;
  gap: 8px;
  align-content: center;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 11px;
}

.toggle-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* ─── Warnings ─── */

.warning-stack { display: grid; gap: 8px; }

.warning-banner {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(17, 28, 45, 0.76);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

.warning-banner.warning-success { border-color: rgba(41, 209, 139, 0.28); color: #d8ffec; }
.warning-banner.warning-warning { border-color: rgba(247, 185, 85, 0.34); color: #ffe1b1; }
.warning-banner.warning-danger { border-color: rgba(255, 109, 122, 0.32); color: #ffd4d9; }
.warning-banner.warning-neutral { border-color: var(--line); }

/* ─── Map ─── */

#map {
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 400px;
  background: #0a111a;
}

/* ─── Map Overlays ─── */

.map-overlay {
  position: absolute;
  left: 60px;
  right: 60px;
  z-index: 450;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.map-overlay.top {
  top: 12px;
  justify-content: flex-end;
}
.map-overlay.bottom { bottom: 12px; }
.map-overlay.bottom.mission-review-overlay {
  left: 24px;
  right: 24px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.overlay-card, .map-summary {
  pointer-events: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(9, 16, 24, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}

.overlay-card {
  min-width: 120px;
  padding: 8px 12px;
}

.map-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  padding: 10px 14px;
}

.map-elevation-profile-slot {
  pointer-events: auto;
  flex: 1 1 500px;
  min-width: 460px;
  max-width: 620px;
}

.map-elevation-profile-slot .elev-profile-card {
  margin: 0;
  background: rgba(9, 16, 24, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}

.map-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.map-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 250px;
  padding-right: 4px;
}

.map-summary-list::-webkit-scrollbar {
  width: 4px;
}

.map-summary-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.map-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.map-summary-item .item-id {
  font-weight: bold;
  color: var(--primary);
  min-width: 36px;
  margin-right: 12px;
  flex-shrink: 0;
}

.map-summary-item .item-coords {
  flex: 1;
  color: var(--text-muted);
  font-family: monospace;
  padding-left: 4px;
}

.map-summary-item .item-alt {
  font-weight: bold;
  color: var(--text);
  text-align: right;
  width: 60px;
}

.map-empty-state {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 430;
  width: min(320px, calc(100% - 24px));
  padding: 24px 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(98, 171, 255, 0.18);
  background: rgba(9, 16, 24, 0.78);
  backdrop-filter: blur(18px);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.btn-close-empty {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background 0.2s;
}

.btn-close-empty:hover {
  background: rgba(255, 255, 255, 0.2);
}

.map-empty-state h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
}

.map-empty-state p {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.map-empty-state.is-hidden { display: none !important; }

/* ─── Toast ─── */

.toast {
  position: fixed;
  top: 88px;
  left: 50%;
  z-index: 9999;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(9, 16, 24, 0.96);
  color: var(--text);
  font-size: 12px;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -160px);
  transition: transform 260ms ease;
}

.toast.show { transform: translate(-50%, 0); }
.toast.success { border-color: rgba(41, 209, 139, 0.3); }
.toast.error { border-color: rgba(255, 109, 122, 0.34); }
.toast.warning { border-color: rgba(247, 185, 85, 0.36); }
.toast .toast-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  margin-left: 8px;
  opacity: 0.7;
}
.toast .toast-close:hover { opacity: 1; }

/* ─── Tooltip ─── */

.tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  cursor: help;
  vertical-align: middle;
  flex-shrink: 0;
  z-index: 500;
}

.tooltip-container:hover {
  z-index: 99999;
}

.tooltip-icon {
  display: var(--tooltip-display, none);
  align-items: center;
  justify-content: center;
  width: 14px;
  min-width: 14px;
  max-width: 14px;
  height: 14px;
  min-height: 14px;
  max-height: 14px;
  line-height: 1;
  border-radius: 50%;
  background: rgba(98, 171, 255, 0.15);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: bold;
  border: 1px solid rgba(82, 169, 255, 0.25);
  transition: all var(--transition);
  flex: 0 0 14px;
  box-sizing: border-box;
}

.tooltip-container:hover .tooltip-icon {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tooltip-text {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 220px;
  padding: 8px 12px;
  background: rgba(15, 23, 36, 0.98);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  text-transform: none; /* Previne herança de uppercase */
  letter-spacing: normal; /* Previne herança de espaçamento */
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 99999;
  pointer-events: none;
}

.tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--line) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ─── Leaflet Overrides ─── */

.leaflet-control-zoom,
.leaflet-draw-toolbar,
.leaflet-bar {
  border: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.leaflet-control-zoom a,
.leaflet-draw-toolbar a,
.leaflet-bar a {
  border-radius: 10px !important;
  background: rgba(9, 16, 24, 0.88) !important;
  border: 1px solid rgba(98, 171, 255, 0.18) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-md) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-image: none !important;
}

/* Força os icones do Leaflet a herdarem a cor do texto e voltarem a aparecer */
.leaflet-control-zoom-in, .leaflet-control-zoom-out {
  font-size: 16px !important;
  font-weight: normal !important;
}

.leaflet-draw-toolbar a.leaflet-draw-draw-polygon::before,
.leaflet-draw-toolbar a.leaflet-draw-edit-edit::before,
.leaflet-draw-toolbar a.leaflet-draw-edit-remove::before {
  content: '';
  display: block;
  width: 30px;
  height: 30px;
  background-image: url('https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/images/spritesheet-2x.png');
  background-size: 300px 30px;
  background-repeat: no-repeat;
  filter: invert(1) brightness(2);
}

.leaflet-draw-toolbar a.leaflet-draw-draw-polygon::before {
  background-position: -30px 0px;
}

.leaflet-draw-toolbar a.leaflet-draw-edit-edit::before {
  background-position: -150px 0px;
}

.leaflet-draw-toolbar a.leaflet-draw-edit-remove::before {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'%3E%3C/polyline%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'%3E%3C/path%3E%3Cline x1='10' y1='11' x2='10' y2='17'%3E%3C/line%3E%3Cline x1='14' y1='11' x2='14' y2='17'%3E%3C/line%3E%3C/svg%3E");
  background-size: 16px 16px;
  background-position: center;
}

.leaflet-draw-toolbar a:hover,
.leaflet-control-zoom a:hover,
.leaflet-bar a:hover {
  background: rgba(24, 38, 60, 0.92) !important;
}

/* ─── Status chips ─── */

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 34, 0.88);
  color: var(--text-soft);
  font-size: 10px;
}

.status-chip.is-success { border-color: rgba(41, 209, 139, 0.35); color: #c8ffe3; }
.status-chip.is-warning { border-color: rgba(247, 185, 85, 0.4); color: #ffe2b2; }
.status-chip.is-danger { border-color: rgba(255, 109, 122, 0.38); color: #ffd1d7; }

/* ─── Responsive ─── */

@media (max-width: 1100px) {
  .wizard-body {
    flex-direction: column;
  }

  .wizard-panel-col {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 50vh;
    transition: max-height var(--transition), padding var(--transition), opacity var(--transition);
  }

  .wizard-panel-col > * {
    min-width: 100%;
  }

  .wizard-body.sidebar-closed .wizard-panel-col {
    max-height: 0;
    border-bottom-color: transparent;
    width: 100%;
  }

  .map-panel {
    min-height: 50vh;
  }

  .map-sidebar-toggle {
    top: -14px;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
  }

  .map-sidebar-toggle:hover {
    transform: translateX(-50%) rotate(90deg) scale(1.1);
  }

  .wizard-body.sidebar-closed .map-sidebar-toggle {
    top: 16px;
    left: 50%;
  }

  .wizard-step-btn .step-label {
    display: none;
  }

  .map-overlay.bottom.mission-review-overlay {
    left: 12px;
    right: 12px;
  }

  .map-elevation-profile-slot {
    min-width: 360px;
    max-width: min(56vw, 560px);
  }
}

@media (max-width: 760px) {
  .wizard-header {
    padding: 10px 12px;
    gap: 10px;
  }

  .wizard-status-pills { display: none; }

  .wizard-progress {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-right: 4px;
  }
  .wizard-progress::-webkit-scrollbar { display: none; }
  .wizard-step-btn { padding: 8px 10px; }

  .wizard-panels { padding: 12px; }
  .wizard-nav { padding: 10px 12px; }

  .health-grid,
  .hero-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .map-overlay, .map-summary {
    flex-direction: column;
  }

  .map-overlay.bottom.mission-review-overlay {
    align-items: stretch;
  }

  .map-elevation-profile-slot,
  .map-summary {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .map-elevation-profile-slot .elev-profile-chart svg {
    height: 190px;
  }

  .button-row { flex-direction: column; }
}

.tooltip-container.tooltip-left .tooltip-text { left: auto; right: -8px; transform: translateY(4px); }
.tooltip-container.tooltip-left:hover .tooltip-text { transform: translateY(0); }
.tooltip-container.tooltip-left .tooltip-text::after { left: auto; right: 11px; transform: none; }

/* ─── Auth ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.auth-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-brand h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  color: var(--text);
  margin-top: 12px;
}
.auth-brand p {
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-top: 4px;
}
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-google:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--accent);
}
.btn-apple {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}
.btn-apple:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--text);
}
.missions-list { margin-top: 12px; }
.mission-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--bg-elevated); border: 1px solid var(--line);
  margin-bottom: 6px; cursor: pointer; transition: var(--transition);
}
.mission-item:hover { border-color: var(--accent); }
.mission-item-info { flex: 1; min-width: 0; }
.mission-item-name { font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mission-item-date { font-size: 0.75rem; color: var(--text-muted); }
.mission-item-actions { display: flex; gap: 6px; }
.mission-item-actions button { padding: 4px 8px; font-size: 0.75rem; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.auth-field span {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 600;
}
.auth-field input {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 137, 255, 0.15);
}
.auth-submit {
  width: 100%;
  margin-top: 8px;
}
.auth-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.auth-message {
  color: var(--success);
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.auth-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.82rem;
  cursor: pointer;
  margin-top: 12px;
  display: block;
  text-align: center;
}
.auth-link:hover { text-decoration: underline; }
.auth-toggle {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.82rem;
  margin-top: 16px;
}
.auth-toggle button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}
.auth-toggle button:hover { text-decoration: underline; }

/* Plan badge */
.plan-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-starter {
  background: rgba(255,255,255,0.08);
  color: var(--text-soft);
  border: 1px solid var(--line);
}
.plan-pro {
  background: linear-gradient(135deg, var(--accent), #1a6dff);
  color: #fff;
}
.user-name {
  color: var(--text-soft);
  font-size: 0.82rem;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-sm {
  padding: 5px 12px !important;
  font-size: 0.75rem !important;
}

/* ─── Upgrade Modal ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  padding: 24px;
}
.modal-content {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 520px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}
.upgrade-header {
  text-align: center;
  margin-bottom: 24px;
}
.upgrade-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text);
  font-size: 1.3rem;
}
.upgrade-header p {
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-top: 8px;
}
.upgrade-trigger {
  color: var(--accent) !important;
  margin-bottom: 4px !important;
}
.upgrade-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.upgrade-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px;
  padding: 10px 14px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
}
.upgrade-row:last-child { border-bottom: none; }
.upgrade-header-row {
  background: rgba(255,255,255,0.03);
  font-weight: 700;
  color: var(--text);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); font-weight: 700; }
.upgrade-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.price-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.price-best {
  border-color: var(--accent);
  background: rgba(47, 137, 255, 0.06);
  position: relative;
}
.price-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
}
.price-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 4px;
}
.price-value {
  display: block;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
}
.price-value span {
  font-size: 0.75rem;
  color: var(--text-soft);
}
.price-card small {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.upgrade-cta {
  width: 100%;
}

/* ─── Landing Page ─── */
.lp {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
}

/* Nav */
.lp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 16, 24, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.lp-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.lp-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.lp-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.lp-nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
.lp-nav-links a:hover { color: var(--text); }
.btn-cta-sm {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-cta-sm:hover {
  background: var(--accent-strong);
  box-shadow: 0 0 20px rgba(47, 137, 255, 0.3);
}

/* Hero */
.lp-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 120px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 90vh;
}
.lp-badge-new {
  display: inline-block;
  background: rgba(47, 137, 255, 0.12);
  border: 1px solid rgba(47, 137, 255, 0.25);
  color: var(--accent-strong);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.lp-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 20px;
}
.text-gradient {
  background: linear-gradient(135deg, #ff6a2f, #ff9f43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lp-hero-sub {
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 480px;
}
.lp-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-cta {
  background: linear-gradient(135deg, #ff6a2f, #ff8f2f);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(255, 106, 47, 0.3);
}
.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 106, 47, 0.45);
}
.btn-cta-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--line-strong);
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-cta-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}
.lp-hero-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 14px;
}
.lp-hero-visual {
  display: flex;
  justify-content: center;
}
.lp-hero-mockup {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}
.mockup-terrain { margin-bottom: 16px; }
.terrain-svg { width: 100%; height: auto; }
.mockup-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.mockup-label {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
}
.mockup-label.danger {
  background: rgba(255, 109, 122, 0.12);
  color: var(--danger);
}
.mockup-label.success {
  background: rgba(41, 209, 139, 0.12);
  color: var(--success);
}

/* Trust */
.lp-trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 24px;
  text-align: center;
}
.lp-trust-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.lp-trust-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-width: 900px;
  margin: 0 auto;
}
.lp-trust-item {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 20px;
}

/* Pain vs Solution */
.lp-pain {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
}
.lp-pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.lp-pain-card {
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
}
.lp-pain-card.pain {
  background: rgba(255, 109, 122, 0.04);
  border-color: rgba(255, 109, 122, 0.2);
}
.lp-pain-card.solution {
  background: rgba(41, 209, 139, 0.04);
  border-color: rgba(41, 209, 139, 0.2);
}
.pain-icon, .solution-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.pain-icon {
  background: rgba(255, 109, 122, 0.15);
  color: var(--danger);
}
.solution-icon {
  background: rgba(41, 209, 139, 0.15);
  color: var(--success);
}
.lp-pain-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.lp-pain-card p {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.lp-pain-card ul {
  list-style: none;
  padding: 0;
}
.lp-pain-card ul li {
  color: var(--text-soft);
  font-size: 0.85rem;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}
.lp-pain-card.pain ul li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: var(--danger);
  font-size: 0.75rem;
}
.lp-pain-card.solution ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-size: 0.75rem;
}

/* Warranty Highlight */
.lp-warranty {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
.lp-warranty-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px 36px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(41, 209, 139, 0.08), rgba(41, 209, 139, 0.02));
  border: 1px solid rgba(41, 209, 139, 0.25);
}
.lp-warranty-icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(41, 209, 139, 0.12);
  color: var(--success);
}
.lp-warranty-text h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--success);
}
.lp-warranty-text p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
}
@media (max-width: 640px) {
  .lp-warranty-inner {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
}


.lp-steps {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
}
.lp-section-header {
  text-align: center;
  margin-bottom: 48px;
}
.lp-kicker {
  display: inline-block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.lp-section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}
.lp-section-header p {
  color: var(--text-soft);
  font-size: 0.95rem;
  max-width: 520px;
  margin: 0 auto;
}
.lp-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.lp-step-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  position: relative;
  transition: all 0.3s;
}
.lp-step-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.lp-step-icon {
  color: var(--accent);
  margin-bottom: 16px;
}
.lp-step-num {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255,255,255,0.04);
}
.lp-step-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.lp-step-card p {
  color: var(--text-soft);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Pricing */
.lp-pricing {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
}
.lp-pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
}
.lp-plan-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
}
.lp-plan-pro {
  border-color: var(--accent);
  background: linear-gradient(145deg, rgba(47, 137, 255, 0.06), var(--bg-elevated));
  box-shadow: 0 0 40px rgba(47, 137, 255, 0.08);
}
.lp-plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6a2f, #ff8f2f);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.lp-plan-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.lp-plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.price-old {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.6;
  margin-right: 4px;
}

.price-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}
.price-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.price-annual {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
}
.price-annual span {
  color: var(--success);
  font-weight: 600;
}
.lp-plan-desc {
  color: var(--text-soft);
  font-size: 0.85rem;
  margin: 12px 0 20px;
}
.lp-plan-features {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}
.lp-plan-features li {
  padding: 8px 0 8px 24px;
  font-size: 0.85rem;
  position: relative;
  color: var(--text-soft);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.lp-plan-features li:last-child { border-bottom: none; }
.lp-plan-features li.included::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}
.lp-plan-features li.blocked::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}
.lp-plan-features li.blocked { color: var(--text-muted); }
.lp-plan-features li.highlight {
  color: var(--accent-strong);
  font-weight: 600;
}
.btn-plan {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-plan:hover {
  border-color: var(--accent);
  background: rgba(47, 137, 255, 0.06);
}
.btn-plan-pro {
  background: linear-gradient(135deg, #ff6a2f, #ff8f2f);
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 106, 47, 0.3);
}
.btn-plan-pro:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 106, 47, 0.45);
  background: linear-gradient(135deg, #ff7a3f, #ff9f43);
}

/* FAQ */
.lp-faq {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px;
}
.lp-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp-faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  cursor: pointer;
  transition: all 0.2s;
}
.lp-faq-item:hover { border-color: var(--line-strong); }
.lp-faq-item.open { border-color: var(--accent); }
.lp-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.92rem;
}
.faq-chevron {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}
.lp-faq-a {
  color: var(--text-soft);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Final CTA */
.lp-final-cta {
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(180deg, transparent, rgba(255, 106, 47, 0.04));
}
.lp-final-cta h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 12px;
}
.lp-final-cta p {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

/* Footer */
.lp-footer {
  border-top: 1px solid var(--line);
  padding: 32px 24px;
}
.lp-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}
.lp-footer p {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Responsive */
@media (max-width: 768px) {
  .lp-hero {
    grid-template-columns: 1fr;
    padding-top: 100px;
    min-height: auto;
  }
  .lp-hero-visual { order: -1; }
  .lp-pain-grid {
    grid-template-columns: 1fr;
  }
  .lp-steps-grid {
    grid-template-columns: 1fr;
  }
  .lp-pricing-grid {
    grid-template-columns: 1fr;
  }
  .lp-nav-links a:not(.btn-cta-sm) { display: none; }
  .lp-footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ─── User Dropdown Menu ─── */
.user-dropdown-wrapper {
  position: relative;
  z-index: 10000;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: border-color var(--transition);
}
.user-dropdown-trigger:hover {
  border-color: var(--line-strong);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-dropdown-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: var(--bg-panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  padding: 6px 0;
  backdrop-filter: blur(20px);
}

.user-dropdown-info {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-dropdown-email {
  font-size: 12px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}
.user-dropdown-item:hover {
  background: rgba(255,255,255,0.06);
}

.user-dropdown-logout {
  color: var(--danger);
}
.user-dropdown-logout:hover {
  background: rgba(255, 109, 122, 0.1);
}

/* === Landing Page v2 — Reformulação completa === */
.lp-hero h1.headline-mega {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.lp-hero-mockup-img {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 0;
  width: 100%;
  max-width: 680px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,106,47,0.08);
  position: relative;
}
.lp-hero-mockup-img img {
  display: block;
  width: 100%;
  height: auto;
}
.lp-hero-mockup-img .mockup-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  pointer-events: none;
}
.lp-hero-mockup-img .mockup-pill {
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lp-hero-mockup-img .mockup-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #29d18b;
  box-shadow: 0 0 8px #29d18b;
}
.lp-hero-mockup-img .mockup-pill.orange .dot { background: #ff6a2f; box-shadow: 0 0 8px #ff6a2f; }

/* Visual demo section */
.lp-visual-demo {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
}
.lp-visual-demo-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.lp-visual-demo-card .demo-text h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  margin-bottom: 16px;
  line-height: 1.2;
}
.lp-visual-demo-card .demo-text p {
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 16px;
}
.lp-visual-demo-card .demo-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lp-visual-demo-card .demo-bullets li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--text-soft);
  font-size: 0.95rem;
}
.lp-visual-demo-card .demo-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #29d18b;
  font-weight: 700;
}

/* Audience grid */
.lp-audience {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
}
.lp-audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.lp-audience-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: all 0.25s;
}
.lp-audience-card:hover {
  border-color: rgba(255,106,47,0.4);
  transform: translateY(-4px);
}
.lp-audience-card .audience-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: block;
}
.lp-audience-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text);
}
.lp-audience-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Benefits */
.lp-benefits {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px;
}
.lp-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.lp-benefit-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.lp-benefit-card .benefit-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6a2f, #ff9f43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  line-height: 1;
  margin-bottom: 12px;
}
.lp-benefit-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.lp-benefit-card p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

/* Stats / social proof */
.lp-stats {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 24px;
}
.lp-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  background: linear-gradient(135deg, rgba(255,106,47,0.08), rgba(41,209,139,0.05));
  border: 1px solid rgba(255,106,47,0.15);
  border-radius: var(--radius-xl);
  padding: 40px;
}
.lp-stat {
  text-align: center;
}
.lp-stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  background: linear-gradient(135deg, #ff6a2f, #ff9f43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}
.lp-stat-label {
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .lp-visual-demo-card {
    grid-template-columns: 1fr;
    padding: 28px;
    gap: 28px;
  }
  .lp-stats-row { padding: 28px; }
}

/* ─── Altimetry diagram ─── */
.altimetry-diagram {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.altimetry-diagram img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: #fff;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.altimetry-diagram img:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.altimetry-diagram figcaption {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
}

/* ─── Lightbox overlay ─── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 24px;
  overflow: hidden;
}
.lightbox-overlay.is-open { opacity: 1; }
.lightbox-overlay img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease;
  cursor: grab;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  text-align: center;
}

/* Auto-calc emphasis banner (Drone step) */
.auto-calc-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
}
.auto-calc-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}
.auto-calc-banner strong { color: var(--accent-strong); }
.auto-calc-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0f1a;
  margin-top: 2px;
}
.calc-auto-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  margin-left: 4px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--accent) 18%, transparent);
  color: var(--accent-strong);
  vertical-align: middle;
}

/* ─── Landing: Zero cálculo manual ─── */
.lp-auto-calc {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.lp-auto-calc-card {
  background: linear-gradient(135deg, rgba(255, 106, 47, 0.10), rgba(255, 106, 47, 0.03));
  border: 1px solid rgba(255, 106, 47, 0.35);
  border-left: 4px solid #ff6a2f;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 20px 60px -30px rgba(255, 106, 47, 0.4);
}
.lp-auto-calc-text h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0.75rem 0 1.25rem;
  color: #fff;
}
.lp-auto-calc-text > p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 760px;
}
.lp-auto-calc-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem 1.5rem;
}
.lp-auto-calc-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.98rem;
  font-weight: 500;
}
.lp-auto-tag {
  display: inline-block;
  background: #ff6a2f;
  color: #0a0a0a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.lp-auto-calc-foot {
  color: #ff6a2f;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}
@media (max-width: 720px) {
  .lp-auto-calc { padding: 3rem 1rem; }
  .lp-auto-calc-card { padding: 1.75rem 1.25rem; }
}

/* ===== Elevation Profile Card (Step 5) ===== */
.elev-profile-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.elev-profile-empty { opacity: 0.7; }
.elev-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.elev-profile-header strong {
  font-size: 13px;
  display: block;
  letter-spacing: 0.01em;
}
.elev-profile-header small {
  font-size: 11px;
  opacity: 0.65;
  display: block;
  margin-top: 2px;
}
.elev-profile-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: inherit;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.elev-profile-toggle:hover { background: rgba(255,255,255,0.05); }
.elev-profile-chart {
  position: relative;
  width: 100%;
  background: rgba(0,0,0,0.18);
  border-radius: 8px;
  padding: 4px;
}
.elev-profile-chart svg {
  display: block;
  width: 100%;
  height: 240px;
  cursor: crosshair;
}
.elev-profile-tooltip {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 15, 18, 0.92);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 11px;
  line-height: 1.5;
  pointer-events: none;
  min-width: 110px;
}
.elev-profile-tooltip b { color: #fff; }
.elev-profile-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  opacity: 0.8;
}
.elev-profile-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.elev-profile-legend i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.elev-profile-legend .lg-flight { background: #ff8a00; }
.elev-profile-legend .lg-terrain { background: #22c55e; }
.elev-profile-legend .lg-agl { background: rgba(255,138,0,0.35); height: 8px; }
.elev-profile-legend .lg-danger { background: #ef4444; }
.elev-profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px;
  margin-top: 2px;
}
.elev-profile-stats > div {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 9px;
}
.elev-profile-stats span {
  display: block;
  font-size: 10px;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.elev-profile-stats strong {
  font-size: 13px;
}

/* Courtesy access badges */
.plan-badge.plan-courtesy {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1a1a;
  margin-left: 6px;
  font-weight: 700;
}
.courtesy-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1a1a;
  margin-left: 6px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ─── Altimetry progress modal ─── */
.altimetry-progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 180ms ease;
  padding: 20px;
}
.altimetry-progress-overlay.is-open { opacity: 1; }
.altimetry-progress-card {
  width: 100%;
  max-width: 420px;
  background: #14181f;
  border: 1px solid rgba(255, 138, 0, 0.25);
  border-radius: 14px;
  padding: 28px 26px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  color: #f3f4f6;
}
.altimetry-progress-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 138, 0, 0.18);
  border-top-color: #ff8a00;
  margin: 0 auto 14px;
  animation: altimetry-spin 0.9s linear infinite;
}
@keyframes altimetry-spin { to { transform: rotate(360deg); } }
.altimetry-progress-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #fff;
}
.altimetry-progress-detail {
  font-size: 13px;
  margin: 0 0 14px;
  color: rgba(243, 244, 246, 0.78);
  min-height: 1.2em;
}
.altimetry-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 10px;
}
.altimetry-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8a00, #ffb347);
  border-radius: 999px;
  transition: width 220ms ease;
}
.altimetry-progress-count {
  font-size: 12px;
  margin: 0 0 8px;
  color: rgba(243, 244, 246, 0.7);
  font-variant-numeric: tabular-nums;
}
.altimetry-progress-hint {
  display: block;
  font-size: 11px;
  color: rgba(243, 244, 246, 0.5);
}

.map-summary-toggle {
  background: transparent;
  border: 1px solid var(--line, rgba(255,255,255,0.12));
  color: inherit;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.map-summary-toggle:hover { background: rgba(255,255,255,0.08); }
.map-summary.is-collapsed .map-summary-list { display: none; }

.elev-profile-legend .lg-warn { background: #f59e0b; border-radius: 50%; width: 8px; height: 8px; }
.elev-profile-legend .lg-danger { background: #ef4444; border-radius: 50%; width: 8px; height: 8px; }
.elev-profile-alerts { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.elev-profile-alert { font-size: 12px; padding: 8px 10px; border-radius: 8px; border: 1px solid; line-height: 1.35; }
.elev-profile-alert.is-critical { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.55); color: #fecaca; font-weight: 600; }
.elev-profile-alert.is-warn { background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.45); color: #fde68a; }

/* Map badges for takeoff / start / end */
.map-badge-wrap { background: transparent !important; border: none !important; }
.map-badge {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--badge-bg, #2563eb);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.25);
  transition: transform 0.12s ease;
}
.map-badge:hover { transform: scale(1.08); }
.map-badge-takeoff { box-shadow: 0 2px 8px rgba(37,99,235,0.55), 0 0 0 1px rgba(0,0,0,0.25); }

/* Always-yellow health card (e.g. takeoff distance warning card) */
.health-card.health-card-warning {
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.health-card.health-card-warning strong { color: #fde68a; }
.health-card.health-card-warning #takeoffDistanceWarn { color: #fbbf24; }

/* Map scale control — dark theme */
.leaflet-control-scale-line {
  background: rgba(15, 23, 42, 0.78) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-top: none !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  padding: 2px 6px !important;
  backdrop-filter: blur(4px);
}

.leaflet-control.ruler-control { position: relative; }

/* Map labels for ruler and takeoff distance — clean tooltip styling */
.leaflet-tooltip.ruler-seg-label,
.leaflet-tooltip.ruler-total-label,
.leaflet-tooltip.takeoff-dist-label {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.leaflet-tooltip.ruler-seg-label { color: #fde68a; border-color: rgba(250, 204, 21, 0.5); }
.leaflet-tooltip.ruler-total-label {
  background: #facc15; color: #0a0a0a; border-color: #facc15;
  font-size: 12px; font-weight: 800; padding: 4px 10px;
}
.leaflet-tooltip.takeoff-dist-label { color: #93c5fd; border-color: rgba(96, 165, 250, 0.55); }
.leaflet-tooltip.takeoff-dist-label.takeoff-dist-warn { color: #fcd34d; border-color: rgba(245, 158, 11, 0.65); }
.leaflet-tooltip.ruler-seg-label::before,
.leaflet-tooltip.ruler-total-label::before,
.leaflet-tooltip.takeoff-dist-label::before { display: none; }

.flight-arrow-wrap { background: transparent !important; border: none !important; }
.flight-arrow { width:18px; height:18px; display:flex; align-items:center; justify-content:center; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
