/* ============================================================
   DESIGN SYSTEM 2027 — OBSIDIAN GLOW & CRYSTAL LIGHT
   Óia o Rango Entregador — PWA Mobile First & Gestão
   ============================================================ */

:root, [data-theme="dark"] {
  --bg-dark: #080c14;
  --bg-card: rgba(13, 20, 36, 0.78);
  --bg-card-hover: rgba(22, 33, 56, 0.88);
  --bg-input: rgba(6, 10, 18, 0.85);
  --bg-header: rgba(8, 12, 20, 0.88);
  --bg-nav: rgba(10, 15, 26, 0.94);
  --bg-drawer: #080C14;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-focus: #F59E0B;
  
  --amber: #F59E0B;
  --amber-glow: rgba(245, 158, 11, 0.35);
  --emerald: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.35);
  --blue: #3B82F6;
  --blue-glow: rgba(59, 130, 246, 0.35);
  --coral: #EF4444;
  --purple: #8B5CF6;
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 64px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

[data-theme="light"] {
  --bg-dark: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-input: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-nav: rgba(255, 255, 255, 0.96);
  --bg-drawer: #F8FAFC;
  
  --border-light: rgba(0, 0, 0, 0.09);
  --border-focus: #D97706;
  
  --amber: #D97706;
  --amber-glow: rgba(217, 119, 6, 0.25);
  --emerald: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.25);
  --blue: #2563EB;
  --blue-glow: rgba(37, 99, 235, 0.25);
  --coral: #DC2626;
  --purple: #7C3AED;
  
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-dim: #64748B;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--amber);
  text-decoration: none;
  transition: opacity .15s ease;
}
a:hover { opacity: .85; }

/* Header 2027 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: calc(12px + var(--safe-top)) 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.app-header .logo {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-header .logo span {
  color: var(--amber);
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.app-header .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 15px;
  cursor: pointer;
  transition: .15s;
}
.icon-btn:active { transform: scale(0.92); }

/* Main Container */
.app-main {
  padding: 16px 16px calc(var(--nav-height) + var(--safe-bottom) + 24px);
  max-width: 680px;
  margin: 0 auto;
}
.app-main.no-nav {
  padding-bottom: calc(24px + var(--safe-bottom));
}

/* Glassmorphism Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform .15s ease, border-color .15s ease, background-color 0.25s ease;
}
.card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 14px;
}
.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* (Navegação unificada Desktop & Mobile definida na seção de Layouts) */


/* Buttons 2027 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #080C14;
  font-weight: 800;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 0;
  cursor: pointer;
  font-size: 15px;
  transition: .15s;
  min-height: 48px;
  box-shadow: 0 4px 16px var(--amber-glow);
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, #F59E0B, #D97706); color: #080C14; }
.btn-block { width: 100%; }
.btn-outline {
  background: transparent;
  color: var(--amber);
  border: 1.5px solid var(--amber);
  box-shadow: none;
}
.btn-ghost {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  box-shadow: none;
}
.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}
.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  box-shadow: 0 4px 16px var(--emerald-glow);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  min-height: 36px;
  border-radius: var(--radius-sm);
}

/* Forms & Inputs */
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 12px 0 5px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background-color 0.25s ease, color 0.25s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* KPIs & Balances */
.saldo {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--amber);
  line-height: 1.05;
  letter-spacing: -0.5px;
  font-feature-settings: "tnum";
}
.saldo-sm {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--amber);
  font-feature-settings: "tnum";
}
.kpi-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* Tags & Alerts */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.tag.ok { background: rgba(16, 185, 129, 0.18); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag.warn { background: rgba(245, 158, 11, 0.18); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.3); }
.tag.err { background: rgba(239, 68, 68, 0.18); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.tag.info { background: rgba(59, 130, 246, 0.18); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.3); }

