﻿/*
 * PF_OBD2.css — Modul-Stile (PFWS, scoped)
 * Alle Selektoren beginnen mit .pf-obd2-
 * Keine externen Abhängigkeiten, kein Framework.
 */


/* ─── CSS-Variablen ──────────────────────────────────────────── */

.pf-obd2-layout-wrapper {
    --pf-bg-main:             #0f1115;
    --pf-bg-card:             rgba(20, 25, 35, 0.72);
    --pf-bg-card-hover:       rgba(30, 40, 55, 0.82);
    --pf-accent:              #00f2ff;
    --pf-accent-glow:         rgba(0, 242, 255, 0.4);
    --pf-text-main:           #e0e6ed;
    --pf-text-muted:          #94a3b8;
    --pf-border:              rgba(255, 255, 255, 0.1);
    --pf-success:             #00ff9d;
    --pf-danger:              #ff2a6d;
    --pf-warning:             #ffbf00;
    --pf-anim-speed:          0.3s;

    --pf-obd2-bg:             var(--pf-bg-main);
    --pf-obd2-bg-soft:        color-mix(in srgb, var(--pf-bg-main) 84%, #182332 16%);
    --pf-obd2-card-bg:        var(--pf-bg-card);
    --pf-obd2-card-bg-hover:  var(--pf-bg-card-hover);
    --pf-obd2-text-main:      var(--pf-text-main);
    --pf-obd2-text-soft:      var(--pf-text-muted);
    --pf-obd2-text-strong:    #f8fbff;
    --pf-obd2-accent:         var(--pf-accent);
    --pf-obd2-accent-strong:  color-mix(in srgb, var(--pf-accent) 82%, #ffffff 18%);
    --pf-obd2-accent-glow:    var(--pf-accent-glow);
    --pf-obd2-warning:        var(--pf-warning);
    --pf-obd2-danger:         var(--pf-danger);
    --pf-obd2-success:        var(--pf-success);
    --pf-obd2-border:         var(--pf-border);
    --pf-obd2-gauge-track:    #2b3644;
    --pf-obd2-gauge-needle:   #ffffff;
    --pf-obd2-grid-line:      #2b3644;
    --pf-obd2-value-accent:   var(--pf-accent);
    --pf-obd2-shell-gradient: linear-gradient(135deg, #10151d 0%, #102838 45%, #0e4150 100%);
    --pf-obd2-scroll-track:   rgba(15, 23, 42, 0.85);
    --pf-obd2-scroll-thumb:   rgba(34, 211, 238, 0.55);
    --pf-obd2-header-meta:    rgba(226, 232, 240, 0.88);
    --pf-obd2-header-control-bg: rgba(255, 255, 255, 0.08);
    --pf-obd2-header-control-bg-hover: rgba(255, 255, 255, 0.18);
    --pf-obd2-header-control-border: rgba(255, 255, 255, 0.32);
    --pf-obd2-header-control-color: #f8fafc;
    --pf-obd2-header-control-color-hover: #ffffff;
    --pf-obd2-user-pill-bg: rgba(255, 255, 255, 0.08);
    --pf-obd2-user-pill-border: rgba(255, 255, 255, 0.24);
    --pf-obd2-user-avatar-bg: rgba(255, 255, 255, 0.16);
    --pf-obd2-info-strip-bg: rgba(15, 23, 42, 0.55);
    --pf-obd2-info-section-bg: rgba(15, 23, 42, 0.64);
    --pf-obd2-info-card-bg: rgba(15, 23, 42, 0.62);
    --pf-obd2-log-bg: rgba(0, 0, 0, 0.62);
    --pf-obd2-log-row: rgba(255, 255, 255, 0.06);
    --pf-obd2-log-text: #e2e8f0;
    --pf-obd2-power-bg: rgba(0, 0, 0, 0.22);
    --pf-obd2-power-border: rgba(148, 163, 184, 0.25);
    --pf-obd2-led-off: #2f3642;
    --pf-obd2-led-on: var(--pf-success);
    --pf-obd2-overlay-dim: rgba(2, 6, 23, 0.86);
    --pf-obd2-ble-shadow: 0 12px 40px rgba(2, 6, 23, 0.45);
    --pf-obd2-ble-input-bg: rgba(12, 18, 30, 0.95);
    --pf-obd2-ble-input-border: rgba(148, 163, 184, 0.34);
    --pf-obd2-ble-input-text: #e2e8f0;
    --pf-obd2-ble-input-placeholder: rgba(148, 163, 184, 0.82);
    --pf-obd2-ble-focus-ring: rgba(34, 211, 238, 0.4);
    --pf-obd2-ble-secondary-btn-bg: #334155;
    --pf-obd2-ble-secondary-btn-text: #f8fafc;
    --pf-obd2-engine-spin-duration: 0.95s;
    display: block;
    width: 100%;
}

.pf-obd2-app[data-theme='light'] {
    --pf-bg-main:             #edf3f9;
    --pf-bg-card:             rgba(255, 255, 255, 0.78);
    --pf-bg-card-hover:       rgba(255, 255, 255, 0.9);
    --pf-accent:              #0284c7;
    --pf-accent-glow:         rgba(2, 132, 199, 0.34);
    --pf-text-main:           #0b1b30;
    --pf-text-muted:          #334155;
    --pf-border:              rgba(30, 41, 59, 0.2);
    --pf-success:             #16a34a;
    --pf-danger:              #dc2626;
    --pf-warning:             #d97706;

    --pf-obd2-bg:             var(--pf-bg-main);
    --pf-obd2-bg-soft:        #ffffff;
    --pf-obd2-card-bg:        var(--pf-bg-card);
    --pf-obd2-card-bg-hover:  var(--pf-bg-card-hover);
    --pf-obd2-text-main:      var(--pf-text-main);
    --pf-obd2-text-soft:      var(--pf-text-muted);
    --pf-obd2-text-strong:    #061325;
    --pf-obd2-accent:         var(--pf-accent);
    --pf-obd2-accent-strong:  #0369a1;
    --pf-obd2-accent-glow:    var(--pf-accent-glow);
    --pf-obd2-warning:        var(--pf-warning);
    --pf-obd2-danger:         var(--pf-danger);
    --pf-obd2-success:        var(--pf-success);
    --pf-obd2-border:         var(--pf-border);
    --pf-obd2-gauge-track:    #cfd8e3;
    --pf-obd2-gauge-needle:   #0f172a;
    --pf-obd2-grid-line:      #d6e0ea;
    --pf-obd2-value-accent:   var(--pf-accent);
    --pf-obd2-shell-gradient: linear-gradient(135deg, #dbe7f3 0%, #dbeafe 45%, #c4d8f6 100%);
    --pf-obd2-scroll-track:   rgba(148, 163, 184, 0.28);
    --pf-obd2-scroll-thumb:   rgba(2, 132, 199, 0.56);
    --pf-obd2-header-meta:    rgba(11, 27, 48, 0.72);
    --pf-obd2-header-control-bg: rgba(255, 255, 255, 0.56);
    --pf-obd2-header-control-bg-hover: rgba(255, 255, 255, 0.9);
    --pf-obd2-header-control-border: rgba(30, 41, 59, 0.28);
    --pf-obd2-header-control-color: #0b1b30;
    --pf-obd2-header-control-color-hover: #061325;
    --pf-obd2-user-pill-bg: rgba(255, 255, 255, 0.56);
    --pf-obd2-user-pill-border: rgba(30, 41, 59, 0.18);
    --pf-obd2-user-avatar-bg: rgba(15, 23, 42, 0.1);
    --pf-obd2-info-strip-bg: rgba(203, 216, 230, 0.5);
    --pf-obd2-info-section-bg: rgba(219, 231, 242, 0.6);
    --pf-obd2-info-card-bg: rgba(255, 255, 255, 0.82);
    --pf-obd2-log-bg: rgba(232, 238, 246, 0.86);
    --pf-obd2-log-row: rgba(30, 41, 59, 0.14);
    --pf-obd2-log-text: #10243d;
    --pf-obd2-power-bg: rgba(203, 216, 230, 0.52);
    --pf-obd2-power-border: rgba(30, 41, 59, 0.2);
    --pf-obd2-led-off: #94a3b8;
    --pf-obd2-led-on: var(--pf-success);
    --pf-obd2-overlay-dim: rgba(15, 23, 42, 0.44);
    --pf-obd2-ble-shadow: 0 14px 38px rgba(15, 23, 42, 0.22);
    --pf-obd2-ble-input-bg: #f8fbff;
    --pf-obd2-ble-input-border: rgba(30, 41, 59, 0.26);
    --pf-obd2-ble-input-text: #0b1b30;
    --pf-obd2-ble-input-placeholder: rgba(51, 65, 85, 0.72);
    --pf-obd2-ble-focus-ring: rgba(2, 132, 199, 0.3);
    --pf-obd2-ble-secondary-btn-bg: #3b4c63;
    --pf-obd2-ble-secondary-btn-text: #f8fafc;
}

.pf-obd2-app[data-motion-mode='track'] {
    --pf-accent: #ff003c;
    --pf-accent-glow: rgba(255, 0, 60, 0.42);
    --pf-bg-main: #1a0505;
    --pf-obd2-bg: var(--pf-bg-main);
    --pf-obd2-accent: var(--pf-accent);
    --pf-obd2-accent-glow: var(--pf-accent-glow);
    --pf-obd2-value-accent: var(--pf-accent);
    --pf-obd2-shell-gradient: linear-gradient(135deg, #2a0a0a 0%, #3a0f1b 48%, #521124 100%);
}


/* ─── Hilfsklassen ───────────────────────────────────────────── */

.pf-obd2-hidden {
    display: none !important;
}

/* Platzhalter für die fixe Topbar im Dashboard-Kontext */
.pf-obd2-topnav-spacer {
    height: var(--pf-dashboard-topnav-height, 60px);
    pointer-events: none;
    width: 100%;
}


/* ─── Äußerer Rahmen ───────────────────────────────────────── */

.pf-obd2-box {
    background: var(--pf-obd2-bg-soft);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 22px;
    margin: 0 auto;
    max-width: min(1500px, 96vw);
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* App-Wurzelelement — beide Kontextklassen erhalten identisches Layout */
.pf-obd2-app,
.pf-obd2-module {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.pf-obd2-app {
    background-color: var(--pf-obd2-bg);
    background-image:
        linear-gradient(color-mix(in srgb, var(--pf-obd2-accent) 18%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--pf-obd2-accent) 18%, transparent) 1px, transparent 1px),
        radial-gradient(circle at top right, color-mix(in srgb, var(--pf-obd2-accent) 20%, transparent), transparent 40%);
    background-size: 30px 30px, 30px 30px, auto;
    color: var(--pf-obd2-text-main);
    isolation: isolate;
    overflow: hidden;
    position: relative;
}

.pf-obd2-app::before {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.08) 50%,
        rgba(0, 0, 0, 0.08) 100%);
    background-size: 100% 4px;
    content: '';
    inset: 0;
    opacity: 0.22;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.pf-obd2-app > * {
    position: relative;
    z-index: 1;
}


/* ─── Scrollbarer Inhaltsbereich ─────────────────────────────── */

.pf-obd2-body {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 16px;
    position: relative;
    scroll-behavior: smooth;
    /* Firefox-Scrollbalken */
    scrollbar-color: var(--pf-obd2-scroll-thumb) var(--pf-obd2-scroll-track);
    scrollbar-width: thin;
}

.pf-obd2-body::-webkit-scrollbar {
    width: 8px;
}

.pf-obd2-body::-webkit-scrollbar-track {
    background: var(--pf-obd2-scroll-track);
    border-radius: 4px;
}

.pf-obd2-body::-webkit-scrollbar-thumb {
    background: var(--pf-obd2-scroll-thumb);
    border: 1px solid color-mix(in srgb, var(--pf-obd2-scroll-thumb) 50%, transparent);
    border-radius: 4px;
}

.pf-obd2-body::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--pf-obd2-scroll-thumb) 78%, #ffffff 22%);
}


/* ─── Kopfzeile & Fusszeile ──────────────────────────────────── */

/* Gemeinsame Eigenschaften für Header und Footer */
.pf-obd2-header,
.pf-obd2-footer {
    align-items: center;
    background: var(--pf-obd2-shell-gradient);
    color: var(--pf-obd2-text-main);
    display: flex;
    flex-shrink: 0;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 16px;
}

.pf-obd2-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.pf-obd2-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--pf-obd2-header-meta);
    font-size: 0.85rem;
    margin-top: auto;
}

/* Linke und rechte Gruppe innerhalb der Kopfzeile */
.pf-obd2-header-left,
.pf-obd2-header-right {
    align-items: center;
    display: flex;
    gap: 12px;
}

.pf-obd2-launch-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    background: rgba(13, 148, 136, 0.12);
    border-bottom: 1px solid rgba(13, 148, 136, 0.2);
    color: var(--pf-obd2-text-main);
    font-size: 0.76rem;
}

