:root {
    --bg-dark: #282a31;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --success: #10b981;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top left, #1e1b4b, var(--bg-dark));
    color: var(--text-main);
    min-height: 100vh;
}

[v-cloak] {
    display: none;
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Login Screen */
.login-screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1e1b4b, var(--bg-dark));
}

.login-card {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.logo h2 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.logo span {
    color: var(--primary);
}

.menu {
    flex-grow: 1;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu a:hover,
.menu a.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.menu a.active {
    background: var(--primary);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.user-profile {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-profile span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Main Content */
.content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.top-nav {
    height: 70px;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 8px;
    width: 300px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    margin-left: 12px;
    outline: none;
    width: 100%;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 16px;
    transition: color 0.3s;
}

.btn-icon:hover {
    color: #fff;
}

.page-content {
    padding: 32px;
}

.header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-action h1 {
    margin: 0 0 8px 0;
    font-weight: 300;
}

.header-action p {
    margin: 0;
    color: var(--text-muted);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: all 0.3s;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.9rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    color: white;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.w-100 {
    width: 100%;
    margin-top: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
}

.stat-card h3 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.trend.up {
    font-size: 1rem;
    color: var(--success);
    font-weight: 600;
}

.pulse {
    animation: pulse 2s infinite;
    color: var(--primary);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Glass Tables */
.glass-table-wrapper {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.glass-table th,
.glass-table td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.glass-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-license {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    font-family: monospace;
    font-size: 0.9rem;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.btn-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group.row {
    flex-direction: row;
    gap: 16px;
}

.form-group.row .col {
    flex: 1;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.input-license {
    text-transform: uppercase;
    font-family: monospace !important;
    letter-spacing: 2px;
}

.beacon-alert {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.beacon-alert i {
    color: var(--primary);
    font-size: 1.5rem;
}

.beacon-alert p {
    margin: 4px 0 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Transitions */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

/* HUD Dashboard Styles (Live-Diagnose) */
.hud-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 15px 0;
}
.hud-panel {
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 210, 255, 0.05);
    position: relative;
    overflow: hidden;
}
.hud-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.8), transparent);
}
.hud-title {
    font-size: 0.9rem;
    color: #8bb4e7;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
}
.hud-value-container {
    position: relative;
    width: 100%;
    height: 140px;
}
.hud-status-ok { color: #00ffcc; text-shadow: 0 0 8px rgba(0, 255, 204, 0.5); }
.hud-status-warn { color: #ffcc00; text-shadow: 0 0 8px rgba(255, 204, 0, 0.5); }
.hud-status-danger { color: #ff3366; text-shadow: 0 0 8px rgba(255, 51, 102, 0.5); }

.vehicle-model-container {
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: inset 0 0 20px rgba(0, 210, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.dtc-alert {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.4);
    color: #ff3366;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.hud-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.4);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* ==========================================
   Alternative Design-Option: Business View
   ========================================== */

/* Anti-Flicker und Root Klasse */
html.business-theme,
body.business-theme {
    --bg-dark: #f8fafc;
    --bg-panel: #ffffff;
    --glass-border: #e2e8f0;
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.15);
    --success: #10b981;
    --danger: #ef4444;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #0f172a;
}

/* Basis Hintergründe */
.business-theme,
html.business-theme body {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.business-theme .login-screen {
    background: #f1f5f9 !important;
}

/* Sidebar & Navigation */
.business-theme .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
}

.business-theme .logo h2 {
    color: #0f172a !important;
}

.business-theme .menu a {
    color: #475569 !important;
}

.business-theme .menu a:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.business-theme .menu a.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px var(--primary-glow) !important;
}

.business-theme .top-nav {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.business-theme .top-nav-logo {
    color: #0f172a !important;
}

.business-theme .search-bar {
    background: #f1f5f9 !important;
}

.business-theme .search-bar input {
    color: #0f172a !important;
}

.business-theme .btn-icon {
    color: #475569 !important;
}

.business-theme .btn-icon:hover {
    color: #0f172a !important;
}

/* Panels, Cards & Tables */
.business-theme .glass-panel,
.business-theme .login-card,
.business-theme .stat-card,
.business-theme .glass-table-wrapper,
.business-theme .kpi-card,
.business-theme .chart-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.business-theme .kpi-card::before {
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent) !important;
}

.business-theme .kpi-card:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.business-theme .kpi-icon {
    background: #f1f5f9 !important;
    box-shadow: none !important;
}

.business-theme .glass-table th {
    color: #475569 !important;
}

.business-theme .glass-table td {
    border-bottom: 1px solid #f1f5f9 !important;
    color: #0f172a !important;
}

.business-theme .glass-table tbody tr:hover {
    background: #f8fafc !important;
}

/* Forms & Modals */
.business-theme .form-group input,
.business-theme .form-group select,
.business-theme .modern-select {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.business-theme .form-group input:focus,
.business-theme .form-group select:focus,
.business-theme .modern-select:focus {
    border-color: var(--primary) !important;
}

.business-theme .modal-content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    color: #0f172a !important;
}

.business-theme .modal-header h2,
.business-theme .modal-header h3 {
    color: #0f172a !important;
}

.business-theme .btn-close {
    color: #0f172a !important;
}

/* Customer-specific Overrides */
.business-theme .sidebar-logbook {
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
}

.business-theme .sidebar-header {
    border-bottom: 1px solid #e2e8f0 !important;
}

.business-theme .vehicle-selector {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.business-theme .trip-item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

.business-theme .trip-item:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.business-theme .trip-item.active {
    background: rgba(37, 99, 235, 0.08) !important;
    border-color: var(--primary) !important;
}

.business-theme .trip-icon {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.business-theme .trip-icon.is-active {
    background: var(--primary) !important;
    color: #ffffff !important;
}

.business-theme .trip-overlay-info {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}

.business-theme .trip-overlay-info .val {
    color: #0f172a !important;
}

/* Mobile-specific Overrides */
.business-theme .mobile-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.business-theme .mobile-header h1 {
    color: #0f172a !important;
}

.business-theme .bottom-nav {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
}

.business-theme .nav-item {
    color: #475569 !important;
}

.business-theme .nav-item.active {
    color: var(--primary) !important;
}

.business-theme .mobile-card,
.business-theme .stat-box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

.business-theme .stat-value {
    color: #0f172a !important;
}

.business-theme .vehicle-selector-mobile {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.business-theme .trip-card {
    color: #0f172a !important;
}

.business-theme .trip-date {
    color: #0f172a !important;
}

/* Maps and HUD Overrides */
.business-theme .leaflet-container {
    background-color: #aad3df !important;
}

.business-theme .leaflet-layer,
.business-theme .leaflet-control-zoom-in,
.business-theme .leaflet-control-zoom-out,
.business-theme .leaflet-control-attribution {
    filter: none !important;
}

.business-theme .hud-panel {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.business-theme .hud-panel::before {
    background: linear-gradient(90deg, transparent, var(--primary), transparent) !important;
}

.business-theme .hud-title {
    color: #475569 !important;
}

.business-theme .vehicle-model-container {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
}

.business-theme .hud-control-bar {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

.business-theme .badge-license {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

/* Fix select option styles for dark/light themes to prevent white-on-white text */
select option {
    background-color: #ffffff !important;
    color: #1e293b !important;
}

.business-theme select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}