.msg {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid transparent;
}
.msg.ok { background: rgba(16, 185, 129, 0.12); color: #34D399; border-color: rgba(16, 185, 129, 0.25); }
.msg.err { background: rgba(239, 68, 68, 0.12); color: #F87171; border-color: rgba(239, 68, 68, 0.25); }
.msg.info { background: rgba(59, 130, 246, 0.12); color: #60A5FA; border-color: rgba(59, 130, 246, 0.25); }
.msg.warn { background: rgba(245, 158, 11, 0.12); color: #FBBF24; border-color: rgba(245, 158, 11, 0.25); }

/* Tabs 2027 */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 5px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.tabs button {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  min-height: 40px;
  white-space: nowrap;
  transition: .15s;
}
.tabs button.active {
  background: var(--amber);
  color: #080C14;
  box-shadow: 0 2px 8px var(--amber-glow);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + var(--safe-bottom));
  z-index: 9999;
  backdrop-filter: blur(10px);
}
.modal.open { display: flex; }
.modal-body {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
  max-height: 88dvh;
  overflow-y: auto;
  color: var(--text-main);
  animation: slideUp .25s cubic-bezier(.2,.9,.3,1);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  transition: background-color 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Permission Onboarding */
.perm-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.perm-icon { font-size: 22px; flex-shrink: 0; }
.perm-txt { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.perm-txt b { color: var(--text-main); display: block; margin-bottom: 2px; }

/* Motoboy Online / Offline Floating Switch (Uber / 99 style) */
.switch-online-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 60px;
  padding: 8px 16px;
  margin-bottom: 14px;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 32px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #334155;
  border-radius: 34px;
  transition: .25s cubic-bezier(.4,0,.2,1);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background: white;
  border-radius: 50%;
  transition: .25s cubic-bezier(.4,0,.2,1);
}
input:checked + .toggle-slider { background: #10B981; box-shadow: 0 0 16px var(--emerald-glow); }
input:checked + .toggle-slider:before { transform: translateX(24px); }

/* Radar Animado */
#radar {
  background: var(--bg-card);
  border: 2px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-lg);
  padding: 28px 16px;
  text-align: center;
}
#radar.pulse {
  border-color: var(--amber);
  animation: pulseRadar 1.4s infinite;
}
@keyframes pulseRadar {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 18px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Kanban Board para Restaurante (iFood style) */
.kanban-cols {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 10px;
  transition: transform .15s, background-color 0.25s ease;
}
.kanban-card.aguardando { border-left: 4px solid var(--amber); }
.kanban-card.aceita { border-left: 4px solid var(--blue); }
.kanban-card.em_rota { border-left: 4px solid var(--emerald); }

/* Overlay de Chamada de Corrida */
.corrida-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.corrida-overlay.on { display: flex; }
.corrida-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 28px;
  width: 100%;
  max-width: 440px;
  padding: 22px;
  color: var(--text-main);
  animation: cardIn .3s cubic-bezier(.2,.9,.3,1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  max-height: 92dvh;
  overflow-y: auto;
  transition: background-color 0.25s ease;
}
@keyframes cardIn { from { transform: translateY(60px) scale(0.95); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* Countdown Ring */
.countdown-ring {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}
.countdown-ring svg { width: 60px; height: 60px; transform: rotate(-90deg); }
.countdown-ring .ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 6; }
.countdown-ring .ring-fg { fill: none; stroke: var(--amber); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .3s linear, stroke .3s; }
.countdown-ring.urgent .ring-fg { stroke: var(--coral); }
.countdown-ring span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 19px;
  color: var(--amber);
}

/* Tabelas Responsivas */
.tabela-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}
th, td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
th {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 800;
}

/* Deep links Waze e Maps */
.deep-link-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.deep-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  color: #fff;
  border: 0;
  cursor: pointer;
  min-height: 48px;
}
.deep-link-btn.btn-waze { background: linear-gradient(135deg, #00D4FF, #0099CC); }
.deep-link-btn.btn-maps { background: linear-gradient(135deg, #10B981, #059669); }

/* Autocomplete de Endereços */
.ac-wrapper { position: relative; }
.ac-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  -webkit-overflow-scrolling: touch;
  color: var(--text-main);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.ac-list.open { display: block; }
.ac-item {
  padding: 13px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}
.ac-item:last-child { border-bottom: none; }
.ac-item strong { color: var(--amber); font-weight: 700; display: block; }
.ac-item small { color: var(--text-dim); font-size: 12px; }

/* PWA FAB */
#pwa-fab {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
  right: 14px;
  z-index: 800;
  display: none;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--amber), #D97706);
  color: #080C14;
  font-weight: 800;
  padding: 11px 18px;
  border-radius: 60px;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  box-shadow: 0 8px 24px var(--amber-glow);
}

/* =========================================================================
   PINOS PERSONALIZADOS DO MAPA (LEAFLET 2027) & RASTREIO
   ========================================================================= */
.custom-map-pin {
  background: transparent !important;
  border: none !important;
}

.pin-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-badge:hover {
  transform: scale(1.12);
}

.pin-emoji {
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 24, 38, 0.95);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  border: 2px solid var(--border-light);
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  position: relative;
  z-index: 2;
}

.pin-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: -4px;
  z-index: 3;
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

/* Motinha com Radar Pulsante */
.pin-motinha .pin-emoji {
  border-color: var(--amber);
  background: radial-gradient(circle, #2a2010 0%, #121826 100%);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

.pin-motinha .pin-title {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--amber);
}

.radar-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.4);
  z-index: 1;
  animation: radarWave 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

@keyframes radarWave {
  0% {
    width: 42px;
    height: 42px;
    opacity: 0.8;
  }
  100% {
    width: 90px;
    height: 90px;
    opacity: 0;
  }
}

/* Lojinha (Restaurante) */
.pin-lojinha .pin-emoji {
  border-color: #38BDF8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}
.pin-lojinha .pin-title {
  border-color: rgba(56, 189, 248, 0.4);
  color: #38BDF8;
}

/* Casinha (Cliente) */
.pin-casinha .pin-emoji {
  border-color: #10B981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}
.pin-casinha .pin-title {
  border-color: rgba(16, 185, 129, 0.4);
  color: #10B981;
}

/* Indicador Live Dot */
.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Badge PIN Grande */
.badge-pin {
  display: inline-block;
  font-family: monospace;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--amber);
  background: #000;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Stepper de Rastreio */
.stepper-rastreio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border-light);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.step-item.step-done .step-circle {
  background: var(--amber);
  border-color: var(--amber);
  color: #000;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.step-item.step-done .step-label {
  color: #fff;
}

.step-line {
  flex: 1;
  height: 3px;
  background: var(--border-light);
  margin: 0 6px;
  margin-top: -16px;
  z-index: 1;
  transition: background 0.3s ease;
}

.step-line.line-active {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

/* =========================================================================
   ESTILOS COMBOS MULTI-ENTREGA & MODAL DE PIN / BIOMETRIA
   ========================================================================= */
.badge-combo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.combo-pedidos-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.combo-drop-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.drop-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--amber);
  color: #000;
  font-weight: 900;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Modal de Autenticação Rápida / PIN */
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 16px auto 0;
}

.pin-btn {
  height: 58px;
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: #fff;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-btn:active {
  background: var(--amber);
  color: #000;
  transform: scale(0.94);
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 16px 0;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background: transparent;
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

/* =========================================================================
   BARRA FLUTUANTE DE CORRIDA ATIVA (FIX CRÍTICO)
   ========================================================================= */
.corrida-floating {
  display: none !important;
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 500px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1.5px solid var(--amber);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7), 0 0 20px rgba(245, 158, 11, 0.25);
  z-index: 990;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: floatBounce 0.3s ease;
}

.corrida-floating.on {
  display: flex !important;
}

.cf-icon {
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  flex-shrink: 0;
}

.cf-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cf-text span {
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}

.cf-text small {
  font-size: 12px;
  color: var(--amber);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes floatBounce {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* =========================================================================
   FAQ & ACCORDIONS (CENTRAL DE AJUDA)
   ========================================================================= */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.faq-item {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.open {
  border-color: rgba(245, 158, 11, 0.4);
}

.faq-question {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.faq-question::after {
  content: '›';
  font-size: 18px;
  color: var(--amber);
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  transform: rotate(90deg);
}

.faq-answer {
  display: none;
  padding: 0 16px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.faq-item.open .faq-answer {
  display: block;
}

/* =========================================================================
   CHAT & TICKETS DE SUPORTE (ESTILO UBER / IFOOD)
   ========================================================================= */
.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.support-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.chat-box {
  display: flex;
  flex-direction: column;
  height: 380px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #000;
  font-weight: 600;
  border-bottom-right-radius: 2px;
}

.chat-bubble.theirs {
  align-self: flex-start;
  background: #1E293B;
  color: #fff;
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 2px;
}

.chat-bubble-time {
  font-size: 10px;
  opacity: 0.75;
  margin-top: 4px;
  display: block;
}

.chat-input-bar {
  padding: 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
}

.category-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* =========================================================================
   BANNER DE STATUS DE REDE (ONLINE / OFFLINE)
   ========================================================================= */
.network-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
  z-index: 10000;
  display: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  font-weight: 700;
  animation: slideDownBanner 0.3s ease;
}

.network-banner.show {
  display: block;
}

.network-banner.offline {
  background: rgba(239, 68, 68, 0.95);
  color: #fff;
  border-bottom: 2px solid #DC2626;
}

.network-banner.online {
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
  border-bottom: 2px solid #059669;
}

@keyframes slideDownBanner {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Badge no Menu Inferior */
.nav-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--amber);
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}


/* =========================================================================
   ESTILOS MAPA AO VIVO & BOTTOM SHEETS (ESTILO UBER DRIVER)
   ========================================================================= */
#map-viewport-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
  background-color: var(--bg-dark, #0b0f19);
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 24px 24px;
}

#map-motoboy {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark, #0b0f19);
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 24px 24px;
}

#map-motoboy .maplibregl-canvas {
  outline: none;
}

.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-attrib {
  display: none !important;
}

/* Dark Mode nativo para tiles fallback do OpenStreetMap */
[data-theme="dark"] #map-motoboy .leaflet-tile-osm,
body:not([data-theme="light"]) #map-motoboy .leaflet-tile-osm {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3);
}

[data-theme="light"] #map-motoboy .leaflet-tile {
  filter: none !important;
}

/* Evitar sobreposição do botão PWA sobre os botões de ação */
#map-motoboy ~ #pwa-fab,
body:has(#map-motoboy) #pwa-fab {
  bottom: calc(var(--nav-height) + 140px);
  right: 14px;
}

.motoboy-top-bar {
  position: fixed;
  top: max(34px, calc(var(--safe-top) + 14px));
  left: 12px;
  right: 12px;
  max-width: 500px;
  margin: 0 auto;
  z-index: 500;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.motoboy-bottom-sheet {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 24px);
  left: 12px;
  right: 12px;
  max-width: 500px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  margin: 0 auto;
  z-index: 600;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 0 24px rgba(245, 158, 11, 0.15);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.35s, background-color 0.25s ease;
}

.motoboy-bottom-sheet.sheet-oculto {
  transform: translateY(120%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.motoboy-bottom-sheet.sheet-visivel {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.moto-pulse-marker {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.moto-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.4);
  animation: pulseRing 1.6s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.moto-pulse-icon {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.9), 0 3px 8px rgba(0,0,0,0.6);
  border: 3.5px solid #FFFFFF;
}

/* Chevron Direcional estilo Waze */
.waze-chevron-arrow {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 20px solid #FFFFFF;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  transform: translateY(-2px);
}

@keyframes pulseRing {
  0% { transform: scale(0.6); opacity: 0.9; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* =========================================================================
   BOTÃO ÚNICO MULTIFUNCIONAL DE NAVEGAÇÃO & ESCOPO GERAL
   ========================================================================= */
.btn-mapa-unificado {
  position: fixed;
  bottom: calc(var(--nav-height) + 80px);
  right: 16px;
  z-index: 550;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  color: var(--text-main);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.btn-mapa-unificado:active {
  transform: scale(0.92);
}

.btn-mapa-unificado.modo-rota {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
  color: #F8FAFC;
}

.btn-mapa-unificado.modo-geral {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
  animation: pulseGeralBtn 2s infinite ease-in-out;
}

@keyframes pulseGeralBtn {
  0%, 100% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.8); }
}

/* Velocímetro Waze no canto inferior esquerdo */
.waze-speedometer {
  position: fixed;
  bottom: calc(var(--nav-height) + 80px);
  left: 16px;
  z-index: 550;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
  color: #fff;
  user-select: none;
}

.waze-speed-val {
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.waze-speed-unit {
  font-size: 8px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 1px;
}

.drawer-overlay-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 950;
  background: var(--bg-drawer) !important;
  overflow-y: auto;
  padding: max(54px, calc(var(--safe-top) + 28px)) 16px calc(var(--nav-height) + var(--safe-bottom) + 30px);
  animation: fadeInDrawer 0.2s ease;
  -webkit-overflow-scrolling: touch;
  transition: background-color 0.25s ease;
}

@keyframes fadeInDrawer {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.offer-timer-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin: 10px 0;
}

.offer-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, var(--amber), #EF4444);
  width: 100%;
  transition: width 1s linear;
}


/* =========================================================================
   GPS HUD BAR (NAVEGAÇÃO ATIVA ESTILO GPS / WAZE)
   ========================================================================= */
.gps-hud-bar {
  position: fixed;
  top: max(92px, calc(var(--safe-top) + 72px));
  left: 12px;
  right: 12px;
  max-width: 500px;
  margin: 0 auto;
  z-index: 520;
  background: var(--bg-card);
  border: 1.5px solid var(--amber);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 16px rgba(245, 158, 11, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: slideDownHud 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: background-color 0.25s ease;
}

@keyframes slideDownHud {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.gps-hud-icon {
  font-size: 24px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  flex-shrink: 0;
}

.gps-hud-info {
  flex: 1;
  min-width: 0;
  margin: 0 10px;
}

.gps-hud-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gps-hud-sub {
  font-size: 11px;
  color: var(--amber);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gps-hud-badge {
  background: var(--amber);
  color: #000;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  flex-shrink: 0;
}

.dest-pulse-marker {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dest-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.4);
  animation: pulseRing 1.8s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.dest-pulse-icon {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0284C7;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.8);
  border: 2px solid #fff;
}


/* Toast de Notificação do Suporte Master */
.master-support-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  max-width: 380px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border: 1.5px solid var(--amber);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  z-index: 10000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInToast 0.3s ease;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}



/* ============================================================
   RESPONSIVIDADE INTELIGENTE 2027 (DESKTOP, TABLET & CELULAR)
   Adaptação fluida de Sidebar, Grids e Modais
   ============================================================ */

/* Grids Fluídos */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

/* ============================================================
   KPI CARDS & METRICS (DESIGN 2027)
   ============================================================ */
.grid-kpi-master {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.kpi-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}
.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--amber)), transparent);
  opacity: 0.85;
}
.kpi-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.kpi-subtext {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.kpi-icon-pill {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.kpi-card.kpi-emerald { --card-accent: #10B981; }
.kpi-card.kpi-emerald .saldo-sm, .kpi-card.kpi-emerald .saldo { color: #10B981; }
.kpi-card.kpi-blue { --card-accent: #3B82F6; }
.kpi-card.kpi-blue .saldo-sm, .kpi-card.kpi-blue .saldo { color: #3B82F6; }
.kpi-card.kpi-amber { --card-accent: #F59E0B; }
.kpi-card.kpi-purple { --card-accent: #8B5CF6; }
.kpi-card.kpi-purple .saldo-sm, .kpi-card.kpi-purple .saldo { color: #8B5CF6; }
.kpi-card.kpi-coral { --card-accent: #EF4444; }
.kpi-card.kpi-coral .saldo-sm, .kpi-card.kpi-coral .saldo { color: #EF4444; }

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

/* ============================================================
   TELAS GRANDES / DESKTOP ENTERPRISE 2027 (>= 1024px)
   ============================================================ */
/* ============================================================
   TELAS GRANDES / DESKTOP ENTERPRISE 2027 (>= 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  :root {
    --nav-width: 275px;
  }

  /* Header Superior no Desktop */
  .app-header {
    padding: 16px 36px;
    margin-left: var(--nav-width);
    width: calc(100% - var(--nav-width));
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
  }
  .app-header .logo {
    display: none; /* Exibido com riqueza na Sidebar nos painéis */
  }

  /* Header em Páginas Públicas/Auth (Sem Sidebar) */
  body:not(:has(.app-nav)) .app-header,
  body:has(.app-main.no-nav) .app-header {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 24px !important;
  }
  body:not(:has(.app-nav)) .app-header .logo,
  body:has(.app-main.no-nav) .app-header .logo {
    display: flex !important;
    font-size: 18px !important;
  }
  .desktop-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
  }
  .desktop-breadcrumb .sep {
    color: var(--text-dim);
    font-weight: 400;
  }
  .desktop-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .desktop-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #10B981;
  }
  .desktop-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px #10B981;
    display: inline-block;
    animation: pulseGps 2s infinite ease-in-out;
  }
  .mobile-only-actions {
    display: none !important;
  }

  /* Sidebar Lateral Fixa 2027 */
  .app-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--nav-width);
    height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    padding: 20px 16px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-top: none;
    z-index: 1000;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  /* Tema Claro 100% no Desktop */
  [data-theme="light"] .app-nav {
    background: #FFFFFF !important;
    border-right: 1px solid rgba(0, 0, 0, 0.09) !important;
    box-shadow: 6px 0 28px rgba(15, 23, 42, 0.05) !important;
  }
  [data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  [data-theme="light"] .desktop-breadcrumb {
    color: #0F172A !important;
  }
  [data-theme="light"] .desktop-sidebar-brand .brand-title {
    color: #0F172A !important;
  }
  [data-theme="light"] .desktop-sidebar-brand .brand-subtitle {
    color: #64748B !important;
  }
  [data-theme="light"] .app-nav .nav-item {
    color: #475569 !important;
  }
  [data-theme="light"] .app-nav .nav-item:hover {
    background: #F1F5F9 !important;
    color: #0F172A !important;
    transform: translateX(3px);
  }
  [data-theme="light"] .app-nav .nav-item.active {
    background: #FEF3C7 !important;
    border: 1px solid #FCD34D !important;
    color: #B45309 !important;
    font-weight: 800 !important;
  }
  [data-theme="light"] .app-nav .nav-item.active .nav-icon {
    background: #FDE68A !important;
    transform: scale(1.08);
  }
  [data-theme="light"] .sidebar-user-card {
    background: #F8FAFC !important;
    border: 1px solid rgba(0, 0, 0, 0.09) !important;
  }
  [data-theme="light"] .sidebar-user-name {
    color: #0F172A !important;
  }
  [data-theme="light"] .sidebar-user-role {
    color: #64748B !important;
  }
  [data-theme="light"] .sidebar-theme-toggle {
    background: #FFFFFF !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #0F172A !important;
  }
  [data-theme="light"] .sidebar-theme-toggle:hover {
    background: #F1F5F9 !important;
  }

  /* Tema Escuro no Desktop */
  [data-theme="dark"] .app-nav,
  :root:not([data-theme="light"]) .app-nav {
    background: rgba(9, 14, 26, 0.96) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45) !important;
  }
  [data-theme="dark"] .app-header,
  :root:not([data-theme="light"]) .app-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-light);
  }
  [data-theme="dark"] .desktop-sidebar-brand .brand-title,
  :root:not([data-theme="light"]) .desktop-sidebar-brand .brand-title {
    color: #F8FAFC;
  }
  [data-theme="dark"] .desktop-sidebar-brand .brand-subtitle,
  :root:not([data-theme="light"]) .desktop-sidebar-brand .brand-subtitle {
    color: #94A3B8;
  }
  [data-theme="dark"] .app-nav .nav-item,
  :root:not([data-theme="light"]) .app-nav .nav-item {
    color: var(--text-muted);
  }
  [data-theme="dark"] .app-nav .nav-item:hover,
  :root:not([data-theme="light"]) .app-nav .nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
    transform: translateX(3px);
  }
  [data-theme="dark"] .app-nav .nav-item.active,
  :root:not([data-theme="light"]) .app-nav .nav-item.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: var(--amber);
    font-weight: 800;
  }
  [data-theme="dark"] .app-nav .nav-item.active .nav-icon,
  :root:not([data-theme="light"]) .app-nav .nav-item.active .nav-icon {
    background: rgba(245, 158, 11, 0.18);
    transform: scale(1.08);
  }
  [data-theme="dark"] .sidebar-user-card,
  :root:not([data-theme="light"]) .sidebar-user-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
  }
  [data-theme="dark"] .sidebar-user-name,
  :root:not([data-theme="light"]) .sidebar-user-name {
    color: var(--text-main);
  }
  [data-theme="dark"] .sidebar-user-role,
  :root:not([data-theme="light"]) .sidebar-user-role {
    color: var(--text-muted);
  }
  [data-theme="dark"] .sidebar-theme-toggle,
  :root:not([data-theme="light"]) .sidebar-theme-toggle {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
  }

  .app-nav::before {
    display: none;
  }

  .desktop-sidebar-brand {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    padding: 4px 8px 18px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 14px;
  }
  .desktop-sidebar-brand .brand-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.3px;
  }
  .desktop-sidebar-brand .brand-badge {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #080C14;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .desktop-sidebar-brand .brand-subtitle {
    font-size: 11.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
  }

  .desktop-sidebar-menu {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
  }
  .desktop-sidebar-menu::-webkit-scrollbar {
    width: 4px;
  }
  .desktop-sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.35);
    border-radius: 4px;
  }
  .desktop-sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
  }

  .app-nav .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    min-width: 0;
    max-width: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid transparent;
  }

  .app-nav .nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3.5px;
    border-radius: 4px;
    background: var(--amber);
    box-shadow: 0 0 10px var(--amber);
  }

  .app-nav .nav-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    transition: transform 0.2s ease;
  }

  .app-nav .nav-label {
    font-size: 13.5px;
    font-weight: 600;
    flex: 1;
    text-align: left;
  }

  .desktop-sidebar-footer {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    margin-top: 10px;
  }
  .sidebar-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    gap: 10px;
  }
  .sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B, #3B82F6);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .sidebar-user-meta {
    flex: 1;
    overflow: hidden;
  }
  .sidebar-user-name {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sidebar-user-role {
    font-size: 10px;
  }
  .sidebar-theme-toggle {
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
  }
  .sidebar-theme-toggle:hover {
    transform: scale(1.05);
  }

  /* Conteúdo Principal no Desktop Fluido & Autoajustável */
  .app-main {
    margin-left: var(--nav-width);
    width: calc(100% - var(--nav-width));
    max-width: 1750px;
    padding: 28px 36px;
    padding-bottom: 60px;
  }

  .app-main.no-nav {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 680px;
  }

  /* Grid Autoajustável Inteligente no Desktop (Auto-fit / SaaS 2027) */
  .grid-kpi-master,
  .grid-kpi-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
  }

  .grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
  }

  .grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }

  .grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
  }

  /* Cards Modernos com Elevação e Suavidade no Desktop */
  .card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  }

  [data-theme="light"] .card {
    background: #FFFFFF;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.04);
  }

  /* Toolbar de Filtros e Busca no Desktop */
  .desktop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
  }

  .desktop-toolbar-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .filter-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border-light);
    background: var(--bg-input);
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
  }

  .filter-pill-btn:hover {
    color: var(--text-main);
    border-color: var(--amber);
    transform: translateY(-1px);
  }

  .filter-pill-btn.active {
    background: rgba(245, 158, 11, 0.16);
    border-color: var(--amber);
    color: var(--amber);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
  }

  [data-theme="light"] .filter-pill-btn {
    background: #F1F5F9;
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
  }

  [data-theme="light"] .filter-pill-btn.active {
    background: #FEF3C7;
    border-color: #F59E0B;
    color: #B45309;
  }

  /* Tabelas Desktop Inteligentes com Scroll Fluido & Sticky Header */
  .tabela-wrap {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    scrollbar-width: thin;
    position: relative;
  }

  .tabela-wrap::-webkit-scrollbar {
    height: 7px;
    width: 7px;
  }

  .tabela-wrap::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.35);
    border-radius: 6px;
  }

  .tabela-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.6);
  }

  .tabela-wrap::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 6px;
  }

  .tabela-wrap table {
    width: 100%;
    min-width: 840px;
    border-collapse: separate;
    border-spacing: 0;
  }

  .tabela-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--bg-input);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1.5px solid var(--border-light);
    white-space: nowrap;
  }

  [data-theme="light"] .tabela-wrap thead th {
    background: #F1F5F9;
    color: #475569;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.09);
  }

  .tabela-wrap tbody tr {
    transition: background-color 0.15s ease;
  }

  .tabela-wrap tbody tr:hover {
    background: rgba(245, 158, 11, 0.04);
  }

  [data-theme="light"] .tabela-wrap tbody tr:hover {
    background: #F8FAFC;
  }

  .tabela-wrap td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
  }

  .tabela-wrap tbody tr:last-child td {
    border-bottom: none;
  }

  /* Utilitários de Células de Tabela */
  .td-nowrap {
    white-space: nowrap !important;
  }

  .td-loja-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 13.5px;
  }

  .td-loja-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
  }

  /* Modais no Desktop */
  .corrida-card, .modal-body {
    max-width: 800px;
    border-radius: var(--radius-lg);
    margin: 40px auto;
  }

  /* HUD do Motoboy no Desktop */
  #gps-hud-container, .motoboy-hud-card {
    max-width: 480px;
    left: calc(var(--nav-width) + 24px);
  }
}

