html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, "Segoe UI", Roboto, monospace;
    overflow: hidden;
}

#mapa {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}

#panel {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(4px);
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    max-width: 240px;
    font-size: 0.9rem;
    line-height: 1.5;
}

#panel h1 {
    font-size: 1rem;
    margin: 0 0 8px 0;
}

#panel p {
    margin: 2px 0;
    color: #222;
}

#panel button {
    margin-top: 10px;
    margin-right: 6px;
    padding: 6px 14px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-weight: bold;
}

#btn-pausa {
    background: #1D9E75;
    color: white;
}

#btn-historico {
    background: #3B7DD8;
    color: white;
}

#btn-borrar {
    background: #D85A30;
    color: white;
}

#panel-historico {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    max-width: 260px;
    font-size: 0.85rem;
    display: none;
}

#panel-historico.abierto {
    display: block;
}

#panel-historico label {
    display: block;
    margin-top: 8px;
    font-weight: bold;
    color: #333;
}

#panel-historico input {
    width: 100%;
    margin-top: 2px;
    padding: 4px;
    box-sizing: border-box;
}

#panel-historico button {
    margin-top: 10px;
    margin-right: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

#btn-buscar-historico {
    background: #3B7DD8;
    color: white;
}

#btn-volver-vivo {
    background: #666;
    color: white;
}

#resultado-historico {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #444;
}

@media (max-width: 480px) {
    #panel {
        max-width: calc(100vw - 64px);
        font-size: 0.85rem;
    }
}
