/**
 * Velocidade UI v5 — design tokens, glass, micro-interações
 * (alinhado ao doc: design system, animações leves, dashboard)
 */
.velocidade-bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.theme-v5 {
    --v5-bg-void: #03040a;
    --v5-surface: rgba(12, 14, 22, 0.78);
    --v5-border: rgba(124, 58, 237, 0.35);
    --v5-accent: #c4b5fd;
    --v5-accent-hot: #f0abfc;
    --v5-font: "Outfit", system-ui, sans-serif;
    --v5-mono: "JetBrains Mono", ui-monospace, monospace;
    --v5-radius: 14px;
    --v5-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    --v5-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.theme-v5 {
    font-family: var(--v5-font);
    background: transparent !important;
    color: #f4f4f5;
}

.theme-v5 .app {
    position: relative;
    z-index: 1;
}

/* Painéis — vidro + profundidade */
.theme-v5 .topbar,
.theme-v5 .record-strip,
.theme-v5 .sim-panel,
.theme-v5 .table-wrap {
    background: var(--v5-surface) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: var(--v5-border) !important;
    border-radius: var(--v5-radius);
    box-shadow: var(--v5-shadow);
    transition:
        transform 0.35s var(--v5-ease),
        box-shadow 0.35s var(--v5-ease),
        border-color 0.3s ease;
}

.theme-v5 .topbar:hover,
.theme-v5 .record-strip:hover {
    border-color: rgba(167, 139, 250, 0.55) !important;
}

.theme-v5 .title {
    font-family: var(--v5-font);
    letter-spacing: -0.02em;
}

.theme-v5 .clock,
.theme-v5 .metric-chip .mv,
.theme-v5 td,
.theme-v5 .cell-kph-em,
.theme-v5 .cell-kph,
.theme-v5 .speed-now {
    font-family: var(--v5-mono);
    font-variant-numeric: tabular-nums;
}

.theme-v5 thead {
    background: rgba(22, 26, 38, 0.95) !important;
}

.theme-v5 tbody tr {
    transition:
        background 0.25s var(--v5-ease),
        transform 0.2s var(--v5-ease),
        box-shadow 0.25s ease;
}

.theme-v5 tbody tr:hover {
    background: rgba(88, 28, 135, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.15);
}

.theme-v5 tbody tr.record-holder:hover {
    background: linear-gradient(
        90deg,
        rgba(168, 85, 247, 0.22) 0%,
        rgba(18, 22, 35, 0.95) 42%
    ) !important;
}

.theme-v5 .btn-sim {
    transition:
        transform 0.2s var(--v5-ease),
        box-shadow 0.25s ease,
        background 0.2s ease;
}

.theme-v5 .btn-sim:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.theme-v5 .btn-sim:active {
    transform: translateY(0);
}

.theme-v5 .metric-chip {
    transition: border-color 0.25s ease, background 0.25s ease;
}

.theme-v5 .metric-chip:hover {
    border-color: rgba(167, 139, 250, 0.4);
    background: rgba(20, 22, 32, 0.95);
}

/* Página de teste — grelha compacta */
.theme-v5 .grid-main table {
    font-family: var(--v5-font);
}

.theme-v5 .pit-log-panel.has-content {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@media (prefers-reduced-motion: reduce) {
    .theme-v5 .topbar,
    .theme-v5 .record-strip,
    .theme-v5 .table-wrap,
    .theme-v5 tbody tr,
    .theme-v5 .btn-sim,
    .theme-v5 .metric-chip {
        transition: none;
    }

    .theme-v5 tbody tr:hover {
        transform: none;
    }
}