.pf-obd2-launch-context strong,
.pf-obd2-launch-context span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Ziehpunkt fuer verschiebbare Module */
.pf-obd2-drag-handle {
    color: rgba(255, 255, 255, 0.9);
}


/* ─── Symbol-Schaltfläche (rund, für Info/Toggle) ──────────── */

.pf-obd2-icon-wrapper {
    align-items: center;
    background: var(--pf-obd2-header-control-bg);
    border: 1px solid var(--pf-obd2-header-control-border);
    border-radius: 999px;
    color: var(--pf-obd2-header-control-color);
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    width: 36px;
}

.pf-obd2-icon-wrapper:hover {
    background: var(--pf-obd2-header-control-bg-hover);
    color: var(--pf-obd2-header-control-color-hover);
    transform: translateY(-1px);
}

.pf-obd2-icon {
    align-items: center;
    display: inline-flex;
    height: 18px;
    justify-content: center;
    width: 18px;
}

.pf-obd2-icon svg {
    display: block;
    height: 18px;
    width: 18px;
}


/* ─── Titel & Meta-Text ──────────────────────────────────────── */

.pf-obd2-title {
    font-size: 1.15rem;
    line-height: 1.2;
    margin: 0;
}

.pf-obd2-meta {
    color: var(--pf-obd2-header-meta);
    font-size: 0.8rem;
}


