:root {
  --bg: #0b0f16;
  --bg-elevated: #10151f;
  --surface: #171c26;
  --surface-2: #1d2431;
  --sidebar-bg: #0f141d;
  --border: rgba(151, 169, 205, 0.18);
  --border-strong: rgba(216, 163, 58, 0.36);
  --text: #f7f9ff;
  --text-muted: #aab6cb;
  --text-soft: #73819a;
  --primary: #244e91;
  --primary-hover: #3567b7;
  --primary-light: #6fa2ff;
  --primary-wash: rgba(36, 78, 145, 0.24);
  --accent: #2563eb;
  --accent-muted: rgba(37, 99, 235, 0.18);
  --gold: #d8a33a;
  --gold-soft: rgba(216, 163, 58, 0.16);
  --danger: #f16d55;
  --danger-hover: #ff8a70;
  --success: #58c58a;
  --status-good: #58c58a;
  --status-warning: #d8a33a;
  --status-critical: #f16d55;
  /* Typography scale */
  --text-xs: 0.7rem;
  --text-sm: 0.8rem;
  --text-base: 0.9rem;
  --text-md: 0.95rem;
  --text-lg: 1.1rem;
  --text-xl: 1.5rem;
  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  /* Radius */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --radius-pill: 999px;
  --radius-circle: 50%;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.32), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.24);
  /* Z-index scale:
     1    — local stacking (pseudo-elements above decorative layers)
     20   — dropdown menus
     100  — modal overlays (standard)
     110  — form-modal (above standard modal)
     115  — curso-lote-modal (above form-modal)
     200  — auth-screen (login covers everything below)
     500  — map overlays (mapa-avisos, mapa-sticks — inside map context)
     1000 — fullscreen modal (fs-modal)
     1001 — fs-edit-panel (inside fs-modal)
  */
  --z-dropdown: 20;
  --z-modal: 100;
  --z-modal-form: 110;
  --z-modal-lote: 115;
  --z-auth: 200;
  --z-map-overlay: 500;
  --z-fs-modal: 1000;
  --z-fs-panel: 1001;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f16;
    --surface: #171c26;
    --sidebar-bg: #0f141d;
    --text: #f7f9ff;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f16;
  --surface: #171c26;
  --sidebar-bg: #0f141d;
  --text: #f7f9ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(36, 78, 145, 0.32), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(216, 163, 58, 0.12), transparent 28rem),
    linear-gradient(135deg, #0b0f16 0%, #10151f 54%, #0b0f16 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(151, 169, 205, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 169, 205, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 55% 18%, rgba(0, 0, 0, 0.9), transparent 70%);
}

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 264px;
  min-width: 264px;
  max-width: 264px;
  flex: 0 0 264px;
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(15, 20, 29, 0.98), rgba(11, 15, 22, 0.96)),
    radial-gradient(circle at 50% 0%, rgba(36, 78, 145, 0.24), transparent 18rem);
  border-right: 1px solid rgba(216, 163, 58, 0.18);
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 18px 0 46px rgba(0, 0, 0, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 6px 10px 26px;
  border-bottom: 1px solid rgba(151, 169, 205, 0.12);
  margin-bottom: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(216, 163, 58, 0.22), rgba(36, 78, 145, 0.5));
  border: 1px solid rgba(216, 163, 58, 0.42);
  box-shadow: 0 12px 28px rgba(36, 78, 145, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: var(--gold);
  font-size: var(--text-lg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: 0.08em;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: calc(100vh - 116px);
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  flex: 0 0 auto;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 13px;
  font-size: var(--text-base);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: var(--text-md);
  line-height: 1;
  border-radius: var(--radius-sm);
  background: rgba(151, 169, 205, 0.08);
  color: var(--text-muted);
}

.nav-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
  line-height: 1.3;
}

.nav-btn:hover {
  background: rgba(36, 78, 145, 0.16);
  border-color: rgba(151, 169, 205, 0.14);
  color: var(--text);
  transform: translateX(2px);
}

.nav-btn.active {
  background: linear-gradient(90deg, rgba(36, 78, 145, 0.46), rgba(36, 78, 145, 0.16));
  border-color: rgba(111, 162, 255, 0.24);
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--gold), 0 10px 24px rgba(36, 78, 145, 0.18);
}

.nav-btn.active .nav-icon {
  background: rgba(216, 163, 58, 0.16);
  color: var(--gold);
}

.logout-btn {
  margin-top: auto;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 32px 34px 64px;
  max-width: 1660px;
}

.view-title {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.view-subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: var(--text-md);
  line-height: 1.55;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.view-header .view-title {
  margin: 0;
}

.dashboard-view {
  position: relative;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
  min-height: 190px;
  margin-bottom: var(--space-xl);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(111, 162, 255, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(36, 78, 145, 0.78), rgba(23, 28, 38, 0.94) 58%, rgba(216, 163, 58, 0.18)),
    radial-gradient(circle at 78% 22%, rgba(216, 163, 58, 0.2), transparent 17rem);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.dashboard-hero::before,
.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dashboard-hero::before {
  background-image: linear-gradient(120deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 46px);
  opacity: 0.42;
}

.dashboard-hero::after {
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.08) 45%, transparent 70%);
  transform: translateX(-45%);
}

.dashboard-hero-content,
.dashboard-hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  color: var(--gold);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: var(--radius-circle);
  background: var(--gold);
  box-shadow: 0 0 18px rgba(216, 163, 58, 0.72);
}

