/* =========================================
   Estilos específicos da página de rota gerada (sugerida)
   ========================================= */

/* Forçar que o main desta página não tenha restrições de largura */
main {
    max-width: none !important;
    padding-left: 0;
    margin: 0;
    width: 100%;
}

/* Layout principal (grid) – aproveita bem a largura, com pequenas margens laterais */
.dashboard-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    height: calc(100vh - 80px);
    padding: 20px 10px;
    max-width: none;
    margin: 0;
    width: 100%;
}

/* Efeito glass (para consistência com rota_personalizada) */
.glass-effect {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px 0 rgba(26, 77, 76, 0.15);
}

.glass-border {
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px 0 rgba(26, 77, 76, 0.15);
}

/* Painel lateral */
.info-panel {
    border-radius: 0px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
    height: 100%;
    background: var(--cream, #fff9f0);
    border: 1px solid var(--fog, #e8ecef);
}

.panel-header h2 {
    font-size: 1.8rem;
    color: var(--deep-teal, #1a4d4c);
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.panel-header p {
    color: var(--stone-gray, #6b6f72);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Botões */
.actions-row {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-shrink: 0;
}

.btn-primary {
    flex-grow: 1;
    background: var(--deep-teal, #1a4d4c);
    color: white;
    border: 2px solid var(--deep-teal, #1a4d4c);
    padding: 12px 20px;
    border-radius: 0px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.btn-primary:hover {
    background: transparent;
    color: var(--deep-teal, #1a4d4c);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--clay-red, #c45d42);
}

.btn-icon {
    background: white;
    border: 2px solid var(--deep-teal, #1a4d4c);
    color: var(--stone-gray, #6b6f72);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--light-clay, #f0e4dd);
    color: var(--deep-teal, #1a4d4c);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--clay-red, #c45d42);
}

/* Status message (Estilo Stat Bar) */
#status-container {
    margin-bottom: 15px;
    padding: 10px 12px;
    background: var(--fog, #e8ecef);
    border: 1px solid var(--warm-sand, #e5d9cc);
    border-radius: var(--radius-sm, 0px);
    font-size: 0.8rem;
    color: var(--deep-teal, #1a4d4c);
    flex-shrink: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lista editável (arrastável) */
.lista-editavel {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
    margin-top: 10px;
}

/* Scrollbar personalizada */
.lista-editavel::-webkit-scrollbar {
    width: 6px;
}

.lista-editavel::-webkit-scrollbar-track {
    background: var(--off-white, #f8f6f2);
}

.lista-editavel::-webkit-scrollbar-thumb {
    background: var(--deep-teal, #1a4d4c);
    border-radius: 0px;
}

.lista-editavel::-webkit-scrollbar-thumb:hover {
    background: var(--clay-red, #c45d42);
}

.ponto-card {
    background: white;
    border: 2px solid var(--deep-teal, #1a4d4c);
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    cursor: grab;
    user-select: none;
    box-shadow: 3px 3px 0 var(--light-clay, #f0e4dd);
}

.ponto-card:active {
    cursor: grabbing;
    background: var(--cream, #fff9f0);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--clay-red, #c45d42);
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--fog, #e8ecef);
    border: 2px dashed var(--stone-gray, #6b6f72);
}

.drag-handle {
    color: var(--stone-gray, #6b6f72);
    margin-right: 12px;
    cursor: grab;
    font-size: 1.1rem;
}

.ponto-info {
    flex-grow: 1;
    padding-right: 10px;
}

.ponto-nome {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--charcoal, #2d2f31);
    display: block;
}

.ponto-ordem {
    font-size: 0.7rem;
    color: var(--deep-teal, #1a4d4c);
    font-weight: 700;
    margin-right: 5px;
    background: var(--light-clay, #f0e4dd);
    padding: 2px 6px;
    border-radius: 0px;
    text-transform: uppercase;
}

.btn-delete {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: var(--clay-red, #c45d42);
    color: white;
    margin-left: 10px;
}

.btn-delete:hover {
    background: var(--deep-teal, #1a4d4c);
    transform: scale(1.05);
}

/* Filtro de mobilidade */
.filter-box {
    margin-bottom: 20px;
    padding: 12px;
    background: var(--light-clay, #f0e4dd);
    border: 1px solid var(--warm-sand, #e5d9cc);
    border-radius: 0px;
    flex-shrink: 0;
}

.toggle-control {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--deep-teal, #1a4d4c);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-control input { 
    display: none; 
}

.control-indicator {
    width: 34px;
    height: 18px;
    background: var(--stone-gray, #6b6f72);
    border-radius: 15px;
    position: relative;
    transition: 0.3s;
}

.control-indicator:before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

input:checked + .control-indicator {
    background: var(--deep-teal, #1a4d4c);
}

input:checked + .control-indicator:before {
    transform: translateX(16px);
}

/* Badge de acessibilidade */
.badge-acessivel {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    color: var(--deep-teal, #1a4d4c);
    background: var(--fog, #e8ecef);
    padding: 2px 8px;
    border-radius: 0px;
    font-weight: 700;
    margin-top: 4px;
    width: fit-content;
    text-transform: uppercase;
}

/* Mapa (Estilos Corrigidos para Bater com Rota Personalizada) */
.map-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.map-controls {
    flex-shrink: 0;
}

.main-map-container {
    flex-grow: 1;
    min-height: 0;
    height: auto;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    border: 3px solid var(--deep-teal);
}

#mapa-personalizado {
    height: 100%;
    width: 100%;
}

.glass-border {
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

/* Responsividade */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto 500px;
        height: auto;
        padding: 10px;
    }
    
    .info-panel {
        max-height: 500px;
    }
    
    .map-panel {
        height: 400px;
    }
    
    .panel-header h2 {
        font-size: 1.4rem;
    }
    
    .actions-row {
        flex-wrap: wrap;
    }
    
    .btn-icon {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 768px) {
    .info-panel {
        padding: 20px;
    }
    
    .panel-header h2 {
        font-size: 1.3rem;
    }
    
    .btn-primary {
        padding: 10px 16px;
        font-size: 0.75rem;
    }
    
    .ponto-card {
        padding: 10px;
    }
    
    .ponto-nome {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .info-panel {
        padding: 15px;
    }
    
    .panel-header h2 {
        font-size: 1.2rem;
    }
    
    .btn-primary {
        padding: 8px 12px;
        font-size: 0.7rem;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
    }
    
    .ponto-card {
        padding: 8px;
    }
    
    .ponto-nome {
        font-size: 0.8rem;
    }
    
    .btn-delete {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

.map-controls glass-effect{
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.route-info{
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.95rem;
    color: #444;
}

.fas fa-leaf{
    color: #4CAF50;
}