/* ─── Benutzer-Pill ──────────────────────────────────────────── */

.pf-obd2-user-pill {
    align-items: center;
    background: var(--pf-obd2-user-pill-bg);
    border: 1px solid var(--pf-obd2-user-pill-border);
    border-radius: 999px;
    display: inline-flex;
    gap: 8px;
    padding: 4px 10px;
}

.pf-obd2-user-avatar {
    align-items: center;
    background: var(--pf-obd2-user-avatar-bg);
    border-radius: 999px;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    overflow: hidden;
    width: 26px;
}

.pf-obd2-avatar-image {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

/* Nur sichtbar wenn kein Bild vorhanden (per JS gesteuert) */
.pf-obd2-avatar-fallback {
    display: none;
    font-size: 0.75rem;
    font-weight: 700;
}

.pf-obd2-user-name {
    color: var(--pf-obd2-text-strong);
    font-size: 0.82rem;
}


/* ─── Theme-Schalter ─────────────────────────────────────────── */

.pf-obd2-theme-toggle {
    align-items: center;
    background: var(--pf-obd2-header-control-bg);
    border: 1px solid var(--pf-obd2-header-control-border);
    border-radius: 999px;
    color: var(--pf-obd2-header-control-color);
    cursor: pointer;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    width: 34px;
}

.pf-obd2-theme-toggle:hover {
    background: var(--pf-obd2-header-control-bg-hover);
    color: var(--pf-obd2-header-control-color-hover);
    transform: translateY(-1px);
}

.pf-obd2-theme-icon {
    display: inline-flex;
    height: 18px;
    width: 18px;
}

.pf-obd2-theme-icon svg {
    display: block;
    height: 18px;
    width: 18px;
}

/* Abfangen globaler button:hover Regeln im Dashboard ohne !important */
.pf-obd2-module .pf-obd2-icon-wrapper:hover,
.pf-obd2-module .pf-obd2-theme-toggle:hover,
.pf-obd2-module .pf-entwheel-btn-dashboard:hover {
    color: var(--pf-obd2-header-control-color-hover);
}


/* ─── Dashboard-Menue (Dropdown) ─────────────────────────────── */

.pf-obd2-dashboard-menu {
    position: relative;
}

.pf-obd2-dashboard-submenu {
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.45);
    min-width: 220px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
}

