/* ==========================================================================
   MinhaLinha V1 • Estética de Vanguarda: Kinetic Transit Architecture
   Fontes: Space Grotesk (Headlines/Display) & JetBrains Mono (Telemetria)
   ========================================================================== */

:root {
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Tema Claro (Stark Studio Light) */
  --bg-primary: #F7F9FC;
  --bg-surface: rgba(255, 255, 255, 0.92);
  --bg-surface-elevated: #FFFFFF;
  --bg-surface-secondary: #EEF2F6;
  --text-primary: #0A0D15;
  --text-secondary: #4E5766;
  --text-muted: #8490A2;
  --border-subtle: rgba(10, 13, 21, 0.08);
  --border-strong: rgba(10, 13, 21, 0.16);
  --accent-volt: #00875A;
  --accent-volt-bg: rgba(0, 135, 90, 0.10);
  --accent-glow: rgba(0, 135, 90, 0.25);
  --status-normal: #00875A;
  --status-reduced: #D97706;
  --status-halted: #DC2626;
  --dock-bg: rgba(255, 255, 255, 0.90);
  --dock-border: rgba(10, 13, 21, 0.10);
  --card-shadow: 0 10px 30px -8px rgba(10, 13, 21, 0.06), 0 1px 3px rgba(10, 13, 21, 0.04);
  --modal-overlay: rgba(10, 13, 21, 0.45);
}

[data-theme="dark"] {
  /* Tema Escuro (Obsidian Stealth) */
  --bg-primary: #06080D;
  --bg-surface: rgba(16, 21, 33, 0.85);
  --bg-surface-elevated: #111726;
  --bg-surface-secondary: #0D121F;
  --text-primary: #F3F6FA;
  --text-secondary: #9BA8BA;
  --text-muted: #596578;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent-volt: #CCFF00;
  --accent-volt-bg: rgba(204, 255, 0, 0.12);
  --accent-glow: rgba(204, 255, 0, 0.35);
  --status-normal: #00F59B;
  --status-reduced: #FF9F1C;
  --status-halted: #FF334B;
  --dock-bg: rgba(12, 16, 25, 0.92);
  --dock-border: rgba(255, 255, 255, 0.10);
  --card-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
  --modal-overlay: rgba(0, 0, 0, 0.75);
}

/* Reset Global e Normalização */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 110px;
}

/* Linha Laser de Telemetria */
.sync-laser-beam {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, transparent, var(--accent-volt), #00F59B);
  z-index: 9999;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
}
.sync-laser-beam.scanning {
  width: 100%;
  opacity: 1;
}

/* Shell do App */
.v1-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   Top Telemetry Bar
   ========================================================================== */
.v1-top-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: var(--dock-bg);
  border-bottom: 1px solid var(--border-subtle);
  margin: 0 -16px 20px -16px;
  padding: 10px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.top-bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.v1-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--text-primary);
  color: var(--bg-primary);
  letter-spacing: 0.05em;
}

.live-indicator-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: -2px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-normal);
  box-shadow: 0 0 8px var(--status-normal);
  animation: pulseBeacon 2s infinite ease-in-out;
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

.live-caption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-round-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.icon-round-btn:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.icon-round-btn:active {
  transform: scale(0.92);
}

.weather-chip {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  transition: transform 0.15s ease;
}

.weather-chip:active {
  transform: scale(0.94);
}

/* ==========================================================================
   Banner Noturno Último Trem
   ========================================================================== */
