body { margin: 0; display: flex; height: 100vh; font-family: 'Segoe UI', sans-serif; }

.sidebar {
    width: 320px; background: #2c3e50; color: white; padding: 20px;
    overflow-y: auto; box-shadow: 2px 0 10px rgba(0,0,0,0.3); z-index: 1000;
    display: flex; flex-direction: column;
}

#map { flex-grow: 1; height: 100%; z-index: 1; }

h2 { font-size: 1.5rem; margin-bottom: 15px; border-bottom: 1px solid #34495e; padding-bottom: 10px; color: #ecf0f1; }
h3 { font-size: 1rem; color: #f1c40f; margin-top: 0; margin-bottom: 15px; }

/* BADGE DE VERSIÓN DEMO */
.demo-badge {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.12), rgba(230, 126, 34, 0.12));
    border: 1px solid rgba(241, 196, 15, 0.35);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 15px;
    font-size: 0.8rem;
}
.demo-badge-title {
    font-weight: bold;
    color: #f1c40f;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.demo-badge-stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #bdc3c7;
    font-size: 0.75rem;
}
.demo-badge-stats strong {
    color: #2ecc71;
    font-size: 0.85rem;
}

.panel { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 8px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.05); }

.input-group { margin-bottom: 10px; }
input, select { width: 100%; padding: 10px; border-radius: 4px; border: none; box-sizing: border-box; background: #ecf0f1; color: #2c3e50; }
input:focus, select:focus { outline: 2px solid #3498db; }

.btn-primary { width: 100%; padding: 12px; background: #3498db; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; transition: background 0.3s; }
.btn-primary:hover { background: #2980b9; }
.btn-primary:disabled { background: #7f8c8d; cursor: not-allowed; opacity: 0.7; }

.btn-secondary { width: 100%; padding: 8px; background: #7f8c8d; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 8px; transition: background 0.3s; }
.btn-secondary:hover { background: #95a5a6; }

.costo-info { font-size: 0.8rem; color: #bdc3c7; margin-top: 8px; font-style: italic; line-height: 1.3; }
.highlight { color: #2ecc71; font-weight: bold; font-size: 1.2rem; margin-top: 5px; }
.hidden { display: none !important; }

/* MENSAJES DE ESTADO / FEEDBACK */
.status-msg {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1.3;
    display: none;
    transition: all 0.3s ease;
}
.status-info {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid #3498db;
    color: #e8f4fc;
}
.status-success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #eafaf1;
}
.status-warning {
    background: rgba(241, 196, 15, 0.2);
    border: 1px solid #f1c40f;
    color: #fef9e7;
}
.status-error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    color: #fdeed9;
}

.tip-text {
    font-size: 0.75rem;
    color: #95a5a6;
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1.2;
}

/* LISTA DE TRAMOS */
#detalle-tramos { margin-top: 15px; border-top: 1px solid #444; padding-top: 10px; max-height: 250px; overflow-y: auto; }
#detalle-tramos::-webkit-scrollbar { width: 6px; }
#detalle-tramos::-webkit-scrollbar-thumb { background: #7f8c8d; border-radius: 3px; }
.tramo-titulo { font-size: 0.9rem; color: #fff; margin-bottom: 10px; font-weight: bold; opacity: 0.8; }
.tramo-item { background: rgba(0,0,0,0.2); padding: 8px; margin-bottom: 5px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; border-left: 3px solid #3498db; }
.tramo-dir { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.tramo-km { color: #2ecc71; font-weight: bold; font-size: 0.75rem; background: rgba(46, 204, 113, 0.1); padding: 2px 5px; border-radius: 3px; }

/* MARCADORES PERSONALIZADOS */
.custom-map-marker {
    background: transparent;
    border: none;
}

/* MODAL VERSIÓN FULL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.modal-card {
    background: #2c3e50;
    color: white;
    max-width: 440px;
    width: 100%;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    border: 1px solid rgba(241, 196, 15, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-icon {
    font-size: 2.8rem;
    color: #f1c40f;
    margin-bottom: 12px;
}
.modal-card h2 {
    margin-top: 0;
    font-size: 1.45rem;
    color: #fff;
    border: none;
    padding: 0;
    margin-bottom: 12px;
}
.modal-card p {
    font-size: 0.9rem;
    color: #bdc3c7;
    line-height: 1.45;
    margin-bottom: 15px;
}
.demo-stats-box {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-around;
}
.demo-stats-box div strong {
    display: block;
    font-size: 1.15rem;
    color: #e74c3c;
    margin-top: 4px;
}
.modal-subtext {
    font-size: 0.85rem !important;
    color: #ecf0f1 !important;
    margin-top: 10px;
}
.btn-full-contact {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    background: #27ae60;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: background 0.3s;
    margin-bottom: 10px;
    font-size: 1rem;
}
.btn-full-contact:hover {
    background: #219150;
}
.btn-modal-close {
    background: transparent;
    color: #bdc3c7;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}
.btn-modal-close:hover {
    color: white;
}

/* FOOTER */
.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid #34495e; text-align: center; font-size: 0.9rem; color: #bdc3c7; padding-bottom: 10px; }
.sidebar-footer a { color: #f1c40f; text-decoration: none; font-weight: bold; border-bottom: 1px dotted #f1c40f; transition: all 0.3s; }
.sidebar-footer a:hover { color: #fff; border-bottom: 1px solid #fff; }
.social-links { margin-top: 12px; font-size: 1.4rem; display: flex; justify-content: center; gap: 15px; }
.social-links a { color: #ecf0f1; opacity: 0.7; }
.social-links a:hover { opacity: 1; color: #f1c40f; transform: scale(1.1); }