.pf-obd2-dashboard-submenu-item {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--pf-obd2-text-main);
    cursor: pointer;
    display: block;
    font-size: 0.84rem;
    padding: 8px 10px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.pf-obd2-dashboard-submenu-item:hover {
    background: rgba(34, 211, 238, 0.18);
}


/* ─── Aktionsleiste im Inhaltsbereich ────────────────────────── */

.pf-obd2-content-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px 0;
}

.pf-obd2-motion-group {
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 999px;
    display: inline-flex;
    gap: 4px;
    padding: 3px;
}

.pf-obd2-road-group {
    flex-wrap: wrap;
    max-width: min(100%, 520px);
}

.pf-obd2-tune-group {
    flex-wrap: wrap;
    max-width: min(100%, 520px);
}

.pf-obd2-road-group .pf-obd2-mode-btn {
    white-space: nowrap;
}

.pf-obd2-mode-btn {
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 999px;
    color: var(--pf-obd2-text-soft);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 10px;
    transition: all var(--pf-anim-speed) ease;
}

.pf-obd2-mode-btn.is-active {
    background: var(--pf-obd2-accent);
    border-color: var(--pf-obd2-accent);
    box-shadow: 0 0 15px var(--pf-obd2-accent-glow);
    color: #061325;
}


/* ─── Schaltflächen ─────────────────────────────────────────── */

/* Primäre Schaltfläche */
.pf-obd2-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 7px;
    color: var(--pf-obd2-text-main);
    cursor: pointer;
    font-weight: 700;
    overflow: hidden;
    padding: 9px 14px;
    position: relative;
    transition: all var(--pf-anim-speed) ease;
}

.pf-obd2-btn::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    content: '';
    height: 100%;
    left: -100%;
    position: absolute;
    top: 0;
    transition: left 0.5s ease;
    width: 100%;
    z-index: 0;
}

.pf-obd2-btn > * {
    position: relative;
    z-index: 1;
}

.pf-obd2-btn:hover::before {
    left: 100%;
}

.pf-obd2-btn:hover {
    border-color: var(--pf-obd2-accent);
    box-shadow: 0 0 15px var(--pf-obd2-accent-glow);
    text-shadow: 0 0 5px var(--pf-obd2-accent-glow);
}

/* Sekundaere Variante — nur Farb-Override, Basis-Stil kommt von .pf-obd2-btn */
.pf-obd2-btn-secondary {
    background-color: rgba(40, 52, 72, 0.88);
    color: #f8fafc;
}

/* Ghost-Variante — transparenter Hintergrund mit Rahmen */
.pf-obd2-btn-ghost {
    background: transparent;
    border: 1px solid var(--pf-obd2-border);
    color: var(--pf-obd2-text-main);
}

.pf-obd2-btn-ghost:hover {
    background: color-mix(in srgb, var(--pf-obd2-accent) 18%, transparent);
    color: var(--pf-obd2-text-strong);
}

/* Bestätigungs-Schaltfläche (z. B. Warnung wegklicken) */
.pf-obd2-btn-ack {
    background-color: var(--pf-obd2-danger);
    color: #fff;
    width: 100%;
}

/* Kleine Hilfsaktion (z. B. Reset-Knopf) */
.pf-obd2-tiny-btn {
    background: #334155;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    padding: 5px 10px;
}


/* ─── Info-Bereich (aufklappbar) ─────────────────────────────── */

.pf-obd2-info-strip {
    background: var(--pf-obd2-info-strip-bg);
    border-bottom: 1px solid var(--pf-obd2-border);
    padding: 10px 14px;
}

.pf-obd2-info-text {
    color: var(--pf-obd2-text-soft);
    font-size: 0.82rem;
    margin: 2px 0;
}

.pf-obd2-info-section {
    background: var(--pf-obd2-info-section-bg);
    border-bottom: 1px solid var(--pf-obd2-border);
    padding: 10px 14px;
}

.pf-obd2-info-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pf-obd2-info-card {
    background: var(--pf-obd2-info-card-bg);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 8px;
    padding: 10px;
}

.pf-obd2-info-card-wide {
    grid-column: span 4;
}

.pf-obd2-info-card h3,
.pf-obd2-info-card h4 {
    color: var(--pf-obd2-text-main);
    font-size: 0.86rem;
    margin: 0 0 4px;
}

.pf-obd2-info-card p,
.pf-obd2-info-card div {
    color: var(--pf-obd2-text-soft);
    font-size: 0.8rem;
    margin: 0;
}


/* ─── Statusleiste ───────────────────────────────────────────── */