.night-train-banner {
  background: linear-gradient(135deg, #1C1938 0%, #0D0B1C 100%);
  border: 1px solid rgba(138, 92, 246, 0.3);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #EDE9FE;
  box-shadow: 0 8px 24px rgba(109, 40, 217, 0.15);
}

.night-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.night-icon { font-size: 1.5rem; }
.night-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.night-text span {
  font-size: 0.8rem;
  color: #C4B5FD;
}

/* ==========================================================================
   Hero Section: Hero Pulse da Cidade
   ========================================================================== */
.hero-pulse-section {
  padding: 16px 0 20px 0;
}

.telemetry-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.telemetry-badge {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.telemetry-timestamp {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.headline-primary {
  color: var(--text-primary);
}

.headline-accent {
  color: var(--status-normal);
  transition: color 0.3s ease;
}

/* Filtros em Pílulas */
.filter-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.filter-pills-row::-webkit-scrollbar { display: none; }

.filter-pill {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-pill.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  transform: scale(1.02);
}

.filter-pill:active {
  transform: scale(0.95);
}

/* ==========================================================================
   RADAR CCO: Mapa Esquemático Completo (SVG Oficial)
   ========================================================================== */
.radar-card-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.radar-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-secondary);
}

.radar-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radar-icon { font-size: 1rem; }
.radar-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

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

.radar-action-btn {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.radar-action-btn:active {
  transform: scale(0.94);
}

.radar-viewport-wrap {
  position: relative;
  width: 100%;
  background-color: #070B14 !important;
  overflow: hidden;
}

/* Mapa com Scroll Touch e Navegação Plena */
.map-section {
  background-color: #070B14 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  width: 100%;
  height: 420px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  color-scheme: dark;
}

.map-wrapper {
  position: relative;
  min-width: 1100px;
  width: 100%;
  transition: min-width 0.12s ease, width 0.12s ease;
}

.schematic-svg {
  width: 100%;
  height: auto;
  min-height: 400px;
  display: block;
}

/* Controles Flutuantes de Zoom */
.map-zoom-controls {
  position: absolute;
  top: 12px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 35;
  pointer-events: auto;
}

.map-zoom-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  transition: transform 0.12s ease, background 0.15s ease;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

.map-zoom-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38BDF8;
}

.map-zoom-btn:active {
  transform: scale(0.92);
}

.btn-zoom-reset {
  color: #94A3B8;
  font-size: 0.72rem;
}

.map-line-path {
  cursor: default;
  pointer-events: none;
  transition: stroke-width 0.25s ease, opacity 0.25s ease;
}

.line-highlighted {
  stroke-width: 12px !important;
  opacity: 1 !important;
}

.line-dimmed {
  opacity: 0.15 !important;
}

/* Rótulos e Bolinhas das Estações */
.station-node-group {
  cursor: pointer;
  pointer-events: all;
}

.station-node-dot {
  cursor: pointer;
  pointer-events: all;
  transition: r 0.15s ease, fill 0.15s ease;
}

.station-node-group:hover .station-node-dot {
  r: 6.5px;
  fill: #38BDF8;
}

.station-node-group:hover .station-text-50,
.station-node-group:hover .station-major-50 {
  fill: #38BDF8 !important;
}

.station-text-50 {
  font-size: 8.5px;
  font-weight: 600;
  fill: #F1F5F9 !important;
  pointer-events: all !important;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 4px rgba(0, 0, 0, 0.9) !important;
  user-select: none;
  transition: fill 0.15s ease;
}

.station-label-up {
  text-anchor: start !important;
}

.station-label-down {
  text-anchor: end !important;
}

.station-major-50 {
  font-size: 10px;
  font-weight: 800;
  fill: #FFFFFF !important;
  pointer-events: all !important;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 1), 0 0 6px rgba(0, 0, 0, 0.95) !important;
  transition: fill 0.15s ease;
}

/* Beacons Pulsantes */
.alert-beacon {
  cursor: default;
  pointer-events: none;
  transform-origin: center;
}

.pulse-ring {
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  transform-origin: 0 0;
}

