* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; font-family: 'Inter', -apple-system, sans-serif; overflow: hidden; }

.loading-screen {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; background: #0f172a; color: white; gap: 16px;
}
.loading-screen .spinner {
    width: 36px; height: 36px; border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #3B82F6; border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-screen {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; background: #0f172a; color: #94a3b8; gap: 12px; text-align: center; padding: 24px;
}
.error-screen h2 { color: #f1f5f9; font-size: 18px; }

.map-container { width: 100%; height: 100%; position: relative; }
.map-container .leaflet-container { width: 100%; height: 100%; }

.open-header {
    position: absolute; top: 0; left: 0; right: 0; z-index: 1000;
    background: linear-gradient(180deg, rgba(15,23,42,0.85) 0%, rgba(15,23,42,0) 100%);
    padding: 12px 16px 30px; pointer-events: none;
}
.open-header-inner {
    display: flex; align-items: center; gap: 10px; pointer-events: auto;
}
.open-logo {
    width: 32px; height: 32px; background: #2563EB; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.open-title { color: white; font-weight: 700; font-size: 15px; }
.open-subtitle { color: rgba(255,255,255,0.5); font-size: 11px; font-weight: 500; }

.device-panel {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 1000;
    background: white; border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12); max-height: 40vh; overflow-y: auto;
}
.device-panel-handle {
    width: 36px; height: 4px; background: #e2e8f0; border-radius: 2px;
    margin: 10px auto 6px;
}
.device-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background 0.15s;
}
.device-item:hover { background: #f8fafc; }
.device-item.active { background: #EFF6FF; }
.device-item:last-child { border-bottom: none; }
.device-marker-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.device-info { flex: 1; min-width: 0; }
.device-plate { font-weight: 700; font-size: 14px; color: #1e293b; }
.device-status { font-size: 11px; margin-top: 1px; }

.custom-marker { background: none !important; border: none !important; }