#pf-obd2-status-bar {
    border-radius: 8px;
    font-weight: 700;
    margin: 12px 14px;
    padding: 9px;
    text-align: center;
}

.pf-obd2-status-connected {
    background-color: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.pf-obd2-status-disconnected {
    background-color: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.48);
    color: #fca5a5;
}


/* ─── Bordnetz-/Klemmenstatus ───────────────────────────────── */

.pf-obd2-power-strip {
    background: var(--pf-obd2-power-bg);
    border: 1px solid var(--pf-obd2-power-border);
    border-radius: 10px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 14px 14px;
    padding: 10px 12px;
}

.pf-obd2-power-item {
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--pf-obd2-power-border);
    border-radius: 8px;
    display: flex;
    gap: 8px;
    min-width: 0;
    padding: 8px 12px;
}

.pf-obd2-led-dot {
    background: var(--pf-obd2-led-off);
    border: 1px solid color-mix(in srgb, var(--pf-obd2-led-off) 65%, #ffffff 35%);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(2, 6, 23, 0.28) inset;
    display: inline-flex;
    flex: 0 0 auto;
    height: 10px;
    transition: all var(--pf-anim-speed) ease;
    width: 10px;
}

.pf-obd2-led-dot.is-on {
    background: var(--pf-obd2-led-on);
    border-color: color-mix(in srgb, var(--pf-obd2-led-on) 68%, #ffffff 32%);
    box-shadow: 0 0 8px color-mix(in srgb, var(--pf-obd2-led-on) 60%, transparent);
    animation: pf-obd2-led-pulse 2s infinite;
}

.pf-obd2-power-label {
    color: var(--pf-obd2-text-main);
    font-size: 0.82rem;
    font-weight: 700;
}

.pf-obd2-power-state {
    color: var(--pf-obd2-text-soft);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    margin-left: auto;
}

.pf-obd2-engine-indicator {
    align-items: center;
    color: var(--pf-obd2-led-off);
    display: inline-flex;
    flex: 0 0 auto;
    height: 16px;
    justify-content: center;
    transform-origin: center;
    transition: color 0.22s ease;
    width: 16px;
}

.pf-obd2-engine-indicator svg {
    display: block;
    height: 16px;
    transform-origin: center;
    transition: filter 0.35s ease;
    width: 16px;
}

.pf-obd2-engine-indicator.is-running {
    animation: pf-obd2-engine-run var(--pf-obd2-engine-spin-duration) linear infinite;
    color: var(--pf-obd2-led-on);
}

.pf-obd2-engine-indicator.is-running svg {
    filter: drop-shadow(0 0 6px var(--pf-obd2-accent-glow));
}


/* ─── Messanzeigen (Gauges) ──────────────────────────────────── */

.pf-obd2-dashboard-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
    padding: 0 14px;
}

.pf-obd2-gauge-container {
    align-items: center;
    background: var(--pf-obd2-card-bg);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.pf-obd2-gauge-container canvas {
    aspect-ratio: 1 / 1;
    filter: drop-shadow(0 0 10px var(--pf-obd2-accent-glow));
    height: auto;
    max-width: 310px;
    width: 100%;
}

.pf-obd2-gauge-label {
    color: var(--pf-obd2-text-soft);
    font-size: 1rem;
    margin-top: 6px;
}


/* ─── Performance-Zusatzanzeigen ─────────────────────────────── */

.pf-obd2-performance-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
    padding: 0 14px;
}

.pf-obd2-perf-box {
    background: var(--pf-obd2-card-bg);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.pf-obd2-perf-box h3 {
    color: var(--pf-obd2-text-soft);
    font-size: 0.9rem;
    margin: 0;
}


/* ─── Metriken (kleine Wertkarten) ───────────────────────────── */

.pf-obd2-metrics-row {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
    padding: 0 14px;
}

.pf-obd2-metric-box {
    background: var(--pf-obd2-card-bg);
    border: 1px solid var(--pf-obd2-border);
    /* Akzentlinie links — border-left nach dem Shorthand, damit er nicht überschrieben wird */
    border-left: 4px solid var(--pf-obd2-accent);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.pf-obd2-metric-box h3 {
    color: var(--pf-obd2-text-soft);
    font-size: 0.95rem;
    margin: 0;
}

.pf-obd2-value-large {
    color: var(--pf-obd2-text-main);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.45rem;
    font-weight: 700;
    margin-top: 6px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.45);
}

.pf-obd2-value-accent {
    color: var(--pf-obd2-value-accent);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    text-shadow: 0 0 10px var(--pf-obd2-accent-glow);
}

.pf-obd2-value-accent.is-live {
    animation: pf-obd2-gear-glitch 0.22s cubic-bezier(.25, .46, .45, .94) both;
}

.pf-obd2-value-large.is-live,
.pf-obd2-value.is-live {
    animation: pf-obd2-value-pulse 0.35s ease;
}

.pf-obd2-app[data-motion-mode='comfort'] .pf-obd2-value-large.is-live,
.pf-obd2-app[data-motion-mode='comfort'] .pf-obd2-value.is-live {
    animation-duration: 0.55s;
}

.pf-obd2-app[data-motion-mode='track'] .pf-obd2-value-large.is-live,
.pf-obd2-app[data-motion-mode='track'] .pf-obd2-value.is-live {
    animation-duration: 0.22s;
}

.pf-obd2-value-large.is-good,
.pf-obd2-value.is-good {
    color: var(--pf-obd2-success);
}

.pf-obd2-value-large.is-warn,
.pf-obd2-value.is-warn {
    color: var(--pf-obd2-warning);
}

.pf-obd2-value-large.is-danger,
.pf-obd2-value.is-danger {
    color: var(--pf-obd2-danger);
}

.pf-obd2-timer {
    color: var(--pf-obd2-warning);
    font-family: Consolas, monospace;
    font-size: 2rem;
    font-weight: 700;
}


/* ─── Datenkarten ────────────────────────────────────────────── */

.pf-obd2-data-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
    padding: 0 14px;
}

.pf-obd2-data-card {
    background: var(--pf-obd2-card-bg);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 10px;
    padding: 14px;
}

.pf-obd2-data-card-wide {
    grid-column: span 2;
}

.pf-obd2-data-card h3 {
    color: var(--pf-obd2-text-soft);
    font-size: 0.9rem;
    margin: 0 0 6px;
}

.pf-obd2-value {
    color: var(--pf-obd2-text-main);
    font-size: 1.2rem;
    font-weight: 700;
}


/* ─── Kraftstoffanzeige ──────────────────────────────────────── */

.pf-obd2-fuel-text {
    float: right;
}

.pf-obd2-fuel-bar-bg {
    background: #334155;
    border-radius: 5px;
    height: 10px;
    margin-top: 10px;
    overflow: hidden;
}

.pf-obd2-fuel-bar-fill {
    background: var(--pf-obd2-success);
    height: 100%;
    transition: width 0.45s ease, background 0.3s ease;
    width: 0;
}

.pf-obd2-fuel-bar-fill.is-low {
    background: var(--pf-obd2-danger);
}


/* ─── Diagramm ───────────────────────────────────────────────── */

.pf-obd2-chart-section {
    background: var(--pf-obd2-card-bg);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 10px;
    margin: 0 14px 14px;
    padding: 14px;
}

.pf-obd2-chart-section h3 {
    color: var(--pf-obd2-text-soft);
    font-size: 0.92rem;
    margin: 0 0 10px;
}

.pf-obd2-chart-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.pf-obd2-chart-switches {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-obd2-chart-switch {
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 999px;
    color: var(--pf-obd2-text-soft);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 9px;
    transition: all var(--pf-anim-speed) ease;
}

.pf-obd2-chart-switch.is-active {
    background: var(--pf-obd2-accent);
    border-color: var(--pf-obd2-accent);
    box-shadow: 0 0 12px var(--pf-obd2-accent-glow);
    color: #061325;
}

#pf-obd2-chart-rpm {
    display: block;
    height: 150px;
    width: 100%;
}


/* ─── Protokoll-Konsole ──────────────────────────────────────── */

.pf-obd2-log {
    background: var(--pf-obd2-log-bg);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 10px;
    font-family: Consolas, monospace;
    margin: 0 14px 14px;
    max-height: 160px;
    overflow-y: auto;
    padding: 10px;
    /* Firefox-Scrollbalken */
    scrollbar-color: rgba(34, 211, 238, 0.4) rgba(2, 6, 35, 0.85);
    scrollbar-width: thin;
}

.pf-obd2-log::-webkit-scrollbar {
    width: 6px;
}

.pf-obd2-log::-webkit-scrollbar-track {
    background: rgba(2, 6, 35, 0.85);
}

.pf-obd2-log::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.4);
    border-radius: 3px;
}