.pulse-ring-2 {
  animation-delay: 0.6s;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.pulse-core {
  animation: pulse-core 1s ease-in-out infinite alternate;
}

@keyframes pulse-core {
  from { transform: scale(0.9); }
  to { transform: scale(1.15); }
}

/* Drawer de Inspeção da Estação */
.station-inspect-drawer {
  padding: 14px 16px;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.station-inspect-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.station-inspect-actions {
  display: flex;
  gap: 8px;
}

.btn-inspect-route {
  background: var(--text-primary);
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 7px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   Grid de Linhas (SANFONA / ACCORDION)
   ========================================================================== */
.lines-feed-section {
  margin-bottom: 40px;
}

.feed-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.feed-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.feed-subtitle {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: block;
}

.feed-report-btn {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.feed-report-btn:active {
  transform: scale(0.94);
}

.lines-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Card Sanfona */
.v1-line-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.v1-line-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* Indicador lateral da linha */
.v1-line-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background-color: var(--line-color, #00539F);
}

.v1-line-card.card-divergent {
  border-color: rgba(255, 159, 28, 0.5);
  box-shadow: 0 0 16px rgba(255, 159, 28, 0.15);
}

/* Cabeçalho do Card (Visível sempre na Sanfona) */
.card-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.card-left-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.line-code-circle {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--line-color, #00539F);
  color: var(--line-text-color, #FFFFFF);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.line-title-meta {
  display: flex;
  flex-direction: column;
}

.line-name-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.line-operator-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.card-right-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.line-status-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  letter-spacing: 0.03em;
}

.chip-normal {
  background: rgba(0, 135, 90, 0.12);
  color: var(--status-normal);
  border: 1px solid rgba(0, 135, 90, 0.25);
}

.chip-reduced {
  background: rgba(217, 119, 6, 0.12);
  color: var(--status-reduced);
  border: 1px solid rgba(217, 119, 6, 0.35);
}

.chip-halted {
  background: rgba(220, 38, 38, 0.12);
  color: var(--status-halted);
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.accordion-chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.v1-line-card.is-expanded .accordion-chevron {
  transform: rotate(180deg);
}

/* Corpo Expansível da Sanfona */
.card-accordion-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, margin-top 0.25s ease;
  margin-top: 0;
}

.v1-line-card.is-expanded .card-accordion-body {
  max-height: 500px;
  opacity: 1;
  margin-top: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* Duelo de Fontes (Split-Pill) */
.split-pill-duel {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.duel-column {
  display: flex;
  flex-direction: column;
}

.duel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.duel-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.duel-time {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  color: var(--text-muted);
}

.duel-content {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-primary);
}

.duel-divergent-highlight {
  color: var(--status-reduced);
  font-weight: 700;
}

/* Ações Rápidas dentro da Sanfona */
.drawer-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-drawer-quick {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease;
}

.btn-drawer-quick:active {
  transform: scale(0.95);
}

/* ==========================================================================
   FLOATING ACTION ISLAND: O Dock Magnético Inferior
   ========================================================================== */
.floating-island-dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  width: calc(100% - 32px);
  max-width: 480px;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  border-radius: 24px;
  padding: 6px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.island-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.island-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 18px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.island-tab-btn:hover {
  color: var(--text-primary);
}

.island-tab-btn:active {
  transform: scale(0.92);
}

.tab-icon { font-size: 1.25rem; }
.tab-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   MODAIS & BOTTOM SHEETS (Estilo V1)
   ========================================================================== */
.v1-bottom-sheet {
  border: none;
  background: transparent;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.v1-bottom-sheet[open] {
  display: flex;
}

.v1-bottom-sheet::backdrop {
  background: var(--modal-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet-box {
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-strong);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 20px 32px 20px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sheet-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet-icon { font-size: 1.6rem; }
.sheet-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sheet-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: block;
}

.sheet-close-btn {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inputs & Controles */
.input-micro-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.v1-text-input, .v1-select {
  width: 100%;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
}

.v1-text-input:focus, .v1-select:focus {
  border-color: var(--text-primary);
}

.route-inputs-card {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 16px;
}

.input-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-pin { font-size: 1.1rem; }
.input-wrap { flex: 1; }

.btn-input-action {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  cursor: pointer;
}

.route-swap-row {
  display: flex;
  justify-content: flex-end;
  padding: 4px 10px;
}

.btn-swap-stations {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.v1-primary-action-btn {
  width: 100%;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.v1-primary-action-btn:active {
  transform: scale(0.97);
}

.v1-secondary-btn {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
}

.btn-danger-tone {
  background: #DC2626;
  color: #FFFFFF;
}

/* Tipografia Refinada para o Soneca (Ponto 7) */
.radius-selector-row {
  margin: 16px 0;
}

.radius-label-refined {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.radius-chips {
  display: flex;
  gap: 8px;
  flex-direction: column;
}

.chip-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
}

.chip-radio input {
  accent-color: var(--accent-volt);
}

.alarm-actions-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

/* Trem Gráfico 6 Vagões (Tô com Pressa) */
.train-graphic-container {
  display: flex;
  gap: 6px;
  margin: 18px 0;
  justify-content: center;
}

.train-car {
  flex: 1;
  max-width: 55px;
  height: 48px;
  background: var(--bg-surface-secondary);
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--text-muted);
}

.train-car.car-recommended {
  border-color: var(--status-normal);
  background: rgba(0, 245, 155, 0.15);
  color: var(--status-normal);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: scale(1.08);
}

.door-open-direction-indicator {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  margin-top: 10px;
  color: var(--status-normal);
}

/* Tela Soneca OLED */
.oled-nap-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.oled-nap-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.oled-pulsing-orbit {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rotateOrbit 12s linear infinite;
}

@keyframes rotateOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.oled-moon { font-size: 3rem; }

.oled-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #666;
  letter-spacing: 0.1em;
  display: block;
}

.oled-station-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 6px 0;
}

.oled-distance {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #00F59B;
}

.oled-cancel-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
}

/* Recargas e Clima Cards */
.recharge-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.recharge-card {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
}

.recharge-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.recharge-card-badge {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
}

.recharge-official-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--status-normal);
}

.recharge-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.v1-btn-link {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 16px;
  border-radius: 10px;
  text-align: center;
}

.btn-top-pix {
  background: #25D366;
  color: #000000;
  width: 100%;
}

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

.app-chip {
  text-decoration: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
}

.weather-zones-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.weather-zone-card {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
}

.weather-zone-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}

.weather-zone-temp {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
}

/* Toasts e Footer */
.v1-toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v1-toast {
  background: var(--text-primary);
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: toastFadeIn 0.25s ease;
}

@keyframes toastFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.v1-footer {
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.footer-sources {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 10px auto;
}

.footer-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--status-normal);
  letter-spacing: 0.08em;
}