.dashboard-hero-visual {
  flex: 0 0 190px;
  width: 190px;
  height: 150px;
  display: grid;
  place-items: center;
}

.radar-ring,
.radar-sweep {
  position: absolute;
  border-radius: var(--radius-circle);
}

.radar-ring {
  border: 1px solid rgba(216, 163, 58, 0.28);
  box-shadow: inset 0 0 24px rgba(36, 78, 145, 0.25);
}

.radar-ring-1 { width: 130px; height: 130px; }
.radar-ring-2 { width: 88px; height: 88px; border-color: rgba(111, 162, 255, 0.28); }

.radar-sweep {
  width: 130px;
  height: 130px;
  background: conic-gradient(from 230deg, rgba(216, 163, 58, 0.34), transparent 62deg);
  mask-image: radial-gradient(circle, transparent 0 12px, #000 13px);
  opacity: 0.72;
}

.drone-glyph {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: var(--radius);
  background: rgba(11, 15, 22, 0.6);
  border: 1px solid rgba(216, 163, 58, 0.42);
  color: var(--gold);
  font-size: var(--text-xl);
  box-shadow: 0 16px 34px rgba(0,0,0,0.28), 0 0 24px rgba(216, 163, 58, 0.16);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin: 30px 0 14px;
}

.section-description {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: var(--text-md);
}

.section-title.dashboard-section-title {
  margin-top: 56px;
  margin-bottom: 14px;
}

.dashboard-pagination {
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
}

.dashboard-pagination .pagination-info {
  min-width: 96px;
  text-align: center;
}

.dashboard-pagination button.secondary:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.dropdown-select {
  position: relative;
}

.dropdown-select-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 170px;
  max-width: 220px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-select-btn::after {
  content: "▾";
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex: 0 0 auto;
}

.dropdown-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: var(--z-dropdown);
  min-width: 200px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow);
  padding: 6px;
}

.dropdown-select-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 8px;
  font-size: var(--text-base);
  border-radius: var(--radius-xs);
  cursor: pointer;
  white-space: nowrap;
}

.dropdown-select-option:hover {
  background: rgba(127, 127, 127, 0.08);
}

.dropdown-select-option input {
  cursor: pointer;
}

.dropdown-select-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 2px;
}

.filter-search {
  flex: 1 1 200px;
  max-width: 260px;
  min-width: 120px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(11, 15, 22, 0.58);
  color: var(--text);
  font-size: var(--text-base);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.filter-status {
  padding: 10px 34px 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(11, 15, 22, 0.58);
  color: var(--text);
  font-size: var(--text-base);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 20px rgba(0, 0, 0, 0.16);
}

.filter-search:focus,
.filter-status:focus {
  outline: 2px solid rgba(216, 163, 58, 0.4);
  outline-offset: 2px;
  border-color: rgba(216, 163, 58, 0.55);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: var(--z-modal);
}

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

#form-modal {
  z-index: var(--z-modal-form);
}

#curso-lote-modal {
  z-index: var(--z-modal-lote);
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  width: min(760px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 22px 26px 26px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.modal-title {
  margin: 0;
  font-size: var(--text-lg);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}

.modal-close:hover {
  color: var(--text);
  background: rgba(127, 127, 127, 0.1);
}

.modal .form {
  align-items: stretch;
}

.modal .field {
  flex: 1 1 100%;
}

.modal .form-actions {
  flex: 1 1 100%;
  justify-content: flex-end;
  margin-top: 4px;
}

.modal-wide {
  width: min(1180px, calc(100vw - 48px));
}

.modal-xwide {
  width: min(1320px, calc(100vw - 48px));
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 8px;
  }

  .modal,
  .modal-wide,
  .modal-xwide {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 14px;
  }

  .modal-box {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 14px;
  }

  .sidebar {
    padding: 10px;
  }

  .brand {
    padding-bottom: 10px;
    margin-bottom: var(--space-sm);
  }

  .brand-name {
    font-size: var(--text-md);
  }

  .nav-btn {
    padding: 6px 10px;
    font-size: var(--text-sm);
  }

  .nav-icon {
    font-size: var(--text-base);
  }

  .content {
    padding: 14px 12px 32px;
  }

  .view-title {
    font-size: 1.2rem;
  }

  .filter-bar {
    gap: var(--space-xs);
  }

  .filter-search {
    padding: 8px 10px;
    font-size: var(--text-sm);
  }

  .filter-status {
    padding: 8px 10px;
    font-size: var(--text-sm);
  }

  .section-heading {
    margin-top: var(--space-lg);
    gap: var(--space-sm);
  }

  .section-title {
    font-size: var(--text-md);
  }

  .stat-grid {
    gap: var(--space-sm);
  }

  .stat-tile {
    padding: 12px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: var(--text-xs);
  }

  #table thead th,
  #table tbody td {
    padding: 6px 5px;
    font-size: var(--text-xs);
  }

  .drone-chip-list {
    max-width: 160px;
  }

  .drone-chip {
    padding: 3px 6px;
    font-size: var(--text-xs);
    max-width: 80px;
  }

  .detail-grid {
    font-size: var(--text-sm);
  }

  .dashboard-hero-content h1 {
    font-size: var(--text-lg);
  }

  .dashboard-hero-content p {
    font-size: var(--text-sm);
  }

  .table-wrap {
    overflow-x: auto;
  }
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  width: min(500px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 22px 26px 26px;
  box-sizing: border-box;
}