/* Tablet (768px a 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .app-main {
    padding: 24px 20px 90px;
    max-width: 900px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   CELULAR E MOBILE (< 1024px) - ISOLAMENTO 100% PRESERVADO
   ============================================================ */
@media (max-width: 1023px) {
  .desktop-sidebar-brand,
  .desktop-sidebar-footer,
  .desktop-breadcrumb,
  .desktop-header-actions,
  .desktop-status-badge {
    display: none !important;
  }

  /* O wrapper intermediário se comporta como transparente para o flex horizontal */
  .desktop-sidebar-menu {
    display: contents !important;
  }

  /* Barra de navegação inferior horizontal móvel */
  .app-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 6px 4px calc(6px + var(--safe-bottom)) !important;
    border-top: 1px solid var(--border-light) !important;
    border-right: none !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
    z-index: 900 !important;
  }

  .nav-item {
    flex: 1 0 auto !important;
    min-width: 60px !important;
    max-width: 80px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 6px 2px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 11px !important;
    text-align: center !important;
    transform: none !important;
    border: none !important;
    background: transparent !important;
  }

  .nav-item .nav-icon {
    font-size: 19px !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
  }

  .nav-item .nav-label {
    font-size: 10.5px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .nav-item.active {
    background: transparent !important;
    border: none !important;
    color: var(--amber) !important;
    font-weight: 700 !important;
  }

  .nav-item.active::before {
    display: none !important;
  }

  .nav-item.active .nav-icon {
    background: transparent !important;
    transform: translateY(-2px) scale(1.12) !important;
  }
}

