body {
    font-family: 'Roboto', sans-serif;
    background: #101820;
    color: #eee;
    margin: 0;
}

h1 {
    text-align: center;
    color: #4caf50;
    margin-top: 20px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    grid-auto-rows: calc((100vh - 46px - 20px - 90px) / 10);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
}

.card {
    background: #292451;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.87);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Taşmayı engelle */
}

.card h2 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

.card .value {
    font-size: 1.8em;
    margin-top: 5px;
    font-weight: 600;
}

.card small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #ddd;
}

.graph {
    background: #262626;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.graph h2 {
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.live-map-card { padding: 10px; overflow: hidden; display: flex; flex-direction: column; }
.live-map-card h2 { margin: 0 0 6px; }
#live-map-status { color: #9fb3c8; font-size: 11px; font-weight: 400; }
.live-map-canvas { min-height: 0; flex: 1; border-radius: 7px; overflow: hidden; background: #0b1720; }

/* --- F1 TELEMETRY VEHICLE MARKER --- */
.telemetry-vehicle-marker {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.vehicle-arrow-wrapper {
    position: relative;
    width: 28px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.vehicle-arrow-svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- YENİ REPLAY MODÜLÜ --- */
.replay-overlay { position: fixed; inset: 0; z-index: 3000; background: rgba(16, 24, 32, 0.95); backdrop-filter: blur(8px); display: flex; padding: 16px; }
.rp-panel { flex: 1; background: #121c24; border-radius: 12px; border: 1px solid #2a3f50; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }

/* Header */
.rp-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: #182630; border-bottom: 1px solid #2a3f50; }
.rp-header-left { display: flex; align-items: center; gap: 10px; }
.rp-logo { color: #4fc3f7; font-size: 18px; }
.rp-header h2 { margin: 0; color: #fff; font-size: 18px; letter-spacing: 0.5px; }
.rp-header-controls { display: flex; align-items: center; gap: 12px; }
.rp-date-label { display: flex; flex-direction: column; color: #a9bcc9; font-size: 11px; gap: 4px; }
.rp-date-label input { background: #0b1116; border: 1px solid #3c5966; color: #eee; padding: 6px 10px; border-radius: 6px; color-scheme: dark; font-family: inherit; font-size: 13px; }
.rp-btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; transition: all 0.2s; font-size: 13px; }
.rp-btn-primary { background: #00d9ff; color: #000; }
.rp-btn-primary:hover:not(:disabled) { background: #00b8d4; }
.rp-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.rp-btn-ghost { background: transparent; color: #e57373; border: 1px solid #e57373; }
.rp-btn-ghost:hover { background: rgba(229, 115, 115, 0.1); }

/* Body Layout */
.rp-body { display: flex; flex: 1; overflow: hidden; }
.rp-left { flex: 1; display: flex; flex-direction: column; border-right: 1px solid #2a3f50; }
.rp-right { width: 440px; display: flex; flex-direction: column; background: #121c24; }

/* Harita & Lap Panel */
.rp-map { flex: 1; min-height: 0; background: #0b1116; }
.rp-lap-panel { padding: 12px; background: #0d151c; border-top: 1px solid #2a3f50; }
.rp-lap-panel-empty { color: #666; text-align: center; font-size: 13px; padding: 10px; font-style: italic; }
.rp-active-lap { display: flex; flex-direction: column; gap: 8px; }
.rp-al-header { display: flex; align-items: center; gap: 12px; }
.rp-al-num { font-weight: bold; color: #fff; background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 12px; font-size: 13px; }
.rp-pit-badge { background: #f44336; color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.rp-al-pilot { font-size: 13px; font-weight: 500; }
.rp-al-pilot-none { color: #888; font-size: 12px; font-style: italic; }
.rp-al-metrics { display: flex; gap: 16px; flex-wrap: wrap; }
.rp-al-row { display: flex; flex-direction: column; }
.rp-al-row span { color: #888; font-size: 11px; }
.rp-al-row b { color: #eee; font-size: 13px; font-weight: 500; }

/* Sağ Panel - Metrikler */
.rp-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #2a3f50; border-bottom: 1px solid #2a3f50; }
.rp-metric-card { background: #121c24; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.rp-mc-icon { font-size: 18px; margin-bottom: 4px; }
.rp-mc-label { font-size: 10px; color: #888; text-transform: uppercase; margin-bottom: 2px; }
.rp-mc-value { font-size: 18px; font-weight: 600; color: var(--mc-color, #eee); }
.rp-mc-unit { font-size: 10px; color: #666; }

/* Timeline & Controls */
.rp-time-display { text-align: center; font-size: 13px; color: #00d9ff; padding: 12px 0 4px; font-family: monospace; }
.rp-controls { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 8px 0; }
.rp-ctrl-btn { background: #223540; border: none; color: #eee; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all 0.2s; }
.rp-ctrl-btn:hover { background: #2a4352; transform: scale(1.05); }
.rp-play-btn { width: 44px; height: 44px; background: #00d9ff; color: #000; font-size: 18px; }
.rp-play-btn:hover { background: #00b8d4; }
.rp-speed-btns { display: flex; background: #0b1116; border-radius: 16px; padding: 2px; margin-left: 10px; }
.rp-speed-btn { background: transparent; border: none; color: #888; padding: 4px 12px; font-size: 12px; cursor: pointer; border-radius: 14px; transition: all 0.2s; }
.rp-speed-btn.active { background: #223540; color: #fff; }

/* Slider & Laps */
.rp-timeline-wrap { padding: 10px 20px 20px; position: relative; border-bottom: 1px solid #2a3f50; }
.rp-slider { width: 100%; -webkit-appearance: none; background: #223540; height: 4px; border-radius: 2px; outline: none; margin: 0; position: relative; z-index: 2; cursor: pointer; }
.rp-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #00d9ff; cursor: pointer; border: 2px solid #121c24; }
.rp-lap-ticks { position: absolute; left: 20px; right: 20px; top: 22px; height: 14px; pointer-events: none; }
.rp-lap-tick { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.rp-lap-tick::before { content: ''; width: 2px; height: 6px; background: #4fc3f7; border-radius: 1px; }
.rp-tick-label { font-size: 9px; color: #4fc3f7; font-weight: bold; background: #121c24; padding: 0 2px; margin-top: 2px; }
.rp-tick-pit::before { background: #f44336; }
.rp-tick-pit .rp-tick-label { color: #f44336; }

/* ECharts */
.rp-charts { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.rp-chart-block { background: #0d151c; border-radius: 8px; padding: 8px; border: 1px solid #1f303d; }
.rp-chart-title { font-size: 11px; color: #a9bcc9; margin-bottom: 4px; padding-left: 4px; }
.rp-chart-canvas { height: 140px; width: 100%; }

/* Harita MapLibre Lap Marker */
.rp-lap-map-marker { background: #fff; color: #000; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; box-shadow: 0 2px 4px rgba(0,0,0,0.5); border: 2px solid #4fc3f7; cursor: help; }
.rp-lap-map-marker.pit { border-color: #f44336; }

@media (max-width: 900px) {
  .rp-body { flex-direction: column; }
  .rp-right { width: 100%; border-top: 1px solid #2a3f50; }
  .rp-left { flex: 0 0 40vh; }
}

.chart-time-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flatpickr-input {
    background-color: #262626 !important;
    border: 1px solid #4caf50 !important;
    color: #4caf50 !important;
    padding: 3px 8px !important;
    border-radius: 5px !important;
    font-size: 0.8em !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    text-align: center;
    width: 180px;
    box-shadow: none !important;
}

.flatpickr-input.historical {
    border-color: #fbc02d !important;
    color: #fbc02d !important;
}

.go-live-chart-btn {
    padding: 3px 8px;
    font-size: 0.8em;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #4caf50;
    color: white;
    transition: background 0.2s;
}

.go-live-chart-btn:hover {
    background: #45a049;
}

canvas {
    width: 100%;
    flex-grow: 1;
    min-height: 150px;
    /* Minimum yükseklik */
}

/* Özel Kart Stilleri */
.control-card {
    background: #262626;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    /* Card'dan almadığı için eklendi */
}

/* Viewer kullanıcısı kontrol paneline erişemez */
.control-restricted {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    text-align: center;
    padding: 20px;
    user-select: none;
}
.cr-icon {
    font-size: 2.4em;
    opacity: 0.4;
    filter: grayscale(0.3);
}
.cr-title {
    font-size: 0.95em;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.cr-msg {
    font-size: 0.82em;
    color: #555;
    line-height: 1.5;
}
.cr-msg b {
    color: #e57373;
    font-weight: 600;
}
.cr-sub {
    font-size: 0.72em;
    color: #3a3a3a;
    line-height: 1.5;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
    margin-top: 4px;
}

.mppt-currents-card {
    background: #fff;
    color: #333;
    padding: 10px;
    border-radius: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mppt-currents-card h2 {
    color: #555;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.mppt-currents-card .mppt-row {
    font-size: 1em;
    margin-bottom: 5px;
}

.mppt-currents-card .mppt-row b {
    font-weight: 600;
    min-width: 60px;
    display: inline-block;
    font-size: 0.9em;
}

.mppt-currents-card .mppt-row .value {
    font-size: 1em;
    font-weight: 600;
    color: #000;
}

.mppt-currents-card hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 5px 0;
}

.gauge-card {
    position: relative;
    background: #262626;
    padding: 10px;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    /* Card'dan almadığı için eklendi */
}

.gauge-card h2 {
    color: white;
    margin-bottom: 5px;
    text-align: center;
    font-size: 14px;
}

.gauge-canvas-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

#speedGaugeChart {
    max-width: 100%;
    max-height: 100%;
}

.gauge-text {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8em;
    font-weight: 600;
    color: white;
    text-align: center;
}

.gauge-text small {
    display: block;
    font-size: 0.4em;
    font-weight: 400;
    color: #aaa;
    margin-top: -5px;
}

/* Kontrol Butonları Stilleri */
button.control-button {
    width: 90%;
    padding: 12px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #4caf50;
    color: white;
    transition: background 0.2s;
    margin-top: 5px;
    margin-bottom: 5px;
}

button.control-button:hover {
    background: #45a049;
}

button.power-button {
    background: #f44336;
}

button.power-button.on {
    background: #4caf50;
}

textarea.control-textarea {
    width: 90%;
    height: 60px;
    background: #333;
    border: 1px solid #555;
    color: white;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

/* Flatpickr Takvim Stilleri */
.flatpickr-calendar {
    z-index: 10001 !important;
    /* Tam ekran modal'ın (10000) üstünde */
    background: #262626 !important;
    border: 1px solid #555 !important;
    color: #eee !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
}

.flatpickr-month,
.flatpickr-weekday,
.flatpickr-weekdays,
.numInputWrapper .numInput {
    color: #ccc !important;
    fill: #ccc !important;
}

.flatpickr-day {
    color: #ddd !important;
    border-radius: 4px !important;
    border: 1px solid transparent !important;
}

.flatpickr-day:hover {
    background: #444 !important;
    color: #fff !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
}

.flatpickr-day.inRange {
    background: rgba(33, 150, 243, 0.3) !important;
    border-color: transparent !important;
    box-shadow: -5px 0 0 rgba(33, 150, 243, 0.3), 5px 0 0 rgba(33, 150, 243, 0.3) !important;
    color: #eee !important;
}

.flatpickr-day.today {
    border-color: #fbc02d !important;
    color: #fbc02d !important;
}

.flatpickr-time {
    border-top: 1px solid #555 !important;
    background: #333 !important;
}

.flatpickr-time input,
.flatpickr-time .flatpickr-am-pm {
    background: #444 !important;
    color: #eee !important;
    border: 1px solid #666 !important;
}

.flatpickr-time .numInputWrapper span:hover {
    background: #555 !important;
}

.flatpickr-calendar .flatpickr-presets {
    padding: 5px;
    text-align: center;
    border-top: 1px solid #555;
    background: #333 !important;
}

.flatpickr-calendar .flatpickr-presets button {
    background: #444;
    color: #eee;
    border: none;
    padding: 5px 8px;
    margin: 2px;
    border-radius: 4px;
    cursor: pointer;
}

.flatpickr-calendar .flatpickr-presets button:hover {
    background: #555;
}

/* --- Yüklenme Spinner Stili --- */
#loading-spinner {
    position: fixed;
    /* Sayfanın tamamını kaplasın */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Hafif karartma */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 8px solid #f3f3f3;
    /* Açık gri */
    border-top: 8px solid #2196f3;
    /* Mavi (Tema rengin) */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Toast Bildirim Stilleri --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 20px;
    border-radius: 5px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(100%);
    /* Sağdan kayarak gelsin */
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background-color: #4CAF50;
    /* Yeşil */
}

.toast.error {
    background-color: #f44336;
    /* Kırmızı */
}

.toast.info {
    background-color: #2196F3;
    /* Mavi */
}

/* style.css */
.echart-container {
    width: 100%;
    height: 100%;
    /* Başlık vs. için olan boşluğu hesaba katmak gerekebilir, 
       ama önce 'maintainAspectRatio:false' sorununu çözdüğümüz 
       .graph { display: flex; ... } kodun varsa bu gerekmeyebilir. */

    /* Önceki .graph canvas CSS'inden daha basit bir çözüm: */
    /* .graph'ın yüksekliği grid tarafından ayarlanıyor varsayalım */
    /* .graph h2'nin yüksekliği ~40px diyelim */
    height: calc(100% - 40px);
    /* Başlık yüksekliğini dikey alandan düş */
}

/* Önceki Plan B çözümümüz zaten varsa, bu daha iyidir: */
.graph {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.graph h2 {
    flex-shrink: 0;
}

.echart-container {
    /* Canvas yerine */
    flex-grow: 1;
    min-height: 0;
    width: 100%;
}

.gauge-card {
    position: relative;
    /* Yazının konumlanması için */
}

.gauge-card .echart-container {
    width: 100%;
    /* Yüksekliği 'h2' başlığı (~40px) ve alt metni (~30px) düşerek ayarla */
    height: calc(100% - 70px);
}

.gauge-card .gauge-text {
    /* Bu, göstergenin tam ortasına metni yerleştirir */
    position: absolute;
    bottom: 15%;
    /* Göstergenin merkezine yakın bir yer */
    left: 50%;
    transform: translateX(-50%);
    font-size: 2em;
    font-weight: bold;
    color: #fff;
}

.gauge-card .gauge-text small {
    font-size: 0.5em;
    color: #aaa;
}

#login-box h1 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

#login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #555;
    background-color: #333;
    color: white;
    border-radius: 4px;
    box-sizing: border-box;
    /* Önemli */
}

#login-box button {
    width: 100%;
    padding: 12px;
    background-color: #2196f3;
    /* Panelin ana mavi rengi */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.2s;
}

#login-box button:hover {
    background-color: #1a78c2;
}

#login-error-message {
    color: #f44336;
    /* Kırmızı */
    margin-top: 15px;
    display: none;
    /* Başlangıçta gizli */
}

/* Yeni eklenen <select> menüsü için stil */
#login-box select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #555;
    background-color: #333;
    color: white;
    border-radius: 4px;
    box-sizing: border-box;
    /* Önemli */
    font-family: inherit;
    /* Yazı tipini koru */
    font-size: 1rem;
}

/* Çıkış Yap butonu için (JS'e ekleyeceğiz) */
.logout-button {
    background-color: #b60000 !important;
    /* Kırmızı */
}

.logout-button:hover {
    background-color: #f44336 !important;
    /* Daha parlak kırmızı */
}

/* CSS dosyanıza bu stilleri ekleyin veya güncelleyin */

#login-overlay {
    position: fixed;
    /* Sayfaya sabitlenir, kaydırmadan etkilenmez */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    /* Koyu arka plan */
    display: flex;
    /* ORTALAMA İÇİN GEREKLİ */
    justify-content: center;
    /* YATAYDA ORTALAMA */
    align-items: center;
    /* DİKEYDE ORTALAMA */
    z-index: 9999;
    /* Her şeyin üstünde olmasını sağlar */
    opacity: 1;
    /* Başlangıçta görünür */
    transition: opacity 0.3s ease;
    /* Yavaşça kaybolması için */
}

/* Bu stiller zaten sizde olmalı, kontrol edin */
#login-box {
    background-color: #2a2a2a;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 300px;
}

/* === TAM EKRAN MOD STİLLERİ === */
.fullscreen-btn {
    padding: 3px 8px;
    font-size: 1.2em;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #333;
    color: white;
    transition: background 0.2s;
    margin-right: 10px;
}

.fullscreen-btn:hover {
    background: #555;
}

/* Tam ekran modal */
#fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #101820;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

#fullscreen-modal.active {
    display: flex;
    flex-direction: column;
}

/* Tam ekran başlık */
#fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4caf50;
    gap: 20px;
}

#fullscreen-title {
    color: #4caf50;
    font-size: 1.5em;
    margin: 0;
    flex-shrink: 0;
}

#fullscreen-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    justify-content: center;
}

#fullscreen-close-btn {
    padding: 8px 16px;
    font-size: 1em;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #f44336;
    color: white;
    transition: background 0.2s;
}

#fullscreen-close-btn:hover {
    background: #d32f2f;
}

/* Tam ekran grafik container */
#fullscreen-chart-container {
    flex: 1;
    width: 100%;
    min-height: 0;
}

/* ============================================================================
   Annotation Modal Styles
   ============================================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 10002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #444;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5em;
    cursor: pointer;
}

.annotation-modal-content form {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.timestamp-display {
    padding: 8px;
    background: rgba(251, 192, 45, 0.1);
    border: 1px solid rgba(251, 192, 45, 0.3);
    border-radius: 4px;
    color: #fbc02d;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    flex: 1;
}

.btn-primary {
    background: #fbc02d;
    color: #000;
}

.btn-secondary {
    background: #555;
    color: #fff;
}

.btn-danger {
    background: #f44336;
    color: #fff;
}

/* ============================================================================
   Pin Annotation & CSV Download Button Styles (fullscreen-btn gibi)
   ============================================================================ */
.pin-annotation-btn {
    padding: 3px 8px;
    font-size: 1.2em;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #333;
    color: white;
    transition: background 0.2s;
    margin-right: 5px;
}

.pin-annotation-btn:hover {
    background: #555;
}

.pin-annotation-btn.active {
    background: #fbc02d;
    color: #1a1a1a;
}

.csv-download-btn {
    padding: 3px 8px;
    font-size: 0.8em;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #333;
    color: white;
    transition: background 0.2s;
    margin-right: 10px;
}

.csv-download-btn:hover {
    background: #555;
}

/* ============================================================================
   Dashboard Header (Logout Bar)
   ============================================================================ */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a2e;
    border-bottom: 2px solid #4caf50;
    padding: 8px 20px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    height: 32px;
    width: auto;
}

.header-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #4caf50;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user {
    font-size: 0.9em;
    color: #aaa;
}

.header-role {
    font-size: 0.8em;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.4);
    font-weight: 600;
}

.logout-btn {
    padding: 6px 16px;
    font-size: 0.85em;
    font-weight: 600;
    border: 1px solid #f44336;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    color: #f44336;
    transition: background 0.2s, color 0.2s;
}

.logout-btn:hover {
    background: #f44336;
    color: white;
}

/* ============================================================================
   Status Bar (yeni — bağlantı durumu + kullanıcı bilgisi)
   ============================================================================ */
#status-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 46px;
    background: #0d1117;
    border-bottom: 1px solid rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

/* Sol: logo + başlık */
#status-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

#status-logo {
    height: 26px;
    width: auto;
    opacity: 0.9;
}

#status-title {
    font-size: 0.95em;
    font-weight: 700;
    color: #4caf50;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

/* Orta: bağlantı durumu */
#status-bar-center {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

/* Yanıp sönen nokta */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.4s ease;
}

.status-dot.connected {
    background: #4caf50;
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    animation: pulse-green 2s infinite;
}

.status-dot.warning {
    background: #fbc02d;
    box-shadow: 0 0 0 0 rgba(251, 192, 45, 0.7);
    animation: pulse-yellow 1.5s infinite;
}

.status-dot.disconnected {
    background: #f44336;
    box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    animation: pulse-red 1s infinite;
}

@keyframes pulse-green {
    0%   { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

@keyframes pulse-yellow {
    0%   { box-shadow: 0 0 0 0 rgba(251, 192, 45, 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(251, 192, 45, 0); }
    100% { box-shadow: 0 0 0 0 rgba(251, 192, 45, 0); }
}

@keyframes pulse-red {
    0%   { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7); }
    70%  { box-shadow: 0 0 0 8px rgba(244, 67, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

#status-label {
    font-size: 0.85em;
    font-weight: 600;
    color: #eee;
    white-space: nowrap;
}

.status-freq {
    font-size: 0.78em;
    color: #888;
    white-space: nowrap;
}

/* Sağ: badge'ler + çıkış butonu */
#status-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.status-badge {
    font-size: 0.8em;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.07);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
}

.status-badge.user-badge {
    background: rgba(76, 175, 80, 0.12);
    color: #81c784;
    border-color: rgba(76, 175, 80, 0.3);
}

.status-logout-btn {
    padding: 4px 14px;
    font-size: 0.8em;
    font-weight: 600;
    border: 1px solid rgba(244, 67, 54, 0.5);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    color: #ef9a9a;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.status-logout-btn:hover {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

/* Pilot butonu — status bar'da */
.status-pilot-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px;
    font-size: 0.8em;
    font-weight: 600;
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 6px;
    cursor: pointer;
    background: rgba(76, 175, 80, 0.08);
    color: #81c784;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.status-pilot-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
    color: #a5d6a7;
}
.status-pilot-btn .sp-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

/* ============================================================================
   Tur Paneli Widget
   ============================================================================ */
.laps-widget-card {
    background: #0f1923;
    border: 1px solid rgba(76, 175, 80, 0.25);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.laps-widget-inner { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.lw-loading { display: flex; align-items: center; justify-content: center; height: 100%; color: #555; font-size: 0.85em; }
.lw-header { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; background: rgba(76,175,80,0.08); border-bottom: 1px solid rgba(76,175,80,0.2); flex-shrink: 0; }
.lw-title { font-size: 0.78em; font-weight: 700; color: #4caf50; letter-spacing: 0.8px; }
.lw-hdr-actions { display: flex; align-items: center; gap: 6px; }
.lw-count { font-size: 0.72em; color: #666; white-space: nowrap; }
.lw-icon-btn { background: none; border: none; cursor: pointer; font-size: 0.85em; color: #777; padding: 2px 4px; border-radius: 4px; transition: color 0.2s, background 0.2s; }
.lw-icon-btn:hover { color: #f44336; background: rgba(244,67,54,0.1); }
.lw-compare-btn { padding: 3px 10px; font-size: 0.75em; font-weight: 600; border: 1px solid rgba(76,175,80,0.5); border-radius: 5px; background: transparent; color: #4caf50; cursor: pointer; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.lw-compare-btn:hover { background: #4caf50; color: #000; }
.lw-compare-btn:disabled { opacity: 0.3; cursor: default; }
.lw-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }
.lw-col-last { flex: 1.4; padding: 8px 10px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.lw-divider { width: 1px; background: rgba(255,255,255,0.07); flex-shrink: 0; margin: 6px 0; }
.lw-col-remain { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.lw-last { display: flex; flex-direction: column; gap: 4px; }
.lw-lap-badge { font-size: 0.68em; font-weight: 700; color: #4caf50; letter-spacing: 1px; margin-bottom: 2px; }
.lw-metrics-row { display: flex; flex-wrap: wrap; gap: 6px; }
.lw-m { font-size: 0.75em; color: #ccc; background: rgba(255,255,255,0.05); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.lw-m b { color: #fff; }
.lw-temp-row { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.lw-t { font-size: 0.7em; padding: 1px 5px; border-radius: 3px; font-weight: 600; }
.lw-t.temp-ok   { background: rgba(76,175,80,0.15);  color: #81c784; }
.lw-t.temp-warm { background: rgba(251,192,45,0.15); color: #fbc02d; }
.lw-t.temp-hot  { background: rgba(244,67,54,0.15);  color: #ef5350; }
.lw-empty-hint { color: #555; font-size: 0.78em; text-align: center; line-height: 1.5; }
.lw-remaining { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.lw-remain-val { font-size: 1.8em; font-weight: 700; color: #4caf50; line-height: 1; }
.lw-remain-val.warn   { color: #fbc02d; }
.lw-remain-val.danger { color: #f44336; animation: lap-blink 1s step-start infinite; }
@keyframes lap-blink { 50% { opacity: 0.4; } }
.lw-remain-label { font-size: 0.7em; color: #888; letter-spacing: 0.5px; }
.lw-soc-bar-wrap { display: flex; align-items: center; gap: 5px; width: 100%; margin: 3px 0; }
.lw-soc-bar { flex: 1; height: 5px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.lw-soc-fill { height: 100%; background: #4caf50; border-radius: 3px; transition: width 0.5s ease; }
.lw-soc-fill.warn     { background: #fbc02d; }
.lw-soc-fill.critical { background: #f44336; }
.lw-soc-txt  { font-size: 0.7em; color: #aaa; white-space: nowrap; }
.lw-remain-sub { font-size: 0.66em; color: #666; }
.lw-remain-warn { font-size: 0.68em; color: #fbc02d; background: rgba(251,192,45,0.1); border-radius: 4px; padding: 2px 6px; margin-top: 2px; }
.lw-remain-empty { font-size: 0.72em; color: #555; text-align: center; line-height: 1.6; }

/* ============================================================================
   Karşılaştırma Modali — Tam Ekran Redesign
   ============================================================================ */
.laps-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    animation: lm-fade-in 0.2s ease;
}
@keyframes lm-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Panel — neredeyse tam ekran */
.lm-panel {
    position: relative;
    width: 98vw;
    height: 96vh;
    background: #0d1520;
    border: 1px solid rgba(76,175,80,0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(76,175,80,0.1);
    overflow: hidden;
    animation: lm-slide-up 0.25s ease;
}
@keyframes lm-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Header */
.lm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(76,175,80,0.12), rgba(33,150,243,0.06));
    border-bottom: 1px solid rgba(76,175,80,0.2);
    flex-shrink: 0;
    gap: 16px;
}
.lm-header-left { display: flex; align-items: center; gap: 14px; }
.lm-title-icon { font-size: 1.8em; }
.lm-header h2 { margin: 0; font-size: 1.15em; color: #fff; font-weight: 700; }
.lm-header-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.lm-pilot-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.8em; font-weight: 600;
    padding: 3px 10px; border-radius: 20px;
    background: linear-gradient(135deg, rgba(76,175,80,0.2), rgba(33,150,243,0.15));
    color: #81c784; border: 1px solid rgba(76,175,80,0.35);
}
.lm-stat-pill {
    font-size: 0.75em; padding: 2px 8px; border-radius: 12px;
    background: rgba(255,255,255,0.07); color: #aaa;
    border: 1px solid rgba(255,255,255,0.1);
}
.lm-stat-pill.pit { background: rgba(244,67,54,0.1); color: #ef9a9a; border-color: rgba(244,67,54,0.25); }
.lm-hint { font-size: 0.72em; color: #555; }

#lm-close {
    display: flex; align-items: center; gap: 6px;
    background: transparent; border: 1px solid rgba(244,67,54,0.4);
    color: #ef9a9a; border-radius: 8px; padding: 6px 14px;
    cursor: pointer; font-size: 0.85em; font-weight: 600;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
#lm-close:hover { background: #f44336; color: white; border-color: #f44336; }

/* Body: Sol + Sağ */
.lm-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }

/* Sol panel — tur listesi */
.lm-list {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
}
.lm-list-head {
    padding: 10px 14px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.72em; font-weight: 700; color: #666; letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    text-transform: uppercase;
}
.lm-list-head small { font-weight: 400; color: #444; font-size: 0.9em; }
.lm-clear-btn {
    margin-left: auto; font-size: 0.78em; font-weight: 600;
    padding: 3px 9px; border: 1px solid rgba(244,67,54,0.35);
    border-radius: 5px; background: transparent; color: #ef9a9a;
    cursor: pointer; transition: background 0.2s, color 0.2s;
    white-space: nowrap; text-transform: none; letter-spacing: 0;
}
.lm-clear-btn:hover { background: rgba(244,67,54,0.12); color: #f44336; }
.lm-list-items { flex: 1; overflow-y: auto; padding: 6px; }
.lm-list-items::-webkit-scrollbar { width: 4px; }
.lm-list-items::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Tur satırı */
.lm-lap-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 10px; border-radius: 10px; cursor: pointer;
    transition: background 0.15s; border: 1px solid transparent;
    margin-bottom: 4px;
}
.lm-lap-item:hover { background: rgba(255,255,255,0.05); }
.lm-lap-item.selected {
    background: rgba(76,175,80,0.1);
    border-color: rgba(76,175,80,0.35);
    box-shadow: inset 3px 0 0 #4caf50;
}
.lm-lap-item.is-pit { opacity: 0.7; background: rgba(244,67,54,0.04); }
.lm-lap-item.is-pit.selected { border-color: rgba(244,67,54,0.4); box-shadow: inset 3px 0 0 #ef5350; }
.lm-lap-item input[type="checkbox"] { accent-color: #4caf50; flex-shrink: 0; cursor: pointer; }
.lm-lap-info { flex: 1; min-width: 0; }
.lm-lap-title { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; flex-wrap: wrap; }
.lm-lap-num { font-size: 0.85em; font-weight: 700; color: #eee; }
.lm-lap-ts { font-size: 0.72em; color: #4caf50; font-family: monospace; margin-left: auto; }
.lm-lap-date { font-size: 0.65em; color: #555; margin-bottom: 3px; }
.lm-pit-badge { font-size: 0.6em; background: rgba(244,67,54,0.2); color: #ef5350; border: 1px solid rgba(244,67,54,0.4); border-radius: 3px; padding: 1px 4px; font-weight: 700; }
.lm-lap-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.lm-lap-stats span { font-size: 0.7em; color: #777; }
.lm-pit-btn {
    font-size: 0.65em; padding: 3px 7px;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 5px;
    background: transparent; color: #666; cursor: pointer;
    white-space: nowrap; transition: all 0.15s; flex-shrink: 0;
}
.lm-pit-btn:hover { border-color: #ef5350; color: #ef5350; }
.lm-pit-btn.active { border-color: rgba(76,175,80,0.5); color: #81c784; background: rgba(76,175,80,0.1); }
.lm-empty { color: #555; font-size: 0.82em; padding: 20px; text-align: center; }

/* Sağ panel */
.lm-right {
    flex: 1; overflow: hidden; display: flex; flex-direction: column;
    min-width: 0;
}

/* Seçim yapılmadı */
.lm-no-sel {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #444; font-size: 0.9em; text-align: center;
}
.lm-no-sel-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lm-no-sel-icon { font-size: 3em; opacity: 0.3; }

/* Sağ panel iç düzeni: tablo üste küçük, grafikler büyük altta */
.lm-right-inner {
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
}

.lm-comparison-notice {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: 0.85em;
    line-height: 1.4;
    color: #ef9a9a;
}

/* Kompakt metrik tablosu — sabit yükseklik, scroll yok */
.lm-table-compact-wrap {
    flex-shrink: 0;
    overflow-x: auto;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    max-height: 220px;
    overflow-y: auto;
}
.lm-table-compact-wrap::-webkit-scrollbar { width: 4px; height: 4px; }
.lm-table-compact-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Grafikler alanı — kalan tüm yüksekliği kaplar */
.lm-charts-main {
    flex: 1; display: flex; flex-direction: column; min-height: 0;
    gap: 0; overflow: hidden;
}
.lm-chart-block {
    flex: 1; display: flex; flex-direction: column; min-height: 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.lm-chart-block:first-child { border-top: none; }
.lm-chart-title {
    flex-shrink: 0;
    padding: 6px 16px 2px;
    font-size: 0.72em; font-weight: 700; color: #888;
    letter-spacing: 0.4px; text-transform: uppercase;
}
.lm-chart-canvas {
    flex: 1; min-height: 0;
}

/* Tablo — scroll eski */
.lm-table-wrap {
    flex: 1; overflow: auto; padding: 16px 20px 8px 20px;
}
.lm-table-wrap::-webkit-scrollbar { width: 5px; height: 5px; }
.lm-table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* Karşılaştırma tablosu */
.cmp-table { width: 100%; border-collapse: collapse; font-size: 0.8em; }
.cmp-table.compact th { padding: 7px 12px; }
.cmp-table.compact td { padding: 5px 12px; }
.cmp-table th {
    padding: 10px 16px; text-align: center; color: #aaa; font-weight: 600;
    border-bottom: 2px solid rgba(76,175,80,0.3);
    background: rgba(76,175,80,0.05); white-space: nowrap;
    position: sticky; top: 0; z-index: 1;
}
.cmp-table th:first-child { text-align: left; }
.cmp-table td {
    padding: 7px 16px; text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #ccc; transition: background 0.15s;
}
.cmp-table td.metric-label { text-align: left; color: #777; font-size: 0.85em; white-space: nowrap; }
.cmp-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.cmp-table td.cell-best  { color: #66bb6a; font-weight: 700; background: rgba(76,175,80,0.09); }
.cmp-table td.cell-mid   { color: #ffa726; }
.cmp-table td.cell-worst { color: #ef5350; }
.medal { font-size: 0.9em; }

/* Tablo header içi */
.tbl-lap-head { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tbl-lap-color-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tbl-lap-num { font-weight: 700; color: #fff; font-size: 0.95em; }
.tbl-pilot-name { font-size: 0.7em; }
.tbl-lap-time-str { font-size: 0.68em; color: #4caf50; font-family: monospace; }

/* Özet satır */
.cmp-table tr.summary-row td {
    border-top: 2px solid rgba(76,175,80,0.3);
    background: rgba(76,175,80,0.06);
    color: #66bb6a; font-size: 0.88em;
}

/* Widget içindeki pit badge */
.lw-pit-inline {
    font-size: 0.7em; background: rgba(244,67,54,0.2); color: #ef5350;
    border: 1px solid rgba(244,67,54,0.4); border-radius: 3px;
    padding: 1px 4px; font-weight: 700; vertical-align: middle;
}
/* Widget içindeki pilot inline */
.lw-pilot-inline {
    font-size: 0.72em; font-weight: 600; vertical-align: middle;
}

/* Lap listesinde pilot satırı */
.lm-lap-pilot-row { margin: 2px 0 3px; }
.lm-lap-pilot { font-size: 0.72em; font-weight: 600; }
.lm-lap-pilot.no-pilot { color: #555; font-weight: 400; font-style: italic; }

/* Tablo pilot rengi */
.tbl-pilot-name.no-pilot { color: #555; font-style: italic; }

/* Pilot filtresi alanı (modal sol panel) */
.lm-pilot-filter-wrap {
    padding: 8px 10px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.lm-filter-label {
    display: block; font-size: 0.68em; color: #666;
    font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
    margin-bottom: 5px;
}
.lm-filter-select {
    width: 100%;
    padding: 7px 30px 7px 9px;
    border-radius: 7px;
    background-color: #111b26;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2381c784' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    border: 1px solid rgba(76,175,80,0.22);
    color: #d7e6d8;
    font-size: 0.8em;
    cursor: pointer;
    appearance: none;
    outline: none;
}
.lm-filter-select:hover { border-color: rgba(76,175,80,0.38); background-color: #142230; }
.lm-filter-select:focus { border-color: rgba(76,175,80,0.65); box-shadow: 0 0 0 2px rgba(76,175,80,0.12); }
.lm-filter-select option { background: #111b26; color: #d7e6d8; }

/* Timeseries grafik alanı */
.lm-ts-section {
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; flex-direction: column;
    min-height: 280px; max-height: 320px;
}
.lm-ts-header {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 20px 4px;
    flex-shrink: 0;
}
.lm-ts-title { font-size: 0.78em; font-weight: 700; color: #aaa; letter-spacing: 0.4px; }
.lm-ts-hint  { font-size: 0.7em; color: #555; }
.lm-ts-chart-container {
    flex: 1; min-height: 0; padding: 0 8px 8px;
}
.lm-ts-loading, .lm-ts-error {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 0.85em; color: #666;
}
.lm-ts-error { color: #ef9a9a; }

/* ============================================================================
   Pilot Yönetim Modali
   ============================================================================ */
.pm-overlay {
    position: fixed; inset: 0; z-index: 10010;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
    animation: lm-fade-in 0.18s ease;
}
.pm-panel {
    position: relative; width: 480px; max-width: 95vw; max-height: 90vh;
    background: #0d1520; border: 1px solid rgba(76,175,80,0.3);
    border-radius: 16px; display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    overflow: hidden; animation: lm-slide-up 0.2s ease;
}
.pm-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(76,175,80,0.12), rgba(33,150,243,0.06));
    border-bottom: 1px solid rgba(76,175,80,0.2);
    flex-shrink: 0; gap: 12px;
}
.pm-header-left { display: flex; align-items: center; gap: 12px; }
.pm-icon { font-size: 1.6em; }
.pm-header h2 { margin: 0; font-size: 1.05em; color: #fff; font-weight: 700; }
.pm-subtitle { font-size: 0.72em; color: #666; margin-top: 2px; }
#pm-close {
    background: transparent; border: 1px solid rgba(255,255,255,0.15);
    color: #aaa; border-radius: 7px; padding: 5px 11px;
    cursor: pointer; font-size: 0.85em; transition: all 0.2s;
}
#pm-close:hover { background: #f44336; border-color: #f44336; color: white; }

.pm-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 18px; }
.pm-body::-webkit-scrollbar { width: 4px; }
.pm-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.pm-section-title {
    font-size: 0.7em; font-weight: 700; color: #666; letter-spacing: 0.8px;
    text-transform: uppercase; margin-bottom: 10px;
}
.pm-section-title small { font-weight: 400; color: #444; }

/* Aktif pilot alanı */
.pm-active-row { display: flex; align-items: center; gap: 10px; }
.pm-active-dot-wrap { flex-shrink: 0; }
.pm-big-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; transition: background 0.3s; box-shadow: 0 0 6px currentColor; }
.pm-select {
    flex: 1;
    min-width: 0;
    padding: 8px 32px 8px 10px;
    border-radius: 8px;
    background-color: #111b26;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2381c784' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    border: 1px solid rgba(76,175,80,0.24);
    color: #e6f0e7;
    font-size: 0.85em;
    cursor: pointer;
    outline: none;
    appearance: none;
}
.pm-select:hover { border-color: rgba(76,175,80,0.4); background-color: #142230; }
.pm-select:focus { border-color: rgba(76,175,80,0.65); box-shadow: 0 0 0 2px rgba(76,175,80,0.12); }
.pm-select:disabled { opacity: 0.5; cursor: default; }
.pm-select option { background: #111b26; color: #e6f0e7; }
.pm-set-btn {
    padding: 8px 14px; border-radius: 8px; border: none;
    background: rgba(76,175,80,0.25); color: #a5d6a7;
    font-size: 0.82em; font-weight: 600; cursor: pointer;
    transition: background 0.2s; white-space: nowrap;
    border: 1px solid rgba(76,175,80,0.3);
}
.pm-set-btn:hover { background: rgba(76,175,80,0.4); color: #c8e6c9; }
.pm-role-note { font-size: 0.7em; color: #555; margin-top: 6px; }

/* Pilot listesi */
.pm-list { display: flex; flex-direction: column; gap: 4px; }
.pm-pilot-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 9px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.15s;
}
.pm-pilot-row:hover { background: rgba(255,255,255,0.06); }
.pm-pilot-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pm-pilot-name { flex: 1; font-size: 0.88em; color: #eee; font-weight: 500; }
.pm-pilot-actions { display: flex; align-items: center; gap: 8px; }
.pm-active-tag { font-size: 0.68em; color: #81c784; font-weight: 600; }
.pm-del-btn {
    background: none; border: 1px solid rgba(244,67,54,0.3); color: #ef9a9a;
    border-radius: 5px; padding: 2px 7px; font-size: 0.72em; cursor: pointer;
    transition: all 0.15s;
}
.pm-del-btn:hover { background: rgba(244,67,54,0.15); border-color: #f44336; color: #f44336; }
.pm-empty { color: #555; font-size: 0.82em; padding: 10px; text-align: center; }

/* Pilot ekleme formu */
.pm-add-section {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 14px;
}
.pm-add-title { font-size: 0.7em; font-weight: 700; color: #666; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 10px; }
.pm-add-row { display: flex; align-items: center; gap: 8px; }
.pm-input {
    flex: 1; padding: 8px 10px; border-radius: 8px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    color: #eee; font-size: 0.85em; outline: none;
}
.pm-input:focus { border-color: rgba(76,175,80,0.5); }
.pm-input::placeholder { color: #555; }
.pm-color-picker {
    width: 36px; height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
    padding: 2px; background: transparent; cursor: pointer; flex-shrink: 0;
}
.pm-add-submit {
    padding: 8px 14px; border-radius: 8px; border: none;
    background: rgba(76,175,80,0.3); color: #a5d6a7;
    font-size: 0.85em; font-weight: 600; cursor: pointer;
    transition: background 0.2s; white-space: nowrap;
    border: 1px solid rgba(76,175,80,0.4);
}
.pm-add-submit:hover { background: rgba(76,175,80,0.5); color: #c8e6c9; }

/* ============================================================================
   Manual Lap Calculation Toggle & Button
   ============================================================================ */
.lw-calc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s;
}
.lw-calc-toggle:hover {
    background: rgba(76,175,80,0.1);
}
.lw-calc-toggle input[type="checkbox"] {
    display: none;
}
.lw-toggle-track {
    position: relative;
    width: 28px;
    height: 14px;
    background: #444;
    border-radius: 7px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.lw-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background: #888;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.lw-calc-toggle input:checked + .lw-toggle-track {
    background: rgba(76,175,80,0.4);
}
.lw-calc-toggle input:checked + .lw-toggle-track::after {
    transform: translateX(14px);
    background: #4caf50;
}
.lw-toggle-label {
    font-size: 0.7em;
    font-weight: 600;
    color: #aaa;
    white-space: nowrap;
}
.lw-calc-toggle input:checked ~ .lw-toggle-label {
    color: #81c784;
}
.lw-add-lap-btn {
    padding: 3px 8px;
    font-size: 0.72em;
    font-weight: 700;
    border: 1px solid rgba(76,175,80,0.5);
    border-radius: 5px;
    background: transparent;
    color: #4caf50;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
    white-space: nowrap;
}
.lw-add-lap-btn:hover:not(:disabled) {
    background: #4caf50;
    color: #000;
}
.lw-add-lap-btn:disabled {
    opacity: 0.3;
    cursor: default;
    border-color: rgba(255,255,255,0.15);
    color: #666;
}

.lm-lap-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    margin-left: 8px;
}

.lm-del-btn {
    background: none;
    border: 1px solid #555;
    color: #f44336;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.4;
    transition: background 0.15s, border-color 0.15s;
}

.lm-del-btn:hover {
    background: rgba(244, 67, 54, 0.15);
    border-color: #f44336;
}

.lm-date-filter-wrap {
    padding: 8px 10px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.lm-date-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lm-date-input {
    flex: 1;
    padding: 7px 9px;
    border-radius: 7px;
    background-color: #111b26;
    border: 1px solid rgba(76,175,80,0.22);
    color: #d7e6d8;
    font-size: 0.8em;
    cursor: pointer;
    outline: none;
}
.lm-date-input:hover { border-color: rgba(76,175,80,0.38); background-color: #142230; }
.lm-date-input:focus { border-color: rgba(76,175,80,0.65); box-shadow: 0 0 0 2px rgba(76,175,80,0.12); }
.lm-date-clear-btn {
    background: transparent;
    border: 1px solid rgba(244,67,54,0.3);
    color: #ef9a9a;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 0.75em;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    line-height: 1;
}
.lm-date-clear-btn:hover { background: rgba(244,67,54,0.15); border-color: #f44336; color: #f44336; }

.lw-timer-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ============================================================================
   Konsept Tasarım Widget Stilleri (Direksiyon ve G-Force)
   ============================================================================ */

.steering-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    overflow: hidden;
}
.steering-card h2 {
    width: 100%;
    margin-bottom: 10px;
    text-align: left;
    font-size: 11px;
    letter-spacing: 1px;
    color: #eee;
    margin-top: 0;
}
.steering-val {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    text-align: center;
}
.steering-visual {
    position: relative;
    width: 100%;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}
.steering-visual .echart-container {
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 200px;
}
#steering-wheel-img {
    width: 80px;
    height: 80px;
    z-index: 10;
    transition: transform 0.1s linear;
}
.steering-labels {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    z-index: 5;
}

.gforce-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    overflow: hidden;
}
.gforce-card h2 {
    width: 100%;
    margin-bottom: 10px;
    text-align: left;
    font-size: 11px;
    letter-spacing: 1px;
    color: #eee;
    margin-top: 0;
}
.gforce-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
}
.gforce-chart {
    position: relative;
    flex: 1;
    height: 200px;
    min-width: 150px;
}
.gforce-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    padding: 0 15px;
    min-width: 100px;
}
.g-stat {
    text-align: left;
}
.g-stat small {
    color: #888;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}
.g-stat span {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    display: inline-block;
    margin-top: 2px;
}

/* ============================================================================
   STEERING GAUGE WIDGET — sw-* sınıfları
   Gforce widget da bu sınıfı paylaşır (arka plan teması)
   ============================================================================ */

/* .graph sınıfının background'unu ezmemesi için explicit override */
.gforce-card.sw-card {
    background: #262626;
    padding: 0;           /* sw-card padding korunur, graph'ı ezmez */
}

/* Gforce başlık — sw-title ile eşleştirildi */
.gforce-card h2 {
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    margin-bottom: 0 !important;
    padding: 12px 16px 8px !important;
    display: block !important;
}

.sw-card {
    --sw-accent:     #f44336;
    --sw-accent-dim: rgba(244, 67, 54, 0.20);
    --sw-track:      #3a3a3a;
    --sw-border:     rgba(255, 255, 255, 0.08);
    --sw-text-muted: #aaaaaa;
    --sw-text-dim:   #555555;
    --sw-bg:         #262626;

    background: var(--sw-bg);
    border-radius: 10px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

/* Başlık */
.sw-head {
    display: flex;
    align-items: center;
    padding: 12px 16px 6px;
    flex-shrink: 0;
}
.sw-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #ffffff;
    text-transform: uppercase;
}

/* Sayısal gösterge */
.sw-readout {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    padding: 4px 16px 0;
    flex-shrink: 0;
}
.sw-value {
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: clamp(26px, 3.5vw, 40px);
    letter-spacing: -0.01em;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.sw-unit {
    font-family: 'Roboto Mono', monospace;
    font-size: clamp(13px, 1.8vw, 18px);
    color: var(--sw-text-muted);
    line-height: 1;
}

/* Yön badge */
.sw-badge-wrap {
    display: flex;
    justify-content: center;
    margin: 4px 0 0;
    flex-shrink: 0;
}
.sw-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: var(--sw-text-muted);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--sw-border);
    transition: color .15s ease, border-color .15s ease, background .15s ease;
    text-transform: uppercase;
}
.sw-badge.sw-badge-active {
    color: var(--sw-accent);
    border-color: var(--sw-accent-dim);
    background: rgba(244, 67, 54, 0.07);
}
.sw-badge-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* SVG kadran — büyük ve ortalanmış */
.sw-gauge-wrap {
    flex: 1;
    padding: 6px 4px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}
.sw-gauge-svg {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 300px;
    overflow: visible;
}

/* SVG elementleri */
.sw-tick {
    stroke: var(--sw-track);
    stroke-width: 2;
    stroke-linecap: round;
}
.sw-tick-major {
    stroke-width: 2.5;
}
.sw-tick-active {
    stroke: var(--sw-accent);
}
.sw-needle {
    stroke: var(--sw-accent);
    stroke-width: 3;
    stroke-linecap: round;
    filter: drop-shadow(0 0 5px rgba(244, 67, 54, 0.7));
}
.sw-pivot-ring {
    fill: none;
    stroke: var(--sw-border);
    stroke-width: 1.5;
}
.sw-pivot-core {
    fill: var(--sw-bg);
    stroke: var(--sw-accent);
    stroke-width: 2;
}
.sw-spoke {
    stroke: var(--sw-text-dim);
    stroke-width: 2;
    stroke-linecap: round;
}

/* Sola/Sağa etiketleri */
.sw-end-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 18px 12px;
    flex-shrink: 0;
}
.sw-side {
    font-size: 11px;
    font-weight: 600;
    color: var(--sw-text-dim);
    transition: color .15s ease;
    letter-spacing: 0.04em;
}
.sw-side-on {
    color: var(--sw-accent);
}