.modal-body {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.modal-body .field-wide {
  flex-basis: 100%;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding-top: 4px;
  border-top: 1px solid rgba(151, 169, 205, 0.08);
  margin-top: 4px;
}

.lote-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  width: 100%;
}

.lote-row .field {
  flex: 1 1 160px;
  min-width: 140px;
}

#sarpas-heatmap-mapa {
  height: 520px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 20px;
  margin: 0 0 22px;
}

.detail-grid div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  font-size: var(--text-md);
}

.detail-value div {
  line-height: 1.4;
}

/* Ficha do curso - evitar texto invadindo campos vizinhos */
#curso-details {
  word-break: break-word;
  overflow-wrap: break-word;
}

#curso-details .detail-value {
  word-break: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-width: 0;
}

.voo-mapa {
  height: 450px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.voo-player {
  margin-top: var(--space-md);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 0;
}

.player-controls button {
  min-width: 36px;
  height: 36px;
  font-size: var(--text-sm);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-slider {
  flex: 1;
  cursor: pointer;
  height: 6px;
}

.player-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  min-width: 90px;
  text-align: right;
}

.player-speed {
  font-size: var(--text-xs);
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.voo-mapa-layout {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  height: 500px;
}

.voo-mapa-layout .voo-mapa {
  flex: 1;
  height: 100%;
  min-width: 0;
}

.voo-mapa-holder {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
}

.voo-mapa-holder .voo-mapa {
  height: 100%;
}

/* Avisos do voo: pilha no topo esquerdo do mapa, um por linha */
.mapa-avisos {
  position: absolute;
  /* abaixo do controle de zoom (+/-) do Leaflet, que fica no topo esquerdo */
  top: 86px;
  left: 10px;
  max-width: min(360px, calc(100% - 140px));
  z-index: var(--z-map-overlay);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  pointer-events: none;
}

.mapa-avisos[hidden],
.mapa-sticks[hidden] {
  display: none;
}

.mapa-avisos .aviso-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  padding: 5px 9px;
  border-radius: var(--radius-xs);
  background: rgba(255, 243, 205, 0.95);
  border: 1px solid #ffc107;
  color: #856404;
  font-size: var(--text-xs);
  line-height: 1.3;
  animation: aviso-in 0.18s ease-out;
}

.mapa-avisos .aviso-item.saindo {
  animation: aviso-out 0.3s ease-in forwards;
}

.mapa-avisos .aviso-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapa-avisos .aviso-time {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
  margin-left: auto;
  flex-shrink: 0;
}

@keyframes aviso-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes aviso-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Sticks do radiocontrole: canto direito, abaixo do controle de camadas */
.mapa-sticks {
  position: absolute;
  top: 96px;
  right: 10px;
  z-index: var(--z-map-overlay);
  display: flex;
  gap: var(--space-sm);
  padding: 8px;
  border-radius: var(--radius-xs);
  background: rgba(20, 24, 33, 0.78);
  pointer-events: none;
}

.stick-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.stick-box {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-circle);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.stick-cross-h,
.stick-cross-v {
  position: absolute;
  background: rgba(255, 255, 255, 0.25);
}

.stick-cross-h {
  left: 4px;
  right: 4px;
  top: 50%;
  height: 1px;
}

.stick-cross-v {
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 1px;
}

.stick-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: var(--radius-circle);
  background: #00d4ff;
  box-shadow: 0 0 4px rgba(0, 212, 255, 0.8);
  top: 50%;
  left: 50%;
  transition: top 0.08s linear, left 0.08s linear;
}

