:root {
    --bg-main: #090e0b;
    --bg-surface: #111915;
    --bg-surface-2: #17231d;
    --bg-input: #0c130f;
    --green-primary: #0b6623;
    --green-dark: #07190f;
    --green-accent: #4ade80;
    --gold-primary: #f4b400;
    --gold-hover: #ffca28;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #1f3328;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body.dark-mode {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
}

h1, h2, h3, h4, .brand-title {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}

.container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Top Telemetry Bar */
.top-bar {
    background: #050907;
    color: #cbd5e1;
    font-size: 0.82rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.badge-omsi {
    background: var(--gold-primary);
    color: #090e0b;
    font-weight: 900;
    padding: 0.12rem 0.5rem;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
}
.live-status { display: inline-flex; align-items: center; gap: 0.45rem; }
.status-led { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.led-online { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.led-standby { background: var(--gold-primary); box-shadow: 0 0 8px var(--gold-primary); }

.admin-link {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border: 1px solid rgba(244, 180, 0, 0.35);
    border-radius: 4px;
}
.admin-link:hover { background: rgba(244, 180, 0, 0.12); }

/* Header & Navigation */
.main-header {
    background: rgba(13, 21, 17, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--gold-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}
.brand-crest { width: 44px; height: 50px; flex-shrink: 0; }
.brand-title {
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.5px;
    font-style: italic;
}
.brand-title .vps, .vps { color: var(--green-accent); }
.brand-title .g, .g { color: #ffffff; border-bottom: 3px solid var(--gold-primary); }
.brand-subtitle {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 3px;
}

.main-nav { display: flex; align-items: center; gap: 1.35rem; }
.main-nav a {
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--green-accent); }
.main-nav a.btn-nav {
    background: var(--green-primary);
    color: #ffffff;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    border-bottom: 3px solid var(--gold-primary);
}
.main-nav a.btn-nav:hover { background: #0e7a2b; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 26px; height: 3px; background: #ffffff; border-radius: 2px; }

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #060b08;
}
.hero-image-wrapper { position: absolute; inset: 0; z-index: 1; }
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    opacity: 0.36;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(95deg, rgba(9, 14, 11, 0.96) 0%, rgba(9, 14, 11, 0.75) 55%, rgba(9, 14, 11, 0.35) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 4.5rem 1.5rem; max-width: 780px; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(17, 25, 21, 0.85);
    padding: 0.35rem 0.95rem;
    border-radius: 99px;
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid rgba(244, 180, 0, 0.45);
    margin-bottom: 1.2rem;
    color: #e2e8f0;
}
.hero-badge .dot { width: 8px; height: 8px; background: var(--green-accent); border-radius: 50%; box-shadow: 0 0 8px var(--green-accent); }
.script-accent {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    color: var(--gold-primary);
    font-size: 1.65rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.25rem;
}
.hero-content h1 { font-size: 2.8rem; font-weight: 900; line-height: 1.15; margin: 0 0 1.2rem; }
.text-green { color: var(--green-accent); }
.text-gold { color: var(--gold-primary); }
.hero-lead { font-size: 1.1rem; color: #cbd5e1; margin-bottom: 2rem; max-width: 640px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.55rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary { background: var(--green-primary); color: #ffffff; border-bottom: 3px solid var(--gold-primary); }
.btn-primary:hover { background: #0e7d2b; transform: translateY(-1px); }
.btn-secondary { background: var(--bg-surface-2); color: #ffffff; border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--green-accent); }
.btn-gold { background: var(--gold-primary); color: #090e0b; }
.btn-gold:hover { background: var(--gold-hover); }
.btn-outline { border: 1px solid rgba(255,255,255,0.35); color: #ffffff; background: rgba(255,255,255,0.04); }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #ffffff; }
.btn-block { width: 100%; text-align: center; }

/* 5 Pillars Bar */
.pillars-bar {
    background: var(--bg-surface);
    padding: 1.4rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.pillars-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.pillar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.5rem;
    border-right: 1px solid var(--border);
}
.pillar-item:last-child { border-right: none; }
.pillar-icon { width: 32px; height: 32px; color: var(--gold-primary); flex-shrink: 0; }
.pillar-text strong { display: block; font-family: 'Montserrat', sans-serif; font-size: 0.84rem; color: #fff; }
.pillar-text span { font-size: 0.72rem; color: var(--green-accent); }

/* Sections & Headers */
.section { padding: 4.2rem 0; }
.bg-surface { background: #0c130f; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-tag {
    display: inline-block;
    color: var(--green-accent);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.76rem;
    letter-spacing: 1px;
    margin-bottom: 0.35rem;
}
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2.2rem; gap: 1rem; flex-wrap: wrap; }
.section-header h2 { margin: 0; font-size: 1.9rem; }
.link-arrow { color: var(--gold-primary); font-weight: 700; text-decoration: none; }
.api-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    background: var(--bg-surface-2);
    color: var(--green-accent);
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.stat-card {
    background: var(--bg-surface);
    padding: 1.65rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border);
    border-bottom: 4px solid var(--green-primary);
    box-shadow: var(--shadow);
}
.stat-card.highlight-gold { border-bottom-color: var(--gold-primary); }
.stat-number { font-family: 'Montserrat', sans-serif; font-size: 2rem; font-weight: 900; color: #ffffff; }
.stat-label { color: var(--text-muted); font-weight: 600; font-size: 0.88rem; margin-top: 0.25rem; }

.bbs-meta-strip {
    margin-top: 1.4rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.4rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
}
.bbs-meta-strip span { color: var(--text-muted); margin-right: 0.35rem; }

/* Split & Vehicle Highlight */
.split-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.check-list li { position: relative; padding-left: 1.75rem; margin-bottom: 0.75rem; color: #cbd5e1; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green-accent); font-weight: 900; }

.vehicle-highlight-card {
    background: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid var(--border);
}
.vh-badge {
    position: absolute;
    top: 1rem; left: 1rem;
    background: rgba(9, 14, 11, 0.9);
    color: var(--gold-primary);
    border: 1px solid rgba(244, 180, 0, 0.4);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
}
.vehicle-highlight-card img { width: 100%; height: 220px; object-fit: cover; }
.vh-body { padding: 1.5rem; }
.vh-body h3 { margin: 0 0 0.4rem; }
.vh-plate { color: var(--text-muted); font-size: 0.9rem; }
.vh-plate span {
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}
.mini-telemetry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.mini-telemetry small { display: block; color: var(--text-muted); font-size: 0.75rem; }
.mini-telemetry strong { color: var(--green-accent); font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.news-card, .news-article-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.65rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--green-primary);
}
.news-card p, .news-article-card p { color: #cbd5e1; }
.news-article-card { margin-bottom: 1.5rem; }
.news-meta { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.news-cat { background: rgba(74, 222, 128, 0.12); color: var(--green-accent); font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 4px; }

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #0b2416 0%, #0b6623 100%);
    color: #ffffff;
    padding: 3.5rem 0;
    border-top: 3px solid var(--gold-primary);
}
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta-inner h2 { margin: 0 0 0.3rem; }
.cta-inner p { margin: 0; color: #d1fae5; }

/* Page Header */
.page-header {
    background: var(--bg-surface);
    padding: 3.2rem 0;
    border-bottom: 3px solid var(--gold-primary);
}
.header-flex { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.page-header h1 { margin: 0.2rem 0 0.5rem; font-size: 2.3rem; }
.page-header p { margin: 0; color: var(--text-muted); max-width: 680px; }

/* Fleet Grid & Telemetry */
.filter-bar { display: flex; gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.filter-btn {
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: #cbd5e1;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.filter-btn.active { background: var(--green-primary); color: #ffffff; border-color: var(--gold-primary); }
.fleet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.fleet-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.fleet-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: var(--bg-surface-2);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.85rem;
}
.status-pill { font-size: 0.76rem; padding: 0.18rem 0.65rem; border-radius: 99px; font-weight: 700; }
.status-ok { background: rgba(34, 197, 94, 0.16); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.35); }
.status-warn { background: rgba(244, 180, 0, 0.16); color: var(--gold-primary); border: 1px solid rgba(244, 180, 0, 0.35); }
.status-neutral { background: rgba(148, 163, 184, 0.14); color: #94a3b8; }

.fleet-placeholder {
    padding: 1.6rem 1.25rem;
    background: linear-gradient(135deg, #0d1712 0%, #15261d 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border);
}
.placeholder-stripe {
    position: absolute;
    top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, var(--green-primary) 65%, var(--gold-primary) 65%);
}
.bus-brand-tag { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-primary); font-weight: 800; }
.fleet-placeholder strong { font-family: 'Montserrat', sans-serif; font-size: 1.35rem; color: #fff; margin: 0.2rem 0; }
.fleet-placeholder small { color: var(--text-muted); }
.fleet-placeholder code { color: var(--green-accent); }

.fleet-body { padding: 1.4rem; }
.plate-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.fleet-plate {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    background: #090e0b;
    border: 1px solid #334155;
    color: #fff;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
}
.mileage-badge { font-family: 'JetBrains Mono', monospace; color: var(--gold-primary); font-weight: 700; }

.telemetry-bar-group { margin-bottom: 1.1rem; }
.t-label { display: flex; justify-content: space-between; font-size: 0.84rem; margin-bottom: 0.35rem; color: #cbd5e1; }
.progress-track { height: 8px; background: #090e0b; border-radius: 99px; overflow: hidden; border: 1px solid var(--border); }
.progress-fill { height: 100%; border-radius: 99px; }
.fill-green { background: linear-gradient(90deg, var(--green-primary), var(--green-accent)); }
.fill-danger { background: #ef4444; }

.spec-table { width: 100%; font-size: 0.86rem; border-collapse: collapse; }
.spec-table th { text-align: left; color: var(--text-muted); padding: 0.4rem 0; font-weight: 500; border-bottom: 1px solid rgba(31, 51, 40, 0.6); }
.spec-table td { text-align: right; font-weight: 600; padding: 0.4rem 0; color: #e2e8f0; border-bottom: 1px solid rgba(31, 51, 40, 0.6); }

.maintenance-box {
    margin-top: 1.2rem;
    background: #0c130f;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.95rem;
}
.maintenance-box h4 { margin: 0 0 0.65rem; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gold-primary); }
.maint-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.maint-item { background: var(--bg-surface); padding: 0.45rem 0.6rem; border-radius: 6px; border: 1px solid var(--border); }
.maint-item span { display: block; font-size: 0.72rem; color: var(--text-muted); }
.maint-item strong { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: #e2e8f0; }

/* Concessions & Map KPIs */
.line-card {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    align-items: center;
}
.line-badge-box {
    min-width: 120px;
    text-align: center;
    background: var(--bg-surface-2);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    border-bottom: 4px solid var(--gold-primary);
}
.line-number { display: block; font-family: 'Montserrat', sans-serif; font-size: 1.25rem; font-weight: 900; color: var(--green-accent); }
.line-cat { font-size: 0.72rem; text-transform: uppercase; color: var(--text-muted); }
.line-details h3 { margin: 0; font-size: 1.3rem; }
.price-tag { background: rgba(244, 180, 0, 0.14); color: var(--gold-primary); border: 1px solid rgba(244, 180, 0, 0.35); padding: 0.25rem 0.7rem; border-radius: 6px; font-size: 0.84rem; font-weight: 700; }

.map-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}
.map-kpi { background: #0c130f; border: 1px solid var(--border); padding: 0.65rem 0.8rem; border-radius: 8px; }
.map-kpi small { display: block; font-size: 0.72rem; color: var(--text-muted); }
.map-kpi strong { font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; }

/* Dark Tables & Search */
.table-responsive { overflow-x: auto; }
.dark-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.dark-table th {
    background: var(--bg-surface-2);
    color: var(--gold-primary);
    text-align: left;
    padding: 0.9rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.84rem;
    border-bottom: 2px solid var(--border);
}
.dark-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
.dark-table tr:hover td { background: rgba(255,255,255,0.02); }
.dark-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    min-width: 290px;
    font-family: inherit;
}
.dark-input:focus { outline: none; border-color: var(--gold-primary); }

.badge-ai { background: rgba(148, 163, 184, 0.16); color: #94a3b8; font-size: 0.72rem; padding: 0.1rem 0.45rem; border-radius: 4px; margin-left: 0.4rem; }
.badge-human { background: rgba(74, 222, 128, 0.15); color: var(--green-accent); font-size: 0.72rem; padding: 0.1rem 0.45rem; border-radius: 4px; margin-left: 0.4rem; }

/* Forms */
.form-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-top: 5px solid var(--green-primary);
}
.vpsg-form .form-group { margin-bottom: 1.1rem; }
.vpsg-form label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; color: #cbd5e1; }
.vpsg-form input, .vpsg-form select, .vpsg-form textarea {
    width: 100%;
    padding: 0.68rem 0.85rem;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: #ffffff;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}
.vpsg-form input:focus, .vpsg-form select:focus, .vpsg-form textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.alert { padding: 0.9rem 1.1rem; border-radius: 6px; margin-bottom: 1.2rem; font-weight: 600; }
.alert-success { background: rgba(34, 197, 94, 0.16); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.4); }
.alert-error { background: rgba(239, 68, 68, 0.16); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.4); }
.info-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold-primary);
    padding: 1.1rem 1.3rem;
    border-radius: 6px;
}
.info-box h4 { margin: 0 0 0.4rem; color: var(--gold-primary); }
.info-box p { margin: 0; font-size: 0.92rem; color: #cbd5e1; }

/* Footer */
.main-footer { background: #050806; color: #94a3b8; }
.footer-stripe {
    height: 5px;
    background: linear-gradient(90deg, var(--green-primary) 0%, var(--green-primary) 65%, var(--gold-primary) 65%, var(--gold-primary) 100%);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding: 3.5rem 1.5rem; }
.footer-brand { font-family: 'Montserrat', sans-serif; font-size: 1.75rem; font-weight: 900; font-style: italic; }
.footer-sachsen { color: #ffffff; font-style: normal; font-size: 1.2rem; }
.footer-slogan { font-family: 'Playfair Display', serif; font-style: italic; color: var(--gold-primary); font-size: 1.15rem; margin: 0.4rem 0 0.8rem; }
.footer-col h4 { color: #ffffff; margin-top: 0; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--green-accent); text-decoration: none; }
.footer-col a:hover { color: var(--gold-primary); }
.footer-bottom { background: #030504; padding: 1.2rem 0; font-size: 0.82rem; border-top: 1px solid var(--border); }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* Responsive */
@media (max-width: 1024px) {
    .pillars-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
    .fleet-grid, .split-grid, .footer-grid { grid-template-columns: 1fr; }
    .map-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #0d1511;
        border-bottom: 2px solid var(--gold-primary);
        flex-direction: column;
        padding: 1.5rem;
    }
    .main-nav.open { display: flex; }
    .hero-content h1 { font-size: 2.05rem; }
    .pillars-grid, .stats-grid, .news-grid, .form-row, .maint-grid { grid-template-columns: 1fr; }
    .map-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .line-card { flex-direction: column; align-items: flex-start; }
}


/* ===== Neu: Startseite einspaltig ===== */
.split-grid.split-grid-single { grid-template-columns: 1fr; max-width: 860px; }

/* ===== Neu: Listen-/Tabellenansichten ===== */
.mono { font-family: 'JetBrains Mono', monospace; }
.muted { color: var(--text-muted); }
.filter-bar { align-items: center; }
.fleet-table td, .map-table td { vertical-align: middle; }
.fleet-row { cursor: pointer; }
.fleet-plate-sm { display: inline-block; font-size: 0.82rem; padding: 0.15rem 0.6rem; white-space: nowrap; }
.row-bar { display: flex; align-items: center; gap: 0.6rem; }
.row-bar .progress-track { flex: 1; min-width: 60px; }
.row-bar span { font-size: 0.82rem; min-width: 3.2rem; text-align: right; }
.row-toggle {
    background: transparent; border: 1px solid var(--border); color: var(--text-muted);
    border-radius: 6px; width: 30px; height: 30px; cursor: pointer; transition: transform .2s, color .2s;
}
.row-toggle:hover { color: var(--gold-primary); border-color: var(--gold-primary); }
.row-toggle.open { transform: rotate(180deg); color: var(--gold-primary); }
.fleet-detail-row > td { background: rgba(255,255,255,0.025); padding: 1.25rem 1.5rem !important; }
.fleet-detail { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; }
.fleet-detail h4 { margin: 0 0 0.75rem; color: var(--gold-primary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: .05em; }
.detail-dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0; font-size: 0.88rem; }
.detail-dl dt { color: var(--text-muted); }
.detail-dl dd { margin: 0; }
.fleet-detail .maint-grid { grid-template-columns: repeat(3, 1fr); }

.map-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.map-summary > div { background: var(--bg-card, rgba(255,255,255,0.03)); border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1.1rem; }
.map-summary small { display: block; color: var(--text-muted); font-size: 0.75rem; margin-bottom: 0.2rem; }
.map-summary strong { font-family: 'JetBrains Mono', monospace; font-size: 1.15rem; }
.map-table thead th { white-space: nowrap; }
.map-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

@media (max-width: 1024px) {
    .map-summary { grid-template-columns: repeat(3, 1fr); }
    .fleet-detail { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .map-summary { grid-template-columns: repeat(2, 1fr); }
    .fleet-detail .maint-grid { grid-template-columns: repeat(2, 1fr); }
}


/* =====================================================================
   v3: Lesbare Tabellen, KPI-Kacheln, Live-Anzeige
   ===================================================================== */
.text-danger { color: #f87171; }
.muted { color: var(--text-muted); }
tr[hidden] { display: none !important; }

/* Live-Indikator in der Top-Bar */
.live-indicator { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--text-muted); }
.live-indicator i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-accent); box-shadow: 0 0 8px var(--green-accent); animation: livePulse 2s infinite; }
.live-indicator.is-stale i { background: var(--gold-primary); box-shadow: 0 0 8px var(--gold-primary); animation: none; }
.live-indicator.is-offline i { background: #ef4444; box-shadow: 0 0 8px #ef4444; animation: none; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
[data-live].live-flash { animation: liveFlash 1.2s ease-out; }
@keyframes liveFlash { 0% { background: rgba(244,180,0,.35); box-shadow: 0 0 0 4px rgba(244,180,0,.35); border-radius: 4px; } 100% { background: transparent; box-shadow: 0 0 0 4px transparent; } }

/* KPI-Kacheln */
.kpi-grid { display: grid; gap: 1rem; margin-bottom: 1.75rem; }
.kpi-6 { grid-template-columns: repeat(6, 1fr); }
.kpi-5 { grid-template-columns: repeat(5, 1fr); }
.kpi-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.kpi-card small { color: var(--text-muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi-card strong { font-family: 'Montserrat', sans-serif; font-size: 1.45rem; line-height: 1.2; overflow-wrap: anywhere; }
.kpi-card span { color: var(--text-muted); font-size: 0.8rem; }

/* Tabellen-Karte */
.table-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem; padding: 1rem 1.25rem; background: var(--bg-surface-2); border-bottom: 1px solid var(--border); }
.table-toolbar .filter-bar { margin: 0; }
.toolbar-title { margin: 0; font-size: 1.05rem; }
.toolbar-right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.toolbar-right .dark-input { min-width: 260px; }
.count-label { color: var(--text-muted); font-size: 0.85rem; }
.tab-switch { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.table-scroll { overflow: visible; }
.table-scroll-tall { max-height: 70vh; overflow-y: auto; overflow-x: hidden; }
.table-hint { margin: 0; padding: 0.8rem 1.25rem; color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid var(--border); }
.table-empty { margin: 0; padding: 2rem; text-align: center; color: var(--text-muted); }

.data-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
.data-table thead th {
    position: sticky; top: 0; z-index: 2;
    background: #0e1612; color: var(--text-muted); text-align: left; white-space: nowrap;
    padding: 0.9rem 1.15rem; font-family: 'Montserrat', sans-serif; font-size: 0.72rem;
    font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    border-bottom: 1px solid var(--border); user-select: none;
}
.data-table thead th[data-sort] { cursor: pointer; }
.data-table thead th[data-sort]:hover { color: var(--gold-primary); }
.data-table thead th[data-sort]::after { content: "\2195"; margin-left: 0.4rem; opacity: .35; font-size: 0.8em; }
.data-table thead th.sorted-asc, .data-table thead th.sorted-desc { color: var(--gold-primary); }
.data-table thead th.sorted-asc::after { content: "\25B2"; opacity: 1; }
.data-table thead th.sorted-desc::after { content: "\25BC"; opacity: 1; }
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table td { padding: 1.05rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,0.06); vertical-align: middle; line-height: 1.4; }
.data-table tbody tr.data-row { transition: background .15s; }
.data-table tbody tr.data-row:nth-of-type(4n+1), .data-table tbody tr.data-row:nth-of-type(4n+3) { background: transparent; }
.data-table tbody tr.data-row:hover { background: rgba(255,255,255,0.035); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .col-toggle { width: 52px; text-align: center; }

.empty-cell { text-align: center; color: var(--text-muted); padding: 2.5rem 1rem !important; }
.cell-title { font-weight: 700; font-size: 0.98rem; color: #fff; }
.cell-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Kennzeichen */
.plate { display: inline-block; background: #f4f1e8; color: #111; font-weight: 800; letter-spacing: .06em; font-size: 0.85rem; padding: 0.22rem 0.7rem; border-radius: 5px; border: 2px solid #111; white-space: nowrap; font-family: 'Montserrat', sans-serif; }

/* Status-Chips */
.chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.28rem 0.75rem; border-radius: 99px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-ok { background: rgba(74,222,128,.13); color: var(--green-accent); }
.chip-warn { background: rgba(244,180,0,.15); color: var(--gold-primary); }
.chip-danger { background: rgba(239,68,68,.16); color: #f87171; }
.chip-gold { background: rgba(244,180,0,.15); color: var(--gold-primary); }
.chip-muted { background: rgba(148,163,184,.14); color: #a8b4c6; }
.lvl-text-ok { color: var(--green-accent); }
.lvl-text-warn { color: var(--gold-primary); }
.lvl-text-danger { color: #f87171; }

/* Balken */
.meter { height: 8px; background: #070b09; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; transition: width .6s ease; }
.meter-fill.lvl-ok { background: linear-gradient(90deg, var(--green-primary), var(--green-accent)); }
.meter-fill.lvl-warn { background: linear-gradient(90deg, #b88700, var(--gold-primary)); }
.meter-fill.lvl-danger { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.meter-fill.lvl-gold { background: linear-gradient(90deg, #7a5a00, var(--gold-primary)); }
.meter-label { margin-bottom: 0.35rem; font-size: 0.9rem; }

/* Aufklapp-Zeile */
.row-toggle { background: transparent; border: 1px solid var(--border); color: var(--text-muted); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; transition: transform .2s, color .2s, border-color .2s; }
.row-toggle:hover { color: var(--gold-primary); border-color: var(--gold-primary); }
.row-toggle[aria-expanded="true"] { transform: rotate(180deg); color: var(--gold-primary); border-color: var(--gold-primary); }
tr.data-row.is-open { background: rgba(244,180,0,0.04); }
.detail-row > td { padding: 0 !important; background: #0c130f; }
.detail-panel { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2.5rem; padding: 1.5rem 1.75rem 1.75rem; border-left: 3px solid var(--gold-primary); }
.detail-panel h4 { margin: 0 0 1rem; color: var(--gold-primary); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .08em; }
.detail-dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.5rem; margin: 0; font-size: 0.9rem; }
.detail-dl dt { color: var(--text-muted); }
.detail-dl dd { margin: 0; color: #fff; }
.svc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.75rem; }
.svc-head { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; font-size: 0.88rem; }
.svc-head span { color: #cbd5e1; }

@media (max-width: 1200px) { .kpi-6 { grid-template-columns: repeat(3, 1fr); } .kpi-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .detail-panel { grid-template-columns: 1fr; gap: 1.5rem; } }
@media (max-width: 720px) {
    .kpi-6, .kpi-5 { grid-template-columns: repeat(2, 1fr); }
    .svc-list { grid-template-columns: 1fr; }
    .toolbar-right .dark-input { min-width: 0; width: 100%; }
    .toolbar-right { width: 100%; }
    .live-indicator { display: none; }
}


/* =====================================================================
   v4: Tabellen ohne Scrollbalken, Hallenübersicht
   ===================================================================== */
.data-table th, .data-table td { overflow-wrap: anywhere; word-break: normal; }
.data-table thead th { white-space: normal; padding: 0.85rem 0.75rem; line-height: 1.25; vertical-align: bottom; }
.data-table thead th small { text-transform: none; letter-spacing: 0; font-weight: 500; opacity: .8; }
.data-table td { padding: 0.9rem 0.75rem; }
.data-table th.num, .data-table td.num { white-space: normal; }
.data-table .cv { min-width: 0; }
.data-table .cell-title { font-size: 0.93rem; }
.data-table .chip { white-space: normal; padding: 0.25rem 0.65rem; font-size: 0.76rem; }
.data-table .plate { font-size: 0.78rem; padding: 0.2rem 0.5rem; white-space: nowrap; }
.data-table .col-toggle { width: auto; padding-left: 0.2rem; padding-right: 0.5rem; }
.plate-sm { font-size: 0.72rem !important; padding: 0.12rem 0.45rem !important; }

/* Hallen-Filterleiste */
.depot-bar { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; padding: 0.8rem 1.25rem; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.015); }
.depot-bar-label { color: var(--text-muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.depot-bar .filter-bar { margin: 0; }
.depot-bar .filter-btn { padding: 0.4rem 0.9rem; font-size: 0.85rem; }

/* Hallenübersicht */
.depot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.1rem; margin-bottom: 2rem; }
.depot-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.2rem 1.2rem; cursor: pointer; transition: border-color .15s, background .15s; outline: none; }
.depot-card:hover, .depot-card:focus-visible { border-color: var(--green-accent); }
.depot-card.active { border-color: var(--gold-primary); background: rgba(244,180,0,0.05); box-shadow: 0 0 0 1px var(--gold-primary) inset; }
.depot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.depot-head strong { display: block; font-family: 'Montserrat', sans-serif; font-size: 1.15rem; color: #fff; }
.depot-head span { color: var(--text-muted); font-size: 0.82rem; }
.depot-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.6rem; }
.slot { border-radius: 9px; padding: 0.55rem 0.65rem; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; border: 1px solid var(--border); }
.slot b { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.slot small { font-size: 0.75rem; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .plate { align-self: flex-start; }
.slot-busy { background: rgba(74,222,128,.07); border-color: rgba(74,222,128,.35); }
.slot-workshop { background: rgba(244,180,0,.08); border-color: rgba(244,180,0,.45); }
.slot-workshop b { color: var(--gold-primary); }
.slot-empty { border-style: dashed; background: transparent; justify-content: center; min-height: 72px; }
.slot-empty small { color: var(--text-muted); }

/* ---- Karten-Ansicht statt Tabelle auf schmalen Bildschirmen (kein Scrollen nötig) ---- */
@media (max-width: 1080px) {
    .data-table, .data-table tbody { display: block; width: 100%; }
    .data-table colgroup, .data-table thead { display: none; }
    .data-table tbody tr.data-row { display: block; margin: 0.9rem; padding: 0.4rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-surface-2); }
    .data-table tbody tr.data-row.is-open { border-color: var(--gold-primary); }
    .data-table tbody tr.data-row td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); text-align: right; }
    .data-table tbody tr.data-row td:last-child { border-bottom: 0; }
    .data-table tbody tr.data-row td::before { content: attr(data-label); flex: 0 0 38%; text-align: left; color: var(--text-muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
    .data-table tbody tr.data-row td.col-toggle { justify-content: center; }
    .data-table tbody tr.data-row td.col-toggle::before { content: none; }
    .data-table .cv { flex: 1; text-align: right; }
    .data-table td.col-meter .cv { display: flex; align-items: center; gap: 0.75rem; justify-content: flex-end; }
    .data-table td.col-meter .meter { flex: 1; max-width: 160px; }
    .data-table td.col-meter .meter-label { margin: 0; }
    .data-table tbody tr.detail-row { display: block; margin: -0.5rem 0.9rem 0.9rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
    .data-table tbody tr.detail-row[hidden] { display: none !important; }
    .data-table tbody tr.detail-row > td { display: block; }
    .data-table tbody tr:not(.data-row):not(.detail-row) td { display: block; }
    .table-scroll-tall { max-height: none; }
}


/* Custom Scrollbars matching VPSG Darkmode Design */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #090e0b;
}
::-webkit-scrollbar-thumb {
    background: #1b2e21;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
::-webkit-scrollbar-thumb:hover {
    background: #10b981;
}

/* Firefox scrollbar support */
* {
    scrollbar-width: thin;
    scrollbar-color: #1b2e21 #090e0b;
}
