    :root {
      --primary: #1a3a6b;
      --primary-dark: #122c55;
      --primary-light: #dce8f8;
      --secondary: #e87722;
      --success: #16a34a;
      --success-light: #dcfce7;
      --warning: #d97706;
      --warning-light: #fef3c7;
      --danger: #dc2626;
      --danger-light: #fee2e2;
      --gray-50: #f9fafb;
      --gray-100: #f3f4f6;
      --gray-200: #e5e7eb;
      --gray-300: #d1d5db;
      --gray-400: #9ca3af;
      --gray-500: #6b7280;
      --gray-600: #4b5563;
      --gray-700: #374151;
      --gray-800: #1f2937;
      --gray-900: #111827;
      --sidebar-width: 260px;
      --header-height: 64px;
      --radius: 12px;
      --radius-sm: 8px;
      --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
      --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
      --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    html {
      overflow-x: hidden;
      overflow-y: auto;
      width: 100%;
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--gray-50);
      color: var(--gray-800);
      display: grid;
      grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
      min-height: 100vh;
      width: 100%;
      max-width: 100vw;
      overflow-x: hidden;
    }

    /* ===== SIDEBAR ===== */
    /* Grid column (not position:fixed) so its width participates directly in
       the grid's track sizing — no compensating margin on #main needed, so
       there is no possible mismatch/gap between the two. position:sticky
       keeps it pinned to the viewport while the page scrolls, same visual
       result as position:fixed without the layout ambiguity. */
    #sidebar {
      width: 100%;
      height: 100vh;
      max-height: 100vh; /* trava absoluta: a sidebar nunca pode ultrapassar a viewport, não importa o que aconteça dentro */
      overflow: hidden; /* a sidebar em si nunca mostra sua própria barra de rolagem — só .sidebar-nav deve rolar */
      position: sticky;
      top: 0;
      background: linear-gradient(180deg, #0d2240 0%, #1a3a6b 100%);
      display: flex;
      flex-direction: column;
      z-index: 100;
      transition: transform 0.3s ease;
    }

    .sidebar-logo {
      flex: 0 0 auto; /* nunca cresce nem encolhe: mantém seu tamanho natural no topo */
      padding: 20px 20px 18px;
      border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Correção RC1.0.5 (achado P2-001): o logo oficial (assets/logo.png,
       arquivo original, sem chroma-key ou recorte) precisa de um fundo
       claro para manter contraste pleno — medido: ~38% dos pixels do logo
       ficavam com contraste <1.5:1 direto sobre o azul-marinho da sidebar,
       essencialmente invisíveis. Em vez de reeditar a imagem, aplicamos um
       "cartão" claro e discreto ao redor dela — mesma linguagem visual de
       raio/sombra do resto do Design System (11_Design_System.md). */
    .sidebar-logo .logo-card {
      background: #ffffff;
      border-radius: var(--radius);
      padding: 12px 16px;
      box-shadow: var(--shadow);
    }

    .sidebar-logo .logo-card img {
      width: 100%;
      max-width: 180px;
      height: auto;
      object-fit: contain;
      display: block;
      margin: 0 auto;
    }

    .sidebar-logo h1 {
      color: #fff;
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -0.5px;
    }

    .sidebar-logo span {
      color: #f5c290;
      font-size: 12px;
      font-weight: 400;
      display: block;
      margin-top: 2px;
    }

    .sidebar-logo .logo-icon {
      width: 40px; height: 40px;
      background: linear-gradient(135deg, #e87722, #1a3a6b);
      border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 10px;
      font-size: 20px;
    }

    .sidebar-nav {
      flex: 1 1 auto; /* único item que pode encolher — absorve toda a altura que faltar */
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding: 16px 12px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    /* Barra de rolagem visível (não overlay) para deixar claro que há mais
       itens abaixo, em vez de um corte silencioso. */
    .sidebar-nav::-webkit-scrollbar { width: 6px; }
    .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
    .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 3px; }
    .sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }
    .sidebar-nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.25) transparent; }

    .nav-section-title {
      color: rgba(245,194,144,0.7);
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
      padding: 12px 8px 6px;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      border-radius: 8px;
      color: rgba(255,255,255,0.7);
      cursor: pointer;
      transition: all 0.2s;
      font-size: 14px;
      font-weight: 500;
      text-decoration: none;
    }

    .nav-item:hover {
      background: rgba(255,255,255,0.1);
      color: #fff;
    }

    .nav-item.active {
      background: rgba(232,119,34,0.2);
      color: #fff;
      border-left: 3px solid #e87722;
    }

    .nav-item i { width: 18px; text-align: center; font-size: 15px; }

    .sidebar-footer {
      flex: 0 0 auto; /* nunca cresce nem encolhe: mantém seu tamanho natural no rodapé */
      padding: 16px 12px;
      border-top: 1px solid rgba(255,255,255,0.1);
    }

    .sidebar-footer .version {
      color: rgba(245,194,144,0.5);
      font-size: 11px;
      text-align: center;
    }

    /* ===== MAIN CONTENT ===== */
    #main {
      min-width: 0; /* segunda linha de defesa: item de grid também tem min-width:auto por padrão */
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    /* ===== HEADER ===== */
    #header {
      height: var(--header-height);
      background: #fff;
      border-bottom: 1px solid var(--gray-200);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 28px;
      position: sticky;
      top: 0;
      z-index: 50;
      box-shadow: var(--shadow);
    }

    .header-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--gray-900);
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    /* ===== PAGES ===== */
    .page {
      display: none;
      padding: 28px;
      flex: 1;
      min-width: 0;
      max-width: 100%;
    }

    .page.active { display: block; }

    /* ===== CARDS ===== */
    .card {
      background: #fff;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      border: 1px solid var(--gray-200);
      min-width: 0;
      max-width: 100%;
    }

    .card-header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--gray-100);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .card-title {
      font-size: 16px;
      font-weight: 700;
      color: var(--gray-900);
    }

    .card-body { padding: 24px; }

    /* ===== STATS GRID ===== */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px;
      margin-bottom: 28px;
    }

    /* Grid de filtros (ex: tela Rotas): cada campo é uma célula independente
       que pode quebrar para a linha seguinte em telas estreitas, em vez de
       forçar múltiplos inputs de data lado a lado dentro de uma coluna. */
    .filters-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 16px;
    }

    /* SPRINT FINAL — ITEM 1: Administração de Rotas (modo Admin).
       Causa raiz do achado "grande área vazia": filtros e conteúdo eram
       dois cards empilhados, cada um ocupando 100% da largura — um
       .filters-grid de 6 campos curtos esticado à largura total do
       conteúdo criava espaçamento artificial. Layout de 2 colunas
       (filtros estreitos à esquerda, conteúdo largo à direita) resolve
       sem tocar em nenhum filtro nem no comportamento funcional. */
    .routes-admin-layout {
      display: grid;
      grid-template-columns: 280px 1fr;
      gap: 20px;
      align-items: start;
    }
    .routes-admin-filters-grid {
      grid-template-columns: 1fr; /* coluna estreita: um campo por linha, nunca dois lado a lado espremidos */
    }
    @media (max-width: 900px) {
      .routes-admin-layout {
        grid-template-columns: 1fr; /* telas menores: filtros empilhados acima do conteúdo, nunca cortados */
      }
      .routes-admin-filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* largura disponível permite voltar a várias colunas nos filtros */
      }
    }

    .audit-block-label {
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--gray-500);
      margin: 20px 0 10px;
    }
    .audit-block-label:first-of-type { margin-top: 4px; }

    .stat-card {
      background: #fff;
      border-radius: var(--radius);
      padding: 24px;
      box-shadow: var(--shadow);
      border: 1px solid var(--gray-200);
      display: flex;
      align-items: flex-start;
      gap: 16px;
    }

    .stat-icon {
      width: 48px; height: 48px;
      border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      font-size: 20px;
      flex-shrink: 0;
    }

    .stat-icon.blue { background: var(--primary-light); color: var(--primary); }
    .stat-icon.purple { background: #ede9fe; color: var(--secondary); }
    .stat-icon.green { background: var(--success-light); color: var(--success); }
    .stat-icon.orange { background: var(--warning-light); color: var(--warning); }

    .stat-info h3 {
      font-size: 28px;
      font-weight: 800;
      color: var(--gray-900);
      line-height: 1;
    }

    .stat-info p {
      font-size: 13px;
      color: var(--gray-500);
      margin-top: 4px;
      font-weight: 500;
    }

    /* ===== BUTTONS ===== */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 9px 18px;
      border-radius: var(--radius-sm);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: all 0.2s;
      text-decoration: none;
    }

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

    .btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

    .btn-secondary {
      background: var(--gray-100);
      color: var(--gray-700);
    }

    .btn-secondary:hover { background: var(--gray-200); }

    .btn-success {
      background: var(--success);
      color: #fff;
    }

    .btn-success:hover { background: #15803d; }

    .btn-danger {
      background: var(--danger);
      color: #fff;
    }

    .btn-danger:hover { background: #b91c1c; }

    .btn-warning {
      background: #d97706;
      color: #fff;
    }

    .btn-warning:hover { background: #b45309; }

    .btn-outline {
      background: transparent;
      color: var(--primary);
      border: 1.5px solid var(--primary);
    }

    .btn-outline:hover { background: var(--primary-light); }

    .btn-sm { padding: 6px 12px; font-size: 13px; }
    .btn-lg { padding: 12px 24px; font-size: 15px; }

    .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

    /* ===== FORMS ===== */
    .form-group { margin-bottom: 18px; min-width: 0; }

    .form-label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--gray-700);
      margin-bottom: 6px;
    }

    .form-control {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      padding: 10px 14px;
      border: 1.5px solid var(--gray-300);
      border-radius: var(--radius-sm);
      font-size: 14px;
      font-family: 'Inter', sans-serif;
      color: var(--gray-800);
      transition: border-color 0.2s, box-shadow 0.2s;
      background: #fff;
    }

    .form-control:focus {
      outline: none;
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }

    .form-control::placeholder { color: var(--gray-400); }

    .form-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 16px;
    }

    .form-row-3 {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
      gap: 16px;
    }

    /* ===== TABLE ===== */
    .table-container {
      overflow-x: auto;
      max-width: 100%;
      border-radius: var(--radius);
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
    }

    thead th {
      background: var(--gray-50);
      padding: 12px 16px;
      text-align: left;
      font-size: 12px;
      font-weight: 600;
      color: var(--gray-500);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      border-bottom: 1px solid var(--gray-200);
    }

    tbody tr {
      border-bottom: 1px solid var(--gray-100);
      transition: background 0.15s;
    }

    tbody tr:hover { background: var(--gray-50); }
    tbody tr:last-child { border-bottom: none; }

    tbody td {
      padding: 14px 16px;
      color: var(--gray-700);
      vertical-align: middle;
    }

    /* A7 (retomada pós-teste do proprietário) — achado "responsividade da
       tela Rotas": em larguras móveis (320-600px testadas em Chrome real),
       a tabela de Rotas (9 colunas) transbordava o container e a coluna
       "Ações" ficava fora da área visível sem o usuário descobrir que
       precisava rolar horizontalmente. Fixar a coluna à direita durante o
       scroll é o padrão responsivo padrão para tabelas largas — não exige
       reestruturar a tabela em cards. Classe reutilizável (não específica
       da tela de Rotas) para as demais tabelas largas do sistema, se
       precisarem do mesmo tratamento no futuro. */
    .sticky-actions-col {
      position: sticky;
      right: 0;
      background: #fff;
      box-shadow: -2px 0 4px rgba(0,0,0,0.06);
    }
    thead th.sticky-actions-col { background: var(--gray-50); }
    tbody tr:hover .sticky-actions-col { background: var(--gray-50); }

    /* ===== BADGES ===== */
    .badge {
      display: inline-flex;
      align-items: center;
      padding: 3px 10px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
    }

    .badge-blue { background: var(--primary-light); color: var(--primary); }
    .badge-green { background: var(--success-light); color: var(--success); }
    .badge-orange { background: var(--warning-light); color: var(--warning); }
    .badge-red { background: var(--danger-light); color: var(--danger); }
    .badge-purple { background: #ede9fe; color: var(--secondary); }
    .badge-gray { background: var(--gray-100); color: var(--gray-600); }

    /* ===== MODAL ===== */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-overlay.open { display: flex; }

    .modal {
      background: #fff;
      border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      width: 100%;
      max-width: 560px;
      max-height: 90vh;
      overflow-y: auto;
      animation: modalIn 0.2s ease;
    }

    .modal-lg {
      max-width: 960px;
    }

    @keyframes modalIn {
      from { opacity: 0; transform: scale(0.95) translateY(-10px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }

    .modal-header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--gray-200);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .modal-title { font-size: 18px; font-weight: 700; }

    .modal-close {
      width: 32px; height: 32px;
      border-radius: 8px;
      border: none;
      background: var(--gray-100);
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      color: var(--gray-500);
      font-size: 16px;
      transition: background 0.2s;
    }

    .modal-close:hover { background: var(--gray-200); }

    .modal-body { padding: 24px; }

    .modal-footer {
      padding: 16px 24px;
      border-top: 1px solid var(--gray-200);
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }

    /* ===== ALERTS ===== */
    .alert {
      padding: 14px 18px;
      border-radius: var(--radius-sm);
      font-size: 14px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 16px;
    }

    .alert-success { background: var(--success-light); color: #166534; border-left: 4px solid var(--success); }
    .alert-warning { background: var(--warning-light); color: #92400e; border-left: 4px solid var(--warning); }
    .alert-danger { background: var(--danger-light); color: #991b1b; border-left: 4px solid var(--danger); }
    .alert-info { background: var(--primary-light); color: #1e40af; border-left: 4px solid var(--primary); }

    /* ===== MAP ===== */
    #map {
      height: 480px;
      width: 100%;
      min-width: 0;
      border-radius: var(--radius);
      border: 1px solid var(--gray-200);
      overflow: hidden;
      position: relative;
    }

    /* Estado degradado: biblioteca de mapas indisponível (RC1.0.5, causa
       raiz P0-001). Reaproveita a linguagem visual de .empty-state — nunca
       trava a tela, nunca finge que o mapa está funcionando. */
    #map.map-unavailable, #drilldown-map.map-unavailable {
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--gray-50);
    }
    .map-unavailable-inner { text-align: center; padding: 24px; max-width: 380px; }
    .map-unavailable-inner i { font-size: 40px; color: var(--gray-400); margin-bottom: 14px; display: block; }
    .map-unavailable-inner h3 { font-size: 16px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
    .map-unavailable-inner p { font-size: 13px; color: var(--gray-500); margin-bottom: 10px; }
    .map-unavailable-inner .map-unavailable-hint { font-size: 12px; color: var(--gray-400); }
    .map-unavailable-inner .btn { margin-top: 8px; }

    /* Aviso não-bloqueante: mapa/biblioteca OK, só os tiles (imagens do
       servidor de mapas) não carregaram — marcadores/rotas continuam
       visíveis por cima. */
    .map-tiles-warning {
      position: absolute;
      left: 8px; right: 8px; bottom: 8px;
      z-index: 1000;
      background: var(--warning-light);
      color: #92400e;
      border-left: 4px solid var(--warning);
      border-radius: var(--radius-sm);
      padding: 8px 12px;
      font-size: 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      box-shadow: var(--shadow);
    }

    /* ===== ROUTE RESULT =====
       PR3 item 3: depois de gerar uma rota, a sequência de paradas deve
       aproveitar a largura disponível (a coluna de resultado já é mais larga
       que o painel de configuração) em vez de ficar numa lista estreita de
       coluna única com muito espaço vazio ao lado. */
    #route-stops-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      column-gap: 28px;
    }

    .route-stop {
      display: flex;
      align-items: flex-start;
      gap: 14px;
      padding: 14px 0;
      border-bottom: 1px solid var(--gray-100);
    }

    .route-stop:last-child { border-bottom: none; }

    .stop-number {
      width: 32px; height: 32px;
      border-radius: 50%;
      background: var(--primary);
      color: #fff;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px;
      font-weight: 700;
      flex-shrink: 0;
    }

    .stop-number.home { background: var(--success); }
    .stop-number.last { background: var(--warning); }

    .stop-info h4 { font-size: 14px; font-weight: 600; color: var(--gray-900); }
    .stop-info p { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

    .stop-meta {
      margin-left: auto;
      text-align: right;
      flex-shrink: 0;
    }

    .stop-meta .distance { font-size: 13px; color: var(--gray-500); }
    .stop-meta .cost { font-size: 14px; font-weight: 700; color: var(--success); }

    /* ===== PROGRESS ===== */
    .progress-bar {
      height: 8px;
      background: var(--gray-200);
      border-radius: 4px;
      overflow: hidden;
      margin-top: 8px;
    }

    .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--primary), var(--secondary));
      border-radius: 4px;
      transition: width 0.5s ease;
    }

    /* ===== TABS ===== */
    .tabs {
      display: flex;
      gap: 4px;
      border-bottom: 2px solid var(--gray-200);
      margin-bottom: 24px;
    }

    .tab-btn {
      padding: 10px 18px;
      font-size: 14px;
      font-weight: 600;
      color: var(--gray-500);
      cursor: pointer;
      border: none;
      background: none;
      border-bottom: 2px solid transparent;
      margin-bottom: -2px;
      transition: all 0.2s;
    }

    .tab-btn.active {
      color: var(--primary);
      border-bottom-color: var(--primary);
    }

    .tab-btn:hover { color: var(--gray-700); }

    .tab-content { display: none; }
    .tab-content.active { display: block; }

    /* ===== EMPTY STATE ===== */
    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--gray-400);
    }

    .empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
    .empty-state h3 { font-size: 18px; font-weight: 600; color: var(--gray-600); margin-bottom: 8px; }
    .empty-state p { font-size: 14px; }

    /* ===== TOAST ===== */
    #toast-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .toast {
      background: var(--gray-900);
      color: #fff;
      padding: 14px 18px;
      border-radius: var(--radius-sm);
      font-size: 14px;
      font-weight: 500;
      box-shadow: var(--shadow-lg);
      display: flex;
      align-items: center;
      gap: 10px;
      animation: toastIn 0.3s ease;
      min-width: 280px;
      max-width: 380px;
    }

    .toast.success { background: #166534; border-left: 4px solid var(--success); }
    .toast.error { background: #991b1b; border-left: 4px solid var(--danger); }
    .toast.warning { background: #92400e; border-left: 4px solid var(--warning); }

    @keyframes toastIn {
      from { opacity: 0; transform: translateX(20px); }
      to { opacity: 1; transform: translateX(0); }
    }

    /* ===== LOADING SPINNER ===== */
    .spinner {
      display: inline-block;
      width: 18px; height: 18px;
      border: 2px solid rgba(255,255,255,0.3);
      border-top-color: #fff;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    /* ===== CITY FARE CARD ===== */
    .fare-card {
      background: #fff;
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius);
      padding: 20px;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .fare-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }

    .fare-card.selected { border-color: var(--primary); background: var(--primary-light); }

    /* ===== SIMULATOR LAYOUT ===== */
    .simulator-layout {
      display: grid;
      grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
      gap: 24px;
      align-items: start;
      min-width: 0;
    }

    .simulator-panel {
      background: #fff;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      border: 1px solid var(--gray-200);
      overflow: hidden;
    }

    /* ===== CSV IMPORT ===== */
    .drop-zone {
      border: 2px dashed var(--gray-300);
      border-radius: var(--radius);
      padding: 40px;
      text-align: center;
      cursor: pointer;
      transition: all 0.2s;
      background: var(--gray-50);
    }

    .drop-zone:hover, .drop-zone.drag-over {
      border-color: var(--primary);
      background: var(--primary-light);
    }

    .drop-zone i { font-size: 36px; color: var(--gray-400); margin-bottom: 12px; display: block; }
    .drop-zone h3 { font-size: 16px; font-weight: 600; color: var(--gray-700); }
    .drop-zone p { font-size: 13px; color: var(--gray-500); margin-top: 6px; }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 1180px) {
      .simulator-layout { grid-template-columns: minmax(0, 1fr); }
    }

    @media (max-width: 768px) {
      body { grid-template-columns: minmax(0, 1fr); }
      #sidebar {
        position: fixed;
        left: 0; top: 0;
        width: var(--sidebar-width);
        height: 100vh;
        transform: translateX(-100%);
      }
      #sidebar.open { transform: translateX(0); }
      .simulator-layout { grid-template-columns: minmax(0, 1fr); }
      .form-row, .form-row-3 { grid-template-columns: minmax(0, 1fr); }
    }

    /* ===== PRINT STYLES ===== */
    @media print {
      #sidebar, #header, .no-print { display: none !important; }
      /* A6/B4 (retomada pós-teste do proprietário) — #toast-container não
         estava coberto pela regra de impressão: o toast "Preparando
         impressão..." (disparado por exportPDF() logo antes de
         window.print()) ficava capturado no PDF/impressão. */
      #toast-container { display: none !important; }
      body { grid-template-columns: minmax(0, 1fr); }
      .page { display: block !important; }
      /* SPRINT FINAL — ITEM 6: consolidado relocado para #page-dashboard —
         em vez de fixar IDs de página, mostra sempre a página com .active
         (mecanismo padrão já existente), então funciona tanto para o
         consolidado (Visão Geral) quanto para o relatório individual. */
      .page:not(.active) { display: none !important; }
    }

    /* ===== MISC ===== */
    .divider { height: 1px; background: var(--gray-200); margin: 20px 0; }
    .text-muted { color: var(--gray-500); font-size: 13px; }
    .text-success { color: var(--success); }
    .text-danger { color: var(--danger); }
    .text-primary { color: var(--primary); }
    .fw-bold { font-weight: 700; }
    .mt-4 { margin-top: 16px; }
    .mb-4 { margin-bottom: 16px; }
    .flex { display: flex; }
    .items-center { align-items: center; }
    .justify-between { justify-content: space-between; }
    .gap-2 { gap: 8px; }
    .gap-3 { gap: 12px; }
    .gap-4 { gap: 16px; }
    .w-full { width: 100%; }
    .grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
    .grid-3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
    .grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
    .page-header { margin-bottom: 24px; }
    .page-header h2 { font-size: 24px; font-weight: 800; color: var(--gray-900); }
    .page-header p { font-size: 14px; color: var(--gray-500); margin-top: 4px; }
    .avatar {
      width: 36px; height: 36px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--primary), var(--secondary));
      color: #fff;
      display: flex; align-items: center; justify-content: center;
      font-size: 14px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .cost-summary {
      background: linear-gradient(135deg, #0d2240, #1a3a6b);
      color: #fff;
      border-radius: var(--radius);
      padding: 24px;
      margin-top: 20px;
    }
    .cost-summary h3 { font-size: 14px; font-weight: 500; opacity: 0.8; margin-bottom: 8px; }
    .cost-summary .big-number { font-size: 36px; font-weight: 800; }
    .cost-summary .sub { font-size: 13px; opacity: 0.7; margin-top: 4px; }
    .cost-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
    .cost-item { background: rgba(255,255,255,0.1); border-radius: 8px; padding: 12px; }
    .cost-item .label { font-size: 12px; opacity: 0.7; }
    .cost-item .value { font-size: 18px; font-weight: 700; margin-top: 4px; }
    select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
    .checkbox-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px; cursor: pointer; transition: all 0.2s; }
    .checkbox-item:hover { border-color: var(--primary); background: var(--primary-light); }
    .checkbox-item.selected { border-color: var(--primary); background: var(--primary-light); }
    .checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
    .stores-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
    .stores-list::-webkit-scrollbar { width: 4px; }
    .stores-list::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 2px; }
    .stores-list::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }
    .report-header { background: linear-gradient(135deg, #0d2240, #1a3a6b); color: #fff; padding: 32px; border-radius: var(--radius) var(--radius) 0 0; }
    .report-header h1 { font-size: 28px; font-weight: 800; }
    .report-header p { opacity: 0.8; margin-top: 6px; }
    .report-meta { display: flex; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
    .report-meta-item .label { font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.5px; }
    .report-meta-item .value { font-size: 16px; font-weight: 700; margin-top: 2px; }