.stick-label {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stick-label small {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.voo-telemetria-sidebar {
  width: 340px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Painel de valores do instante atual */
.telemetria-live {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.telemetria-live .tl-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  background: var(--surface);
  min-width: 0;
}

.telemetria-live .tl-wide {
  grid-column: 1 / -1;
}

.telemetria-live .tl-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.telemetria-live .tl-value {
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telemetria-live .tl-value.tl-alerta {
  color: var(--status-critical);
}

/* Cabeçalho fixo da linha do tempo — mesma grade das linhas */
.telemetria-head {
  display: grid;
  grid-template-columns: 42px 1fr 1fr 40px;
  gap: var(--space-xs);
  padding: 4px 8px;
  margin-bottom: 2px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.telemetria-head .th-bat {
  text-align: right;
}

/* Linha do tempo rolante */
.voo-telemetria-sidebar .voo-telemetria {
  flex: 1;
  margin-top: 0;
  max-height: none;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* rolagem controlada pelo player; esconde a barra sem travar o scroll */
  scrollbar-width: none;
}

.voo-telemetria-sidebar .voo-telemetria::-webkit-scrollbar {
  width: 0;
}

.voo-telemetria {
  margin-top: var(--space-md);
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.voo-telemetria .tl-row {
  display: grid;
  grid-template-columns: 42px 1fr 1fr 40px;
  align-items: baseline;
  gap: var(--space-xs);
  padding: 4px 8px;
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(151, 169, 205, 0.08);
  transition: background 0.12s linear, color 0.12s linear;
}

/* box-shadow em vez de border-left: mantém as colunas alinhadas
   com o cabeçalho (borda deslocaria o conteúdo em 2px) */
.voo-telemetria .tl-row.active {
  background: var(--accent-muted);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}

.voo-telemetria .tl-t {
  color: var(--text);
  opacity: 0.7;
}

.voo-telemetria .tl-row.active .tl-t {
  opacity: 1;
}

.voo-telemetria .tl-bat {
  text-align: right;
}

.voo-telemetria .tl-up {
  color: var(--success);
  margin-left: 3px;
  font-size: var(--text-xs);
}

.voo-telemetria .tl-down {
  color: var(--status-warning);
  margin-left: 3px;
  font-size: var(--text-xs);
}

/* Aviso ocupa a largura toda, na linha de baixo */
.voo-telemetria .tl-warn {
  grid-column: 1 / -1;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voo-telemetria .tl-spacer {
  pointer-events: none;
}

#voos-table th,
#voos-table td {
  white-space: nowrap;
}

#voos-table td:nth-child(4),
#voos-table td:nth-child(6) {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  max-width: 220px;
}

.log-dji-upload-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  margin: 12px 0;
}

.view-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 12px;
}

/* separa visualmente uma seção (ex: Avaliações) da tabela da seção anterior
   (ex: Cursos) na ficha do piloto, apenas com espaço */
.table-wrap + .view-section-header {
  margin-top: var(--space-3xl);
}

.view-section-header h3 {
  margin: 0;
  font-size: var(--text-md);
}

.curso-pilotos-grid-head,
.curso-pilotos-grid {
  display: grid;
  grid-template-columns: 56px minmax(126px, 0.9fr) minmax(260px, 2fr) 112px 112px minmax(190px, 1.2fr) 36px 36px;
  gap: var(--space-sm);
  width: max(100%, 940px);
  box-sizing: border-box;
}

.curso-pilotos-grid-head {
  margin-bottom: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.curso-pilotos-grid-wrap {
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  padding-bottom: 4px;
}

.curso-pilotos-readonly-cell {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(151, 169, 205, 0.12);
  border-radius: var(--radius-xs);
  background: rgba(11, 15, 22, 0.28);
  color: var(--text);
  font-size: var(--text-base);
  overflow-wrap: break-word;
}

.curso-pilotos-editable-cell {
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: rgba(11, 15, 22, 0.52);
  color: var(--text);
  font-size: var(--text-base);
  font-family: inherit;
  box-sizing: border-box;
  width: 100%;
}

.curso-pilotos-editable-cell:focus {
  outline: 2px solid rgba(216, 163, 58, 0.35);
  outline-offset: 1px;
  border-color: rgba(216, 163, 58, 0.5);
}

.curso-pilotos-editable-cell:disabled {
  background: rgba(11, 15, 22, 0.22);
  color: var(--text-muted);
  cursor: not-allowed;
}

.curso-pilotos-grid-remove-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.curso-pilotos-grid-head > div {
  white-space: nowrap;
}

.curso-pilotos-num {
  white-space: nowrap;
  text-align: center;
}

.curso-pilotos-nome {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.curso-pilotos-grid-edit-btn {
  width: 32px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--primary);
  cursor: pointer;
  font-size: var(--text-md);
  line-height: 1;
  justify-self: center;
  align-self: center;
}

.curso-pilotos-grid-edit-btn:hover {
  background: var(--primary);
  color: #fff;
}

.curso-pilotos-grid-edit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.curso-pilotos-grid-remove-btn {
  width: 32px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--danger);
  cursor: pointer;
  font-size: var(--text-md);
  line-height: 1;
  justify-self: center;
  align-self: center;
}

.curso-pilotos-grid-remove-btn:hover {
  background: var(--danger);
  color: #fff;
}

tbody tr.row-clickable {
  cursor: pointer;
}

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(29, 36, 49, 0.94), rgba(23, 28, 38, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.055), transparent 34%);
}

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

.panel-premium {
  border-color: rgba(216, 163, 58, 0.2);
}

.form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1 1 160px;
  min-width: 140px;
}

.field label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.field-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.cert-link {
  color: var(--primary);
  text-decoration: none;
}

.cert-link:hover {
  text-decoration: underline;
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: rgba(11, 15, 22, 0.52);
  color: var(--text);
  font-size: var(--text-base);
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(216, 163, 58, 0.35);
  outline-offset: 2px;
  border-color: rgba(216, 163, 58, 0.5);
}

.form-actions {
  display: flex;
  gap: var(--space-sm);
}

.field-wide {
  flex-basis: 100%;
}

.dual-list {
  display: flex;
  gap: var(--space-md);
}

.dual-list-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1 1 50%;
  min-width: 0;
}

.dual-list-header {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.dual-list-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  height: 160px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
}

.dual-list-item-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.dual-list-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font-size: var(--text-sm);
  cursor: pointer;
}

.dual-list-item:hover {
  background: var(--primary-wash);
  border-color: var(--border);
}

.dual-list-item-selected,
.dual-list-item-catalog-selected {
  background: var(--primary-wash);
  color: var(--primary);
}

.dual-list-delete {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(241, 109, 85, 0.26);
  border-radius: var(--radius-xs);
  background: rgba(241, 109, 85, 0.08);
  color: var(--danger);
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.dual-list-delete:hover {
  background: rgba(241, 109, 85, 0.16);
  border-color: rgba(241, 109, 85, 0.42);
}

.dual-list-empty {
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: 6px 8px;
}

button.primary,
button.secondary,
button.danger {
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: var(--text-base);
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  box-shadow: 0 12px 28px rgba(36, 78, 145, 0.28), inset 0 1px 0 rgba(255,255,255,0.16);
}
button.primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #4779ca);
  transform: translateY(-1px);
}

