body {
    margin: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    color: white;
    overflow: hidden;
}

.bg {
    position: fixed;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, #110022, #050010, #000000);
    z-index: -2;
}

/* CAR IMAGE BACKGROUND */
.car-bg {
    position: fixed;
    bottom: -24%;
    right: -100px;              /* ← replaces left + transform */
    width: calc(100vw - 340px);
    height: auto;
    z-index: 6;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.85;
}

.dashboard-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    gap: 20px;
    position: relative;
    z-index: 5;
}

.glass {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    padding: 25px 15px;
    flex-shrink: 0;
}

.brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    color: #a855f7;
    text-shadow: 0 0 10px #a855f7;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    opacity: 0.85;
}

.nav-item {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 14px 18px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding-left: 24px;
}

.nav-item.active {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.content-panel {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

h2 {
    margin-top: 0;
    font-size: 26px;
    font-weight: 500;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

h2 svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    color: #a855f7;
    filter: drop-shadow(0 0 6px rgba(168,85,247,0.6));
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.4);
}

.metric-card h3 {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    margin: 15px 0 0 0;
    font-size: 32px;
    font-weight: 700;
}

.view-flex {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
}

.status-readout h3 {
    font-size: 36px;
    margin: 0 0 10px 0;
}

.status-readout p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 400px;
    line-height: 1.6;
}

.battery3d {
    width: 80px;
    height: 150px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    position: relative;
    padding: 4px;
}

.battery-fill {
    width: calc(100% - 8px);
    position: absolute;
    bottom: 4px;
    background: linear-gradient(to top, #22c55e, #4ade80);
    border-radius: 6px;
    transition: height 0.3s ease;
}

.soh-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.05);
    border-top: 6px solid #3b82f6;
    animation: spin 2s linear infinite;
}

.rul-disc {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #eab308, transparent);
    border-radius: 50%;
    opacity: 0.7;
    animation: pulseGlow 2s infinite alternate;
}

.risk-box {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: #22c55e;
    transition: background 0.5s ease;
}

.ai-scan {
    width: 160px;
    height: 100px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    background: rgba(168, 85, 247, 0.05);
}

.ai-scan::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 4px;
    background: #a855f7;
    box-shadow: 0 0 10px #a855f7;
    animation: scan 2s linear infinite;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes scan { 0% { top: 0%; } 50% { top: 100%; } 100% { top: 0%; } }
@keyframes pulseGlow { from { transform: scale(0.95); opacity: 0.5; } to { transform: scale(1.05); opacity: 0.8; } }