@media (max-width: 767px) {
  .app-main {
    padding: 16px 14px calc(76px + var(--safe-bottom));
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .app-header {
    padding: calc(10px + var(--safe-top)) 14px 10px;
  }
}

/* Suporte Nativo a Aplicativo (is-native-app) */
.is-native-app {
  user-select: none;
  -webkit-user-select: none;
}
.is-native-app .app-header {
  padding-top: calc(16px + var(--safe-top));
}
.is-native-app .app-nav {
  padding-bottom: calc(12px + var(--safe-bottom));
}

/* ============================================================
   SELETOR DE TEMAS & APARÊNCIA (AUTO, LIGHT, DARK)
   ============================================================ */
.theme-picker-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-input);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-top: 8px;
}

.theme-pill-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-pill-btn .theme-icon {
  font-size: 18px;
}

.theme-pill-btn.active {
  background: var(--bg-card);
  color: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================================================
   FILTRO NOTURNO DE ALTA PERFORMANCE (OPENSTREETMAP 100% FREE)
   Garante mapa escuro sem chaves de API nem marcas d'água
   ============================================================ */
[data-theme="dark"] .leaflet-tile,
.leaflet-dark-mode .leaflet-tile {
  filter: invert(100%) hue-rotate(180deg) brightness(92%) contrast(90%) !important;
}

[data-theme="dark"] .leaflet-container,
.leaflet-dark-mode.leaflet-container {
  background: #080c14 !important;
}

[data-theme="light"] .leaflet-tile {
  filter: none !important;
}

[data-theme="light"] .leaflet-container {
  background: #f1f5f9 !important;
}

/* ============================================================
   SISTEMA DE AVALIAÇÃO & REPUTAÇÃO (TAGS, CHIPS, STARS)
   ============================================================ */
.eval-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 480px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.eval-card-box {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.star-rating-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 14px;
}

.star-rating-btn {
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
  transition: transform 0.15s, color 0.15s;
  padding: 2px 4px;
  line-height: 1;
}

.star-rating-btn:hover,
.star-rating-btn.active {
  color: #f59e0b;
  transform: scale(1.15);
}

.eval-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.eval-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.eval-chip:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
}