button.secondary {
  background: rgba(151, 169, 205, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
button.secondary:hover {
  color: var(--text);
  border-color: rgba(216, 163, 58, 0.32);
}

button.danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: var(--text-sm);
}
button.danger:hover {
  background: var(--danger);
  color: white;
}

button.link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 10px;
  font-size: var(--text-sm);
  border-radius: var(--radius-xs);
  cursor: pointer;
  margin-right: 6px;
}
button.link:hover {
  color: var(--text);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-lg);
}

#sarpas-resumo-grid {
  margin-bottom: 1.5rem;
}

.section-title {
  margin: 0;
  font-size: var(--text-lg);
  letter-spacing: -0.015em;
}

.expiry-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.expiry-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--radius-circle);
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.expiry-badge.ok { background: rgba(88, 197, 138, 0.13); color: var(--status-good); border-color: rgba(88, 197, 138, 0.24); }
.expiry-badge.warning { background: rgba(216, 163, 58, 0.14); color: var(--status-warning); border-color: rgba(216, 163, 58, 0.3); }
.expiry-badge.critical { background: rgba(241, 109, 85, 0.14); color: var(--status-critical); border-color: rgba(241, 109, 85, 0.28); }

.stat-tile {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(29, 36, 49, 0.96), rgba(18, 23, 33, 0.98)),
    radial-gradient(circle at 80% 0%, rgba(36, 78, 145, 0.34), transparent 12rem);
  border: 1px solid rgba(151, 169, 205, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-height: 164px;
  transform: translateZ(0);
}

.stat-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), transparent 30%);
}

.stat-tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(216, 163, 58, 0.72), transparent);
}

.stat-tile > * {
  position: relative;
  z-index: 1;
}

.stat-tile-clickable {
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s;
}

.stat-tile-clickable:hover {
  border-color: var(--primary);
}

.toggle-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.toggle-btn {
  padding: 6px 14px;
  font-size: var(--text-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.toggle-btn.active {
  background: var(--primary);
  color: #fff;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: rgba(36, 78, 145, 0.35);
  border: 1px solid rgba(216, 163, 58, 0.24);
  color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.stat-value {
  font-size: clamp(2.2rem, 4vw, 3.05rem);
  line-height: 1;
  font-weight: 800;
  margin: 18px 0 14px;
  letter-spacing: -0.06em;
  font-variant-numeric: proportional-nums;
  color: var(--text);
  text-shadow: 0 10px 28px rgba(36, 78, 145, 0.28);
}

.stat-description {
  margin: -6px 0 14px;
  color: var(--text-soft);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.stat-value-text {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: 4px 0 4px;
  line-height: 1.3;
  word-break: break-word;
}

.stat-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.stat-breakdown-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(151, 169, 205, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(11, 15, 22, 0.34);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-circle);
  flex: 0 0 auto;
}

.stat-dot.good { background: var(--status-good); }
.stat-dot.warning { background: var(--status-warning); }
.stat-dot.critical { background: var(--status-critical); }
.stat-dot.neutral { background: var(--text-muted); }

.stat-empty {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.table-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(151, 169, 205, 0.12);
  border-radius: var(--radius);
  background: rgba(11, 15, 22, 0.24);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

th, td {
  text-align: left;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(151, 169, 205, 0.12);
  white-space: normal;
  overflow-wrap: break-word;
}

th {
  color: var(--text-muted);
  background: rgba(36, 78, 145, 0.18);
  font-weight: 800;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr {
  transition: background 140ms ease, box-shadow 140ms ease;
}

tbody tr:hover {
  background: rgba(36, 78, 145, 0.16);
  box-shadow: inset 3px 0 0 rgba(216, 163, 58, 0.65);
}

.drone-badge-list {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drone-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1;
}

.drone-count-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#table td.drones-cell {
  width: 200px;
  max-width: 200px;
  vertical-align: middle;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 800;
  border: 1px solid transparent;
}

.badge.ok { background: rgba(88, 197, 138, 0.13); color: var(--success); border-color: rgba(88, 197, 138, 0.22); }
.badge.warn { background: rgba(241, 109, 85, 0.13); color: var(--danger); border-color: rgba(241, 109, 85, 0.22); }
.badge.neutral { background: rgba(151,169,205,0.12); color: var(--text-muted); border-color: rgba(151,169,205,0.16); }

.empty-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 0;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.pagination-per-page {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.pagination-per-page select {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.pagination-numbers button {
  min-width: 32px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: var(--text-sm);
}

.pagination-numbers button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination-numbers span {
  padding: 0 4px;
  color: var(--text-muted);
}

.pagination-info {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ---------- Operação Coordenada ---------- */

.badge.amber { background: rgba(184, 121, 15, 0.15); color: var(--status-warning); }

.op-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.op-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.op-card:hover {
  border-color: var(--primary);
}

.op-card-main {
  min-width: 0;
}

.op-card-nome {
  font-weight: 600;
  font-size: var(--text-md);
}

.op-card-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.op-card-side {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 0 0 auto;
}

.op-card-chevron {
  color: var(--text-muted);
  font-size: var(--text-lg);
}

.stepper {
  display: flex;
  align-items: center;
  margin: 4px 0 24px;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  flex: 0 0 auto;
  color: var(--text-muted);
}

.stepper-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-circle);
  border: 2px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: var(--text-sm);
}

.stepper-label {
  font-size: var(--text-xs);
  white-space: nowrap;
}

.stepper-step.active { color: var(--primary); }
.stepper-step.active .stepper-circle {
  border-color: var(--primary);
  color: var(--primary);
}

.stepper-step.done .stepper-circle {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.stepper-connector {
  flex: 1 1 auto;
  height: 2px;
  background: var(--border);
  margin: 0 6px 20px;
}

.op-step-actions {
  margin-top: var(--space-lg);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--primary);
}

.chip.chip-selected {
  background: var(--primary-wash);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.chip.chip-dashed {
  border-style: dashed;
  color: var(--text-muted);
}

.op-drone-bloco {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.op-drone-bloco-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.op-drone-bloco-header h3 {
  margin: 0;
  font-size: var(--text-md);
}

.op-drone-bloco-qtd {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.op-drone-bloco-qtd input {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--text);
}

.op-drone-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.op-drone-row input,
.op-drone-row select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-base);
}

.op-drones-total {
  color: var(--text-muted);
  font-size: var(--text-base);
}

.op-mapa-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: 10px;
  font-size: var(--text-base);
  color: var(--text-muted);
}

.op-mapa-busca {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1 1 280px;
  max-width: 420px;
}

.op-mapa-busca input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-base);
}

.op-mapa-busca button {
  flex: 0 0 auto;
}

.op-area-live strong {
  color: var(--text);
}

.op-mapa-full {
  width: 100%;
  height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.op-mapa-desenho-grande {
  height: calc(100vh - 260px);
  min-height: 480px;
}

.quadrante-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quadrante-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-xs);
  transition: background-color 150ms ease;
}

.quadrante-row:last-child {
  border-bottom: none;
}

.quadrante-row--interativa {
  cursor: pointer;
}

.quadrante-row--ativo {
  background: var(--primary-wash);
}

.quadrante-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-circle);
  flex: 0 0 auto;
}