.pf-obd2-log h3 {
    color: var(--pf-obd2-text-soft);
    font-size: 0.82rem;
    margin: 0 0 6px;
}

.pf-obd2-log ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pf-obd2-log li {
    border-bottom: 1px solid var(--pf-obd2-log-row);
    color: var(--pf-obd2-log-text);
    font-size: 0.8rem;
    margin-bottom: 2px;
    opacity: 0;
    padding-bottom: 2px;
    transform: translateX(-10px);
    animation: pf-obd2-log-in 0.3s ease-out forwards;
}

/* Farbkodierung der Log-Einträge */
.pf-obd2-log-info,
.log-info {
    color: #67e8f9;
}

.pf-obd2-log-warn,
.log-warn {
    color: #fbbf24;
}

.pf-obd2-log-error,
.log-err {
    color: #fca5a5;
}


/* ─── Overlays (Warnung & BLE-Einstellungen) ─────────────────── */

/* Gemeinsame Basis: Vollbild-Dimm-Hintergrund */
#pf-obd2-warning-overlay,
#pf-obd2-ble-overlay {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1200;
}

#pf-obd2-warning-overlay {
    background: rgba(2, 6, 23, 0.86);
}

#pf-obd2-ble-overlay {
    background: var(--pf-obd2-overlay-dim);
}

/* Warn-Kasten mit Puls-Animation */
.pf-obd2-warning-box {
    animation: pf-obd2-warning-shake 0.5s cubic-bezier(.36, .07, .19, .97) infinite;
    background: rgba(20, 0, 0, 0.9);
    border: 2px solid var(--pf-obd2-danger);
    border-radius: 14px;
    box-shadow: 0 0 50px color-mix(in srgb, var(--pf-obd2-danger) 70%, transparent), inset 0 0 30px color-mix(in srgb, var(--pf-obd2-danger) 50%, transparent);
    color: #fff;
    padding: 26px;
    text-align: center;
    width: min(420px, calc(100vw - 28px));
}