.eval-chip.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--amber);
  color: var(--amber);
}

.eval-chip.active-bad {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

.reputation-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.reputation-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

/* =========================================================================
   LOADING GLOBAL COM ÍCONE REDONDO PULSANTE (ESTILO MODERNO 2027)
   ========================================================================= */
.app-global-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.app-global-loader.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.app-global-loader .loader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="light"] .app-global-loader .loader-backdrop {
  background: rgba(255, 255, 255, 0.85);
}

.app-global-loader .loader-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 24px;
  max-width: 320px;
}

.app-global-loader .loader-icon-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.app-global-loader .loader-logo-img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.45), 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(245, 158, 11, 0.6);
  position: relative;
  z-index: 3;
  animation: pulseLogoScale 1.8s ease-in-out infinite;
}

.app-global-loader .loader-pulse-ring {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  box-shadow: 0 0 16px var(--amber);
  animation: pulseRingAnim 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  z-index: 1;
}

.app-global-loader .loader-pulse-ring-outer {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid rgba(245, 158, 11, 0.5);
  animation: pulseRingAnim 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite 0.45s;
  z-index: 0;
}

@keyframes pulseLogoScale {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 32px rgba(245, 158, 11, 0.7), 0 8px 36px rgba(0, 0, 0, 0.5);
  }
  100% {
    transform: scale(0.96);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), 0 4px 20px rgba(0, 0, 0, 0.3);
  }
}