.quadrante-info {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-base);
}

.quadrante-coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--text-sm);
  color: var(--text-muted);
  flex: 0 0 auto;
}

.quadrante-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  flex: 0 0 auto;
  white-space: nowrap;
}

button.quadrante-export-btn {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  line-height: 1;
  min-height: 30px;
}

button.quadrante-export-btn.mbtiles {
  color: #f4c76c;
  border-color: rgba(216, 163, 58, 0.36);
  background: linear-gradient(135deg, rgba(36, 78, 145, 0.18), rgba(216, 163, 58, 0.10));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

button.quadrante-export-btn.mbtiles:hover {
  color: #ffe3a3;
  border-color: rgba(216, 163, 58, 0.58);
  background: linear-gradient(135deg, rgba(36, 78, 145, 0.26), rgba(216, 163, 58, 0.16));
}

@media (max-width: 680px) {
  .quadrante-row {
    gap: var(--space-sm);
  }

  .quadrante-coords {
    display: none;
  }

  button.quadrante-export-btn {
    padding: 6px 8px;
    font-size: var(--text-xs);
  }

  .fs-modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .fs-modal-title {
    font-size: 1.2rem;
  }

  .fs-modal-close {
    align-self: flex-end;
  }

  .fs-stepper {
    flex-wrap: wrap;
  }

  .fs-stepper-connector {
    display: none;
  }

  .fs-sidebar-content {
    padding: 16px;
  }

  .fs-step-panel {
    padding: 16px;
  }

  .fs-divisao-controls {
    padding: 8px;
  }
}

.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
  z-index: var(--z-auth);
}

.auth-screen[hidden] {
  display: none;
}

/* reforca via classe setada por um script inline no <head> (roda antes do
   body ser desenhado) -- o painel principal e a tela de login nunca devem
   aparecer, nem por uma fracao de segundo, na pagina de definir senha */
html.is-definir-senha #app-root,
html.is-definir-senha #login-screen {
  display: none !important;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 360px;
  padding: 24px 24px 28px;
}

.auth-card .brand {
  justify-content: center;
  padding: 0 0 20px;
}

/* .form/.field por padrao sao pensados pra linha (varios campos lado a
   lado, ex: telas de cadastro) -- no cartao estreito de login/definir
   senha isso fazia os 2 campos de senha ficarem espremidos lado a lado
   em vez de empilhados */
.auth-card .form {
  flex-direction: column;
  align-items: stretch;
}

.auth-card .field {
  flex: none;
  width: 100%;
}

.auth-card .form-actions {
  flex-direction: column;
}

.auth-card .form-actions button {
  width: 100%;
}

.auth-error {
  color: var(--danger);
  font-size: var(--text-sm);
  margin: 0 0 12px;
}

.link-box {
  display: flex;
  gap: var(--space-sm);
}

.link-box input {
  flex: 1;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-base);
  font-weight: 400;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: var(--radius-xs);
  font-size: var(--text-sm);
  box-shadow: var(--shadow);
}

.toast.error {
  background: var(--danger);
  color: white;
}

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

  .sidebar {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
    height: auto;
    padding: 14px;
    border-right: none;
    border-bottom: 1px solid rgba(216, 163, 58, 0.18);
  }

  .brand {
    margin-bottom: var(--space-md);
    padding-bottom: 14px;
  }

  .side-nav {
    min-height: 0;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-btn {
    width: auto;
    min-width: max-content;
    white-space: nowrap;
  }

  .logout-btn {
    margin-top: 0;
    margin-left: auto;
  }

  .content {
    padding: 24px 18px 48px;
  }
}