.pf-obd2-data-card,
.pf-obd2-perf-box,
.pf-obd2-metric-box,
.pf-obd2-info-section,
.pf-obd2-ble-box,
.pf-obd2-warning-box,
.pf-obd2-chart-section,
.pf-obd2-log,
.pf-obd2-gauge-container,
.pf-obd2-info-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform var(--pf-anim-speed), box-shadow var(--pf-anim-speed), border-color var(--pf-anim-speed), background-color var(--pf-anim-speed);
}

.pf-obd2-data-card:hover,
.pf-obd2-perf-box:hover,
.pf-obd2-metric-box:hover,
.pf-obd2-gauge-container:hover,
.pf-obd2-chart-section:hover {
    background: var(--pf-obd2-card-bg-hover);
    border-color: var(--pf-obd2-accent);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--pf-obd2-accent-glow);
    transform: translateY(-2px);
}

/* BLE-Einstellungs-Kasten */
.pf-obd2-ble-box {
    background: var(--pf-obd2-card-bg);
    border: 1px solid var(--pf-obd2-border);
    border-radius: 12px;
    box-shadow: var(--pf-obd2-ble-shadow);
    padding: 18px;
    width: min(440px, calc(100vw - 26px));
}

.pf-obd2-ble-box h3 {
    color: var(--pf-obd2-text-main);
    font-size: 1rem;
    margin: 0 0 12px;
}

.pf-obd2-ble-field {
    color: var(--pf-obd2-text-soft);
    display: block;
    font-size: 0.83rem;
    margin: 10px 0 6px;
}

.pf-obd2-ble-input {
    background: var(--pf-obd2-ble-input-bg);
    border: 1px solid var(--pf-obd2-ble-input-border);
    border-radius: 8px;
    color: var(--pf-obd2-ble-input-text);
    padding: 9px 10px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
    width: 100%;
}

.pf-obd2-ble-input::placeholder {
    color: var(--pf-obd2-ble-input-placeholder);
}

.pf-obd2-ble-note {
    background: color-mix(in srgb, var(--pf-obd2-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--pf-obd2-accent) 30%, var(--pf-obd2-border));
    border-radius: 8px;
    color: var(--pf-obd2-text-soft);
    font-size: 0.78rem;
    line-height: 1.35;
    margin-top: 10px;
    padding: 9px 10px;
}

.pf-obd2-ble-note p {
    margin: 0 0 6px;
}

.pf-obd2-ble-note ul {
    margin: 0;
    padding-left: 18px;
}

.pf-obd2-ble-note li {
    margin: 0 0 4px;
}

.pf-obd2-ble-input:focus,
.pf-obd2-ble-input:focus-visible {
    border-color: var(--pf-obd2-accent);
    box-shadow: 0 0 0 3px var(--pf-obd2-ble-focus-ring);
    outline: 0;
}

.pf-obd2-ble-input option {
    background: var(--pf-obd2-ble-input-bg);
    color: var(--pf-obd2-ble-input-text);
}

.pf-obd2-ble-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

.pf-obd2-ble-actions .pf-obd2-btn-secondary {
    background: var(--pf-obd2-ble-secondary-btn-bg);
    color: var(--pf-obd2-ble-secondary-btn-text);
}


/* ─── Zum-Seitenanfang-Schaltfläche ─────────────────────────── */

.pf-obd2-to-top {
    background: rgba(2, 132, 199, 0.9);
    border: 1px solid rgba(34, 211, 238, 0.36);
    border-radius: 999px;
    bottom: 14px;
    color: #f8fafc;
    cursor: pointer;
    font-weight: 700;
    margin-left: auto;
    margin-right: 14px;
    margin-top: 8px;
    opacity: 0;
    padding: 8px 11px;
    pointer-events: none;
    position: sticky;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 6;
}

.pf-obd2-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}


/* ─── EntWheel Dashboard-Integration ────────────────────────── */

/* Scoped auf .pf-obd2-module um Konflikte mit dem echten EntWheel zu vermeiden */
.pf-obd2-module .pf-entwheel-btn-dashboard {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: var(--pf-obd2-text-main);
    cursor: pointer;
    display: inline-flex;
    gap: 8px;
    padding: 6px 10px;
}

.pf-obd2-module .pf-entwheel-btn-dashboard:hover {
    background: rgba(34, 211, 238, 0.18);
}

.pf-obd2-module .pf-entwheel-dashboard-logo {
    height: 20px;
    object-fit: contain;
    width: 20px;
}

.pf-obd2-module .pf-entwheel-dashboard-label {
    font-size: 0.82rem;
    font-weight: 700;
}


/* ─── Animation ──────────────────────────────────────────────── */

@keyframes pf-obd2-pulse {
    0%   { box-shadow: 0 0 0 0    rgba(239, 68, 68, 0.7); }
    70%  { box-shadow: 0 0 0 18px rgba(239, 68, 68, 0);   }
    100% { box-shadow: 0 0 0 0    rgba(239, 68, 68, 0);   }
}