@keyframes pulseRingAnim {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  75% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

.app-global-loader .loader-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
  margin-bottom: 6px;
}

.app-global-loader .loader-subtext {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.app-global-loader.is-offline .loader-logo-img {
  border-color: #EF4444;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.5);
}

.app-global-loader.is-offline .loader-pulse-ring {
  border-color: #EF4444;
  box-shadow: 0 0 16px #EF4444;
}

.app-global-loader.is-offline .loader-text {
  color: #EF4444;
}

/* =========================================================================
   PÍLULA DE NAVEGAÇÃO RESILIENTE OFFLINE (NÃO BLOQUEANTE)
   ========================================================================= */
.nav-offline-pill {
  position: fixed;
  top: max(58px, calc(var(--safe-top) + 46px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 530;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: slideDownHud 0.25s ease;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

.nav-offline-pill.offline {
  background: rgba(185, 28, 28, 0.9);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #FEF2F2;
}

.nav-offline-pill.online {
  background: rgba(4, 120, 87, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #ECFDF5;
}

.nav-offline-pill .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  display: inline-block;
  animation: pulseGps 1.5s infinite ease-in-out;
}

/* =========================================================================
   MODAL DE RETENTATIVAS AUTOMÁTICAS E CONEXÃO LENTA
   ========================================================================= */
.retry-spinner-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.retry-spinner-icon.rotating {
  animation: retryRotate 1s linear infinite;
}

@keyframes retryRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =========================================================================
   CARDS DE SELEÇÃO DE PLANOS COMERCIAIS (AVULSO, MENSALISTA, FIXO)
   ========================================================================= */
.plan-select-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.plan-select-card {
  background: var(--bg-input);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  user-select: none;
}

.plan-select-card * {
  pointer-events: none;
}

.plan-select-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.plan-select-card.active {
  border-color: var(--amber);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.03) 100%);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.plan-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.plan-badge-volume {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.plan-badge-volume.popular {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.4);
}

.plan-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.plan-select-card.active .plan-radio-dot {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: inset 0 0 0 3px var(--bg-card);
}

.plan-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.plan-card-sub {
  font-size: 12px;
  color: var(--amber);
  font-weight: 600;
  margin-bottom: 6px;
}

.plan-card-price {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.plan-card-price small {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-card-features {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* =========================================================================
   VAGAS DE MOTOBOY FIXO / DIÁRIAS (CARD NO MOTOBOY E RESTAURANTE)
   ========================================================================= */
.vaga-fixo-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.vaga-fixo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3B82F6, #8B5CF6);
}

.badge-taxa-loja {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10B981;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
  margin: 8px 0;
}

/* =========================================================================
   AVISO DE SALDO NEGATIVO / LIMITE DE CRÉDITO NO RESTAURANTE
   ========================================================================= */
.limite-credito-bar {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: #F87171;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* =========================================================================
   MAP DARK MODE OVERHAUL (CLAREADO & ALTO CONTRASTE ESTILO WAZE / UBER)
   ========================================================================= */
#map-viewport-wrapper {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #253040;
}

#map-motoboy {
  width: 100%;
  height: 100%;
  background: #253040;
}

[data-theme="dark"] #map-motoboy .maplibregl-canvas,
[data-theme="dark"] #map-motoboy .leaflet-tile-pane,
[data-theme="dark"] .leaflet-dark-mode .leaflet-tile-pane,
[data-theme="dark"] .leaflet-container .leaflet-tile-pane {
  filter: invert(86%) hue-rotate(185deg) brightness(138%) contrast(110%) saturate(1.22) !important;
}

[data-theme="light"] #map-motoboy .maplibregl-canvas,
[data-theme="light"] #map-motoboy .leaflet-tile-pane,
[data-theme="light"] .leaflet-container .leaflet-tile-pane {
  filter: none !important;
}

[data-theme="dark"] .leaflet-container {
  background: #253040 !important;
}

[data-theme="light"] .leaflet-container {
  background: #F1F5F9 !important;
}

/* =========================================================================
   ZONAS DE DINÂMICA / SURGE PRICING (HOTSPOTS) NO MAPA
   ========================================================================= */
.custom-dinamica-badge {
  background: transparent !important;
  border: none !important;
  pointer-events: auto;
  cursor: pointer;
}

.dinamica-bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.94), rgba(220, 38, 38, 0.94));
  color: #FFFFFF;
  padding: 5px 10px;
  border-radius: 24px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.25);
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  animation: pulseDinamicaBadge 2.2s infinite ease-in-out;
}

.dinamica-bubble:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.75), 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.dinamica-fire {
  font-size: 13px;
  animation: flameFlicker 1.4s infinite alternate ease-in-out;
}

.dinamica-tag {
  font-size: 11px;
  opacity: 0.95;
  font-weight: 700;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  padding-right: 5px;
  margin-right: 2px;
}

.dinamica-bonus {
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: #FEF08A;
}

@keyframes pulseDinamicaBadge {
  0%, 100% { box-shadow: 0 4px 16px rgba(234, 88, 12, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.25); }
  50% { box-shadow: 0 6px 22px rgba(234, 88, 12, 0.8), 0 0 0 4px rgba(245, 158, 11, 0.4); }
}

@keyframes flameFlicker {
  0% { transform: scale(1); }
  100% { transform: scale(1.18) rotate(3deg); }
}

/* Indicadores de Demanda x Oferta no Painel Master */
.demanda-termometro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demanda-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  flex-wrap: wrap;
}

.demanda-status-banner.alta {
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  color: #EF4444;
}

.demanda-status-banner.equilibrado {
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  color: #10B981;
}

.demanda-status-banner.oferta {
  background: rgba(59, 130, 246, 0.12);
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  color: #3B82F6;
}

