
    /* =========================
       RESET E BASE
    ========================= */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100vh;
      padding: 20px;
      color: #2d3748;
    }

    .container {
      max-width: 100%;
      margin: 0 auto;
      padding: 0 20px;
    }

    /* =========================
       HEADER
    ========================= */
    .header {
      text-align: center;
      color: white;
      margin-bottom: 30px;
    }

    .header h1 {
      font-size: 2.5rem;
      margin-bottom: 10px;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .header p {
      font-size: 1.1rem;
      opacity: 0.9;
    }

    /* =========================
       GRID PRINCIPAL - 3 COLUNAS
    ========================= */
    .main-grid {
      display: grid;
      grid-template-columns: 380px 1fr 350px;
      gap: 20px;
      height: calc(100vh - 200px);
      min-height: 600px;
    }

    /* Responsivo: Tablet */
    @media (max-width: 1400px) {
      .main-grid {
        grid-template-columns: 350px 1fr 320px;
      }
    }

    @media (max-width: 1200px) {
      .main-grid {
        grid-template-columns: 1fr 1fr;
        height: auto;
      }

      .sidebar-right {
        grid-column: 1 / -1;
      }
    }

    /* Responsivo: Mobile */
    @media (max-width: 768px) {
      .main-grid {
        grid-template-columns: 1fr;
      }

      .container {
        padding: 0 10px;
      }

      .header h1 {
        font-size: 2rem;
      }
    }

    /* =========================
       SIDEBARS
    ========================= */
    .sidebar-left,
    .sidebar-right {
      display: flex;
      flex-direction: column;
      gap: 20px;
      overflow-y: auto;
      max-height: 100%;
    }

    /* Custom scrollbar */
    .sidebar-left::-webkit-scrollbar,
    .sidebar-right::-webkit-scrollbar {
      width: 8px;
    }

    .sidebar-left::-webkit-scrollbar-track,
    .sidebar-right::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 10px;
    }

    .sidebar-left::-webkit-scrollbar-thumb,
    .sidebar-right::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.3);
      border-radius: 10px;
    }

    /* =========================
       CARD / CONTAINERS
    ========================= */
    .card {
      background: white;
      border-radius: 16px;
      padding: 25px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .card h2 {
      color: #2d3748;
      margin-bottom: 20px;
      font-size: 1.25rem;
    }

    /* Card de mapa ocupa altura total */
    .map-card {
      padding: 0;
      height: 100%;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    /* =========================
       MAPA
    ========================= */
    .map-container {
      flex: 1;
      position: relative;
      min-height: 500px;
    }

    #map {
      height: 100%;
      width: 100%;
      border-radius: 16px;
    }

    /* =========================
       FORMULÁRIO
    ========================= */
    .form-group {
      margin-bottom: 16px;
    }

    label {
      display: block;
      font-weight: 600;
      margin-bottom: 6px;
      color: #333;
      font-size: 0.9rem;
    }

    input[type="text"],
    input[type="number"] {
      width: 100%;
      padding: 10px 14px;
      border: 2px solid #e2e8f0;
      border-radius: 8px;
      font-size: 0.95rem;
      transition: border-color 0.3s, box-shadow 0.3s;
    }

    input:focus {
      outline: none;
      border-color: #667eea;
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    input[type=number]::-webkit-inner-spin-button,
    input[type=number]::-webkit-outer-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    .coords-group {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    /* =========================
       BOTÕES
    ========================= */
    button {
      width: 100%;
      padding: 12px 20px;
      font-size: 0.95rem;
      font-weight: 600;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.25s ease;
    }

    button:focus {
      outline: 3px solid rgba(102, 126, 234, 0.4);
      outline-offset: 2px;
    }

    button:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

    .btn-primary {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
    }

    .btn-primary:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }

    .btn-success {
      background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
      color: white;
      margin-top: 12px;
    }

    .btn-success:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
    }

    .btn-map {
      background: #3498db;
      color: white;
      margin-top: 8px;
      font-size: 0.9rem;
      padding: 10px 16px;
    }

    .btn-map:hover:not(:disabled) {
      background: #2980b9;
    }

    /* =========================
       RESULTADOS
    ========================= */
    .result {
      display: none;
      margin-top: 20px;
      animation: slideIn 0.3s ease;
    }

    .result.show {
      display: block;
    }

    @keyframes slideIn {
      from {
        opacity: 0;
        transform: translateY(10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .result-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-top: 15px;
    }

    .result-item {
      background: #f7fafc;
      padding: 12px;
      border-radius: 8px;
      border-left: 4px solid #667eea;
    }

    .result-item .label {
      font-size: 0.8rem;
      color: #718096;
      margin-bottom: 4px;
    }

    .result-item .value {
      font-size: 1.2rem;
      font-weight: 700;
      color: #2d3748;
    }

    /* =========================
       DIFICULDADE
    ========================= */
    .difficulty {
      display: inline-block;
      padding: 6px 12px;
      border-radius: 20px;
      font-size: 0.85rem;
      font-weight: 600;
      text-transform: uppercase;
    }

    .difficulty.easy {
      background: #c6f6d5;
      color: #22543d;
    }

    .difficulty.moderate {
      background: #feebc8;
      color: #7c2d12;
    }

    .difficulty.hard {
      background: #fed7d7;
      color: #742a2a;
    }

    .difficulty.extreme {
      background: #feb2b2;
      color: #742a2a;
    }

    /* =========================
       ALERTAS
    ========================= */
    .warnings {
      background: #fff5f5;
      border-left: 4px solid #fc8181;
      padding: 12px;
      border-radius: 8px;
      margin-top: 15px;
    }

    .warnings-title {
      font-weight: 600;
      color: #c53030;
      margin-bottom: 8px;
    }

    .warning-item {
      color: #742a2a;
      margin-bottom: 5px;
      font-size: 0.85rem;
    }

    /* =========================
       LOADING
    ========================= */
    .loading {
      display: inline-block;
      width: 18px;
      height: 18px;
      border: 3px solid rgba(255, 255, 255, 0.3);
      border-radius: 50%;
      border-top-color: white;
      animation: spin 0.8s linear infinite;
    }

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

    /* =========================
       ROTAS SALVAS
    ========================= */
    .route-card {
      background: #f7fafc;
      padding: 12px;
      border-radius: 8px;
      margin-bottom: 10px;
      transition: all 0.2s;
      cursor: pointer;
      border: 2px solid transparent;
    }

    .route-card:hover {
      background: #edf2f7;
      border-color: #667eea;
      transform: translateX(3px);
    }

    .route-info h3 {
      color: #2d3748;
      margin-bottom: 6px;
      font-size: 1rem;
    }

    .route-meta {
      font-size: 0.8rem;
      color: #718096;
      margin-bottom: 10px;
    }

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

    .route-actions button {
      padding: 6px 12px;
      font-size: 0.8rem;
      width: auto;
      flex: 1;
    }

    .btn-view {
      background: #3498db;
      color: white;
    }

    .btn-view:hover {
      background: #2980b9;
    }

    .btn-delete {
      background: #fc8181;
      color: white;
    }

    .btn-delete:hover {
      background: #f56565;
    }

    /* =========================
       EMPTY STATE
    ========================= */
    .empty-state {
      text-align: center;
      padding: 30px;
      color: #718096;
    }

    .empty-state p:first-child {
      font-size: 1rem;
      margin-bottom: 8px;
    }

    .empty-state p:last-child {
      font-size: 0.85rem;
      opacity: 0.8;
    }

    /* =========================
       TOAST
    ========================= */
    .toast {
      position: fixed;
      top: 20px;
      right: 20px;
      background: white;
      padding: 16px 24px;
      border-radius: 8px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      display: none;
      animation: slideInRight 0.3s ease;
      z-index: 10000;
      max-width: 400px;
    }

    .toast.show {
      display: block;
    }

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

    .toast.success {
      border-left: 4px solid #38ef7d;
    }

    .toast.error {
      border-left: 4px solid #fc8181;
    }

    /* =========================
       MISC
    ========================= */
    .cep-badge {
      display: inline-block;
      margin-top: 4px;
      font-size: 0.75rem;
      color: #2563eb;
      font-weight: 500;
    }

    .hidden {
      display: none;
    }

    hr {
      border: none;
      border-top: 2px solid #e2e8f0;
      margin: 20px 0;
    }

    /* =========================
       SCROLLBAR CUSTOMIZADO
    ========================= */
    ::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }

    ::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb {
      background: #cbd5e0;
      border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: #a0aec0;
    }