@keyframes pf-obd2-value-pulse {
    0% {
        opacity: 0.65;
        transform: translateY(1px) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pf-obd2-led-pulse {
    0% {
        box-shadow: 0 0 2px color-mix(in srgb, var(--pf-obd2-led-on) 72%, transparent);
    }
    50% {
        box-shadow: 0 0 10px color-mix(in srgb, var(--pf-obd2-led-on) 82%, transparent);
    }
    100% {
        box-shadow: 0 0 2px color-mix(in srgb, var(--pf-obd2-led-on) 72%, transparent);
    }
}

@keyframes pf-obd2-log-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pf-obd2-gear-glitch {
    0% {
        transform: translate(0, 0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0, 0);
    }
}

@keyframes pf-obd2-warning-shake {
    10%, 90% {
        transform: translate3d(-2px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(4px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-6px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(6px, 0, 0);
    }
}

@keyframes pf-obd2-card-in {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pf-obd2-engine-run {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.08);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-dashboard-grid > *,
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-performance-grid > *,
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-metrics-row > *,
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > *,
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-chart-section,
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-log {
    animation: pf-obd2-card-in 0.45s ease both;
}

.pf-obd2-app[data-motion-mode='comfort'].pf-obd2-is-ready .pf-obd2-dashboard-grid > *,
.pf-obd2-app[data-motion-mode='comfort'].pf-obd2-is-ready .pf-obd2-performance-grid > *,
.pf-obd2-app[data-motion-mode='comfort'].pf-obd2-is-ready .pf-obd2-metrics-row > *,
.pf-obd2-app[data-motion-mode='comfort'].pf-obd2-is-ready .pf-obd2-data-grid > *,
.pf-obd2-app[data-motion-mode='comfort'].pf-obd2-is-ready .pf-obd2-chart-section,
.pf-obd2-app[data-motion-mode='comfort'].pf-obd2-is-ready .pf-obd2-log {
    animation-duration: 0.58s;
}

.pf-obd2-app[data-motion-mode='track'].pf-obd2-is-ready .pf-obd2-dashboard-grid > *,
.pf-obd2-app[data-motion-mode='track'].pf-obd2-is-ready .pf-obd2-performance-grid > *,
.pf-obd2-app[data-motion-mode='track'].pf-obd2-is-ready .pf-obd2-metrics-row > *,
.pf-obd2-app[data-motion-mode='track'].pf-obd2-is-ready .pf-obd2-data-grid > *,
.pf-obd2-app[data-motion-mode='track'].pf-obd2-is-ready .pf-obd2-chart-section,
.pf-obd2-app[data-motion-mode='track'].pf-obd2-is-ready .pf-obd2-log {
    animation-duration: 0.3s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-dashboard-grid > :nth-child(1),
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-performance-grid > :nth-child(1),
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-metrics-row > :nth-child(1),
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > :nth-child(1) {
    animation-delay: 0.03s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-dashboard-grid > :nth-child(2),
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-performance-grid > :nth-child(2),
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-metrics-row > :nth-child(2),
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > :nth-child(2) {
    animation-delay: 0.08s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-performance-grid > :nth-child(3),
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > :nth-child(3) {
    animation-delay: 0.13s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > :nth-child(4) {
    animation-delay: 0.17s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > :nth-child(5) {
    animation-delay: 0.21s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > :nth-child(6) {
    animation-delay: 0.25s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > :nth-child(7) {
    animation-delay: 0.29s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > :nth-child(8) {
    animation-delay: 0.33s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-data-grid > :nth-child(9),
.pf-obd2-app.pf-obd2-is-ready .pf-obd2-chart-section {
    animation-delay: 0.37s;
}

.pf-obd2-app.pf-obd2-is-ready .pf-obd2-log {
    animation-delay: 0.42s;
}


/* ─── Responsive ─────────────────────────────────────────────── */

/* Benutzer-Pill ab 981px aufwaerts sichtbar */
@media (max-width: 980px) {
    .pf-obd2-user-pill {
        display: none;
    }
}

@media (max-width: 768px) {
    .pf-obd2-header,
    .pf-obd2-footer {
        flex-wrap: wrap;
    }

    .pf-obd2-header-right {
        flex-wrap: wrap;
        justify-content: space-between;
        width: 100%;
    }

    /* Einspaltig auf schmalen Bildschirmen */
    .pf-obd2-performance-grid,
    .pf-obd2-dashboard-grid,
    .pf-obd2-metrics-row,
    .pf-obd2-data-grid {
        grid-template-columns: 1fr;
    }

    .pf-obd2-content-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pf-obd2-road-group {
        width: 100%;
    }

    .pf-obd2-tune-group {
        width: 100%;
    }

    .pf-obd2-road-group .pf-obd2-mode-btn {
        flex: 1 1 auto;
        text-align: center;
    }

    .pf-obd2-tune-group .pf-obd2-mode-btn {
        flex: 1 1 auto;
        text-align: center;
    }

    .pf-obd2-chart-switches {
        width: 100%;
    }

    .pf-obd2-chart-switch {
        flex: 1 1 auto;
        text-align: center;
    }

    .pf-obd2-power-strip {
        grid-template-columns: 1fr;
    }

    /* Dashboard-Label im Menue-Knopf verstecken — nur Icon bleibt */
    .pf-obd2-module .pf-entwheel-dashboard-label {
        display: none;
    }

    /* Breite Karten nehmen volle Breite, nicht Span-2 */
    .pf-obd2-data-card-wide {
        grid-column: auto;
    }

    /* Info-Gitter: zwei Spalten statt vier */
    .pf-obd2-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pf-obd2-info-card-wide {
        grid-column: span 2;
    }
}