.chip-bairro-sugerido {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-bairro-sugerido:hover {
  background: var(--amber);
  color: #000;
  border-color: var(--amber);
  transform: translateY(-1px);
}

.marker-motoboy-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #10B981;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6);
  font-size: 16px;
}

.marker-pedido-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #EF4444;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.7);
  font-size: 17px;
  animation: pulsePedidoBadge 1.8s infinite ease-in-out;
}

@keyframes pulsePedidoBadge {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 14px rgba(239, 68, 68, 0.7); }
  50% { transform: scale(1.15); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.95); }
}

/* =========================================================================
   BARRA SUPERIOR & PÍLULA DE GANHOS DO MOTOBOY (THEME AWARE)
   ========================================================================= */
.motoboy-top-bar {
  position: fixed;
  top: max(12px, var(--safe-top));
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 40px;
  padding: 8px 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .motoboy-top-bar {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .motoboy-top-bar {
  background: rgba(18, 26, 38, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.top-earnings-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.16);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 900;
  font-size: 14px;
  color: var(--amber);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
  transition: all 0.2s ease;
}

.top-earnings-pill:hover, .top-earnings-pill:active {
  background: rgba(245, 158, 11, 0.28);
  transform: scale(1.04);
}

.top-earnings-pill .pill-arrow {
  font-size: 11px;
  opacity: 0.8;
}

/* =========================================================================
   PÍLULA DE STATUS DO RADAR / AVISO OFFLINE NO TOPO
   ========================================================================= */
.motoboy-top-radar-pill {
  position: fixed;
  top: max(68px, calc(var(--safe-top) + 56px));
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  z-index: 490;
  background: rgba(15, 23, 42, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  padding: 6px 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  text-align: center;
  pointer-events: none;
  transition: all 0.25s ease;
}

[data-theme="light"] .motoboy-top-radar-pill {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* =========================================================================
   BOTÃO CIRCULAR "COMEÇAR / ONLINE" COM ANÉIS PULSANTES
   ========================================================================= */
#btn-flutuante-comecar-wrapper {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
}

.btn-comecar-circular {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284C7, #0369A1);
  border: 3px solid #FFFFFF;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 10px 32px rgba(2, 132, 199, 0.6);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-comecar-circular:active {
  transform: scale(0.92);
}

.btn-comecar-circular .ring-pulse {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2.5px solid rgba(2, 132, 199, 0.7);
  animation: ringExpand 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
  pointer-events: none;
}

.btn-comecar-circular .ring-pulse-2 {
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.45);
  animation: ringExpand 2s infinite 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
  pointer-events: none;
}

@keyframes ringExpand {
  0% { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* =========================================================================
   SISTEMA DE NAVEGAÇÃO RESPONSIVO (SIDEBAR NO DESKTOP / BOTTOM NAV NO MOBILE)
   ========================================================================= */

/* Visibilidade de elementos Desktop vs Mobile */
.desktop-sidebar-brand,
.desktop-sidebar-footer,
.desktop-breadcrumb,
.desktop-header-actions {
  display: none;
}

.mobile-only-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile Bottom Navigation */
.app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  height: calc(68px + var(--safe-bottom));
  background: var(--bg-nav);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
  padding: 6px 8px var(--safe-bottom);
  display: flex;
  align-items: center;
  justify-content: space-around;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.app-nav::-webkit-scrollbar {
  display: none;
}

.desktop-sidebar-menu {
  display: contents;
}

.nav-item {
  flex: 1 0 auto;
  min-width: 58px;
  max-width: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px 4px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  position: relative;
  user-select: none;
}

.nav-item .nav-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item .nav-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

/* Active State no Tema Escuro */
[data-theme="dark"] .nav-item.active {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.16);
}

/* Active State no Tema Claro */
[data-theme="light"] .nav-item {
  color: #64748B;
}
[data-theme="light"] .nav-item:hover {
  color: #0F172A;
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .nav-item.active {
  color: #D97706;
  background: rgba(217, 119, 6, 0.12);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.15);
}

.nav-item.active .nav-label {
  font-weight: 800;
}

/* =========================================================================
   DESKTOP VIEWPORT LAYOUT (SIDEBAR VERTICAL NA ESQUERDA >= 900px)
   ========================================================================= */
@media (min-width: 900px) {
  .mobile-only-actions {
    display: none !important;
  }

  .desktop-breadcrumb {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-muted);
  }
  .desktop-breadcrumb .sep {
    color: var(--text-dim);
  }

  .desktop-header-actions {
    display: flex !important;
    align-items: center;
    gap: 10px;
  }

  .desktop-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
  }

  .desktop-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 8px var(--emerald);
    display: inline-block;
  }

  /* Header Desktop */
  .app-header {
    padding-left: 280px !important;
    padding-right: 32px !important;
  }

  /* Sidebar Fixa na Esquerda */
  .app-nav {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 260px !important;
    height: 100vh !important;
    background: var(--bg-card) !important;
    border-top: none !important;
    border-right: 1px solid var(--border-light) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08) !important;
    padding: 20px 14px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 1000 !important;
  }

  /* Header da Sidebar */
  .desktop-sidebar-brand {
    display: block !important;
    padding: 0 8px 16px !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid var(--border-light) !important;
  }

  .desktop-sidebar-brand .brand-title {
    font-size: 15px;
    font-weight: 900;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
  }

  .desktop-sidebar-brand .brand-badge {
    font-size: 10px;
    font-weight: 900;
    background: rgba(245, 158, 11, 0.18);
    color: var(--amber);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
  }

  .desktop-sidebar-brand .brand-subtitle {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  /* Lista de Links da Sidebar */
  .desktop-sidebar-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex: 1 !important;
    overflow-y: auto !important;
    padding-right: 2px;
  }

  .nav-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    flex: unset !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-muted) !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    text-align: left !important;
  }

  .nav-item .nav-icon {
    font-size: 18px !important;
    line-height: 1 !important;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
  }

  .nav-item .nav-label {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-item:hover {
    color: var(--text-main) !important;
    background: var(--bg-input) !important;
    transform: translateX(3px);
  }

  .nav-item.active {
    color: var(--amber) !important;
    background: rgba(245, 158, 11, 0.16) !important;
    font-weight: 800 !important;
    transform: none !important;
  }

  .nav-item.active .nav-icon {
    transform: none !important;
  }

  /* Rodapé da Sidebar Desktop */
  .desktop-sidebar-footer {
    display: block !important;
    padding-top: 14px !important;
    margin-top: auto !important;
    border-top: 1px solid var(--border-light) !important;
  }

  .sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
  }

  .sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), #D97706);
    color: #080C14;
    font-weight: 900;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .sidebar-user-meta {
    flex: 1;
    min-width: 0;
  }

  .sidebar-user-name {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-user-role {
    font-size: 10.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-theme-toggle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  .sidebar-theme-toggle:hover {
    background: var(--bg-card);
    border-color: var(--amber);
  }

  /* Main Container Expandido no Desktop */
  .app-main {
    max-width: 1440px !important;
    padding-left: 280px !important;
    padding-right: 32px !important;
    padding-top: 24px !important;
    padding-bottom: 40px !important;
    margin: 0 !important;
  }

  /* Kanban 3 Colunas no Desktop */
  .kanban-cols {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    align-items: start !important;
  }

  .kanban-col-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-height: 520px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .kanban-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
  }

  .kanban-col-header.aguardando { border-bottom-color: rgba(245, 158, 11, 0.4); color: var(--amber); }
  .kanban-col-header.aceita { border-bottom-color: rgba(59, 130, 246, 0.4); color: var(--blue); }
  .kanban-col-header.em_rota { border-bottom-color: rgba(16, 185, 129, 0.4); color: var(--emerald); }

  .kanban-badge {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
  }

  .kanban-col-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .kanban-empty-col {
    text-align: center;
    padding: 32px 12px;
    color: var(--text-muted);
    font-size: 12.5px;
    border: 1.5px dashed var(--border-light);
    border-radius: var(--radius-md);
  }
}