@media (max-width: 900px) {
  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
  }

  .dashboard-hero-visual {
    position: absolute;
    right: -28px;
    bottom: -24px;
    opacity: 0.42;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    margin-top: var(--space-2xl);
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-status,
  .filter-search,
  .dropdown-select,
  .dropdown-select-btn {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .stat-tile {
    padding: 14px 16px;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .modal.modal-wide,
  .modal.modal-xwide {
    max-width: 96vw;
    margin: 2vh auto;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #table {
    font-size: var(--text-sm);
  }

  #table thead th,
  #table tbody td {
    padding: 8px 6px;
    white-space: nowrap;
  }

  .panel-premium {
    padding: 14px 12px;
  }

  .pagination-bar {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
  }

  .pagination-controls {
    justify-content: space-between;
  }

  /* Fullscreen modal no 900px */
  .fs-modal-container {
    flex-direction: column;
  }

  .fs-sidebar {
    width: 100%;
    height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 40vh;
  }

  .fs-main {
    flex: 1;
  }

  .fs-edit-panel {
    position: fixed;
    right: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    max-height: 50vh;
  }
}

/* ========== Fullscreen Modal - Operação Coordenada (2 Etapas) ========== */

.fs-modal {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  z-index: var(--z-fs-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fs-modal[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

.fs-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  gap: var(--space-lg);
}

.fs-modal-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.fs-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-xl);
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fs-modal-close:hover {
  color: var(--text);
}

.fs-modal-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.fs-sidebar {
  width: 430px;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
}

.fs-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.fs-sidebar-actions {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

.fs-main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.fs-step-panel {
  display: none;
  flex: 1;
  overflow: auto;
  padding: 24px;
}

.fs-step-panel[data-active="true"] {
  display: flex;
  flex-direction: column;
}

/* Stepper - simplificado para 2 etapas */
.fs-stepper {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
}

.fs-stepper-step {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.fs-stepper-step.active {
  color: var(--primary);
  background: var(--primary-wash);
}

.fs-stepper-step.done {
  color: var(--success);
}

.fs-stepper-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-circle);
  border: 2px solid currentColor;
  font-size: var(--text-xs);
  font-weight: 600;
}

.fs-stepper-step.done .fs-stepper-circle {
  background: var(--success);
  color: var(--bg);
  border-color: var(--success);
}

.fs-stepper-step.active .fs-stepper-circle {
  background: var(--primary);
  color: var(--text);
  border-color: var(--primary);
}

.fs-stepper-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
}

/* Formulário base */
.fs-form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.fs-form-field label {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
}

.fs-form-field input,
.fs-form-field select,
.fs-form-field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-md);
  font-family: inherit;
}

.fs-form-field input:focus,
.fs-form-field select:focus,
.fs-form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-wash);
}

/* Barra de busca do mapa */
.fs-map-search-row {
  display: flex;
  gap: var(--space-xs);
}

.fs-map-search-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-base);
}

.fs-map-search-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-wash);
}

.fs-map-search-row button {
  padding: 8px 14px;
  flex-shrink: 0;
}

/* Etapa 1 - Divisão de quadrantes */
.fs-divisao-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: 16px 0;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius-xs);
}

.fs-radio-group {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.fs-radio-group label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
  margin: 0;
  font-weight: normal;
}

.fs-radio-group input[type="number"] {
  width: 80px;
  padding: 6px 8px;
  font-size: var(--text-base);
}

/* FS Modal inline-styles → classes */
.fs-step-panel h2 {
  margin: 0 0 16px;
}

.fs-step-panel h3 {
  margin: 0 0 12px;
  font-size: var(--text-md);
}

.fs-step-panel h4 {
  margin: 0 0 8px;
  font-size: var(--text-base);
}

#fs-area-info {
  margin-top: var(--space-lg);
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius-xs);
  display: none;
}

#fs-divisao-options {
  margin-top: var(--space-lg);
  display: none;
}

.fs-radio-group input[type="number"] {
  margin-left: 8px;
}

#fs-divisao-quantidade {
  width: 60px;
}

#fs-divisao-metragem {
  width: 100px;
}

#fs-gerar-btn,
#fs-limpar-poligono,
#fs-add-ponto-btn,
#fs-download-all-kml,
#fs-download-all-mbtiles {
  width: 100%;
}

#fs-gerar-btn,
#fs-limpar-poligono {
  margin-top: var(--space-md);
}

#fs-limpar-poligono {
  display: none;
}

#fs-quadrantes-resultado {
  margin: 8px 0;
  font-size: var(--text-base);
  color: var(--success);
  display: none;
}

#fs-busca-mapa-status {
  margin: 4px 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  min-height: 1rem;
}

.fs-toggle-labels {
  margin-bottom: var(--space-lg);
}

.fs-toggle-labels label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.fs-quadrantes-list,
.fs-pontos-list {
  margin-bottom: var(--space-lg);
}

.fs-quadrantes-list ul,
.fs-pontos-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#fs-add-ponto-btn {
  margin-top: 8px;
}

.fs-downloads {
  margin-bottom: var(--space-lg);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

#fs-download-all-kml {
  margin-bottom: 6px;
}

#fs-btn-anterior,
#fs-btn-salvar {
  display: none;
}