@media (max-width: 899px) {
  .kanban-col-wrapper {
    margin-bottom: 14px;
  }
  .kanban-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
  }
  .kanban-col-header.aguardando { color: var(--amber); }
  .kanban-col-header.aceita { color: var(--blue); }
  .kanban-col-header.em_rota { color: var(--emerald); }
  .kanban-badge {
    background: var(--bg-input);
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 900;
  }
}

/* ============================================================
   DESIGN SYSTEM 2027 — WIZARD MULTI-ETAPAS & AUTH UI
   ============================================================ */

.auth-page-container {
  max-width: 580px;
  margin: 20px auto 60px;
  padding: 0 16px;
}

.auth-header-hero {
  text-align: center;
  margin-bottom: 20px;
}

.auth-header-hero .auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.auth-header-hero h1 {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-header-hero p {
  color: var(--text-muted);
  font-size: 13.5px;
}

/* Stepper Bar 2027 */
.wizard-stepper-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.wizard-stepper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.wizard-stepper-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wizard-stepper-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.wizard-progress-track {
  height: 6px;
  background: var(--bg-input);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  margin-bottom: 12px;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B 0%, #10B981 100%);
  border-radius: 99px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-steps-pills {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.wizard-step-dot {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 4px 6px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.wizard-step-dot .dot-number {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  flex-shrink: 0;
}

.wizard-step-dot.active {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
}

.wizard-step-dot.active .dot-number {
  background: var(--amber);
  color: #000;
  border-color: var(--amber);
  box-shadow: 0 0 10px var(--amber-glow);
}

.wizard-step-dot.completed {
  color: var(--emerald);
}

.wizard-step-dot.completed .dot-number {
  background: var(--emerald);
  color: #fff;
  border-color: var(--emerald);
}

@media (max-width: 520px) {
  .wizard-step-dot .dot-label {
    display: none;
  }
  .wizard-step-dot {
    justify-content: center;
  }
}

/* Seletor Dual de Tipo de Conta */
.tipo-conta-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.tipo-conta-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  user-select: none;
  -webkit-user-select: none;
}

.tipo-conta-btn:hover {
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.tipo-conta-btn * {
  pointer-events: none;
}

.tipo-conta-btn .btn-icon {
  font-size: 26px;
  margin-bottom: 2px;
}

.tipo-conta-btn .btn-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
}

.tipo-conta-btn .btn-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.tipo-conta-btn.active {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.18);
}

.tipo-conta-btn.active .btn-title {
  color: var(--amber);
}

#btn-tipo-entreg.active {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.18);
}

#btn-tipo-entreg.active .btn-title {
  color: var(--emerald);
}

/* Wizard Panes */
.wizard-pane {
  display: none;
  animation: wizardFadeSlide 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-pane.active {
  display: block;
}

@keyframes wizardFadeSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Wizard Navigation Actions */
.wizard-nav-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.wizard-nav-actions button {
  flex: 1;
}

/* Custom File Upload Component 2027 */
.upload-card-field {
  background: var(--bg-input);
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  position: relative;
}

.upload-card-field:hover {
  border-color: var(--amber);
  background: rgba(245, 158, 11, 0.03);
}

.upload-card-field.has-file {
  border-style: solid;
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.06);
}

.upload-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.upload-field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.upload-field-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.upload-card-field.has-file .upload-field-badge {
  background: var(--emerald);
  color: #fff;
}

.upload-field-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-card-field input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Input com Ícone e Toggle de Senha */
.input-with-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon-wrapper input {
  padding-left: 38px;
  padding-right: 42px;
  width: 100%;
}

.input-leading-icon {
  position: absolute;
  left: 12px;
  font-size: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.input-trailing-action {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-trailing-action:hover {
  color: var(--amber);
}

/* Card Google Sign-In Modern */
.google-sign-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 18px;
}

.btn-google-auth-2027 {
  width: 100%;
  background: #ffffff;
  color: #1f2937;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-google-auth-2027:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.auth-divider-2027 {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-divider-2027::before,
.auth-divider-2027::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.auth-divider-2027 span {
  padding: 0 12px;
}

/* ============================================================
   RESPONSIVIDADE INTELIGENTE CADASTRO: GRID DESKTOP / WIZARD MOBILE
   ============================================================ */

/* Desktop (>= 900px): Exibição em Grid Completo Autoajustável */
@media (min-width: 900px) {
  .auth-page-container.cadastro-wide {
    max-width: 1060px;
    margin: 30px auto 60px;
  }

  .auth-page-container.login-compact {
    max-width: 480px;
    margin: 40px auto 70px;
  }

  /* Oculta Stepper e Botões de Avançar no Desktop */
  .cadastro-wide .wizard-stepper-wrapper {
    display: none !important;
  }

  .cadastro-wide .wizard-nav-actions {
    display: none !important;
  }

  /* Exibe todos os painéis em Grid de 2 Colunas */
  .desktop-form-grid {
    display: grid !important;
    grid-template-columns: 1.05fr 1fr;
    gap: 20px;
    align-items: start;
  }

  .desktop-form-grid .wizard-pane {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    margin-bottom: 14px;
  }

  .desktop-submit-btn {
    display: block !important;
    margin-top: 14px;
  }
}

/* Mobile (< 900px): Onboarding Wizard em Etapas */
@media (max-width: 899px) {
  .auth-page-container.cadastro-wide {
    max-width: 540px;
    margin: 16px auto 60px;
  }

  .desktop-form-grid {
    display: block !important;
  }

  .desktop-submit-btn {
    display: none !important;
  }
}