#fs-main-placeholder {
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.fs-placeholder-content {
  text-align: center;
  color: var(--text-soft);
}

.fs-placeholder-content .fs-placeholder-icon {
  font-size: 3rem;
  margin: 0;
}

.fs-placeholder-content .fs-placeholder-text {
  font-size: var(--text-md);
  margin: 8px 0 0;
}

.fs-map {
  height: 100%;
  border-radius: var(--radius-xs);
}

.fs-edit-panel[data-visible="false"] {
  display: none;
}

/* Botões — unified (herda de button.primary/secondary acima) */
.primary:not(button) {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: none;
  border-radius: var(--radius);
  color: white;
  cursor: pointer;
  font-weight: 700;
  font-size: var(--text-base);
  box-shadow: 0 12px 28px rgba(36, 78, 145, 0.28), inset 0 1px 0 rgba(255,255,255,0.16);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary:not(button):hover {
  background: linear-gradient(135deg, var(--primary-hover), #4779ca);
  transform: translateY(-1px);
}

.secondary:not(button) {
  padding: 10px 16px;
  background: rgba(151, 169, 205, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 700;
  font-size: var(--text-base);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.secondary:not(button):hover {
  color: var(--text);
  border-color: rgba(216, 163, 58, 0.32);
}

/* Mapa */
.fs-map {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xs);
}

.fs-map-area-info {
  font-size: var(--text-base);
  color: var(--text-muted);
}

.fs-map-area-info strong {
  color: var(--text);
  font-weight: 600;
}

/* Etapa 2 - Quadrantes e Pontos */
.fs-toggle-labels {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.fs-toggle-labels label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  margin: 0;
  font-size: var(--text-md);
}

.fs-quadrantes-list,
.fs-pontos-list {
  margin-bottom: var(--space-lg);
}

.fs-quadrantes-list h4,
.fs-pontos-list h4,
.fs-downloads h4 {
  margin: 0 0 8px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-muted);
}

#fs-quadrantes-ul,
#fs-pontos-ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.fs-quadrante-item,
.fs-ponto-item {
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--radius-xs);
  border-left: 4px solid var(--primary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: var(--text-base);
}

.fs-quadrante-item:hover,
.fs-ponto-item:hover {
  background: var(--surface-2);
}

.fs-quadrante-item.selected,
.fs-ponto-item.selected {
  background: var(--primary-wash);
  border-left-color: var(--primary-light);
}

.fs-downloads {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.fs-downloads button {
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 12px;
  font-size: var(--text-base);
}

/* Painel de edição flutuante */
.fs-edit-panel {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 300px;
  max-height: 400px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  z-index: var(--z-fs-panel);
  overflow-y: auto;
}

.fs-edit-panel[data-visible="false"] {
  display: none;
}

.fs-edit-panel h3 {
  margin: 0 0 12px;
  font-size: var(--text-md);
  color: var(--text);
}

.fs-edit-panel .fs-form-field {
  margin-bottom: var(--space-md);
}

.fs-edit-panel-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.fs-edit-panel-actions button {
  flex: 1;
  padding: 8px;
  font-size: var(--text-sm);
}

/* Label do quadrante no mapa */
.quadrante-label-icon {
  background: transparent;
  border: none;
}

.quadrante-label-icon span {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  display: inline-block;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: #1f2328;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s;
}

/* Leaflet layer control - tema escuro */
.leaflet-control-layers {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xs) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  color: var(--text) !important;
  padding: 8px !important;
  max-height: 70vh;
  overflow-y: auto;
}

.leaflet-control-layers-expanded {
  padding: 10px 12px !important;
}

.leaflet-control-layers-list {
  color: var(--text) !important;
}

.leaflet-control-layers-base label,
.leaflet-control-layers-overlays label {
  color: var(--text) !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 0 !important;
  font-size: var(--text-sm) !important;
}

.leaflet-control-layers-separator {
  border-top: 1px solid var(--border) !important;
  margin: 6px 0 !important;
}

.leaflet-control-layers input[type="checkbox"] {
  cursor: pointer;
}

.leaflet-control-layers-selector {
  margin-right: 6px !important;
}

/* Scrollbar do control de camadas */
.leaflet-control-layers::-webkit-scrollbar {
  width: 6px;
}

.leaflet-control-layers::-webkit-scrollbar-track {
  background: var(--surface);
}

.leaflet-control-layers::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-xs);
}

/* Marker de ponto - nome tooltip */
.ponto-marker-icon {
  background: transparent !important;
  border: none !important;
}

/* Tooltip permanente do ponto */
.ponto-tooltip {
  background: var(--bg-elevated) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xs) !important;
  padding: 2px 6px !important;
  font-size: var(--text-xs) !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
  white-space: nowrap !important;
  opacity: 1;
  transition: opacity 0.3s;
}

.ponto-tooltip::before {
  border-top-color: var(--bg-elevated) !important;
}

/* Responsiveness */
@media (max-width: 1200px) {
  .fs-sidebar {
    width: 350px;
  }
}

/* Accessibility: respect reduced motion preference */
/* Drone player animation */
.drone-marker-icon {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

.drone-marker-icon svg {
  transition: transform 0.15s ease-out;
  transform-origin: center center;
}

.drone-marker-icon.playing {
  animation: drone-pulse 1.5s ease-in-out infinite;
}

@keyframes drone-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(100, 200, 255, 0.9));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
