/* ===== НОВЫЙ ДЕСКТОПНЫЙ СТИЛЬ ДЛЯ АРМ ВРАЧА ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: #0f172a;
    min-height: 100vh;
    overflow: hidden;
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.vepas-dashboard {
    width: 100%;
    height: 100vh;
    background: #0f172a;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
.header {
    background: #0b1a24;
//    border-bottom: 1px solid #254a5a;
    padding: 5px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #8fc9ff;
}

.doctor-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
}

#doctorName {
    color: white;
    font-size: 14px;
}

.queue-stats {
    display: flex;
    gap: 15px;
    background: #1e3340;
    padding: 6px 16px;
    border-radius: 8px;
}

.queue-count, .queue-time {
    color: #f4c542;
    font-size: 14px;
    font-weight: bold;
}

.toggle-panel-btn {
    background: #1e3340;
    border: 1px solid #3d6375;
    border-radius: 8px;
    padding: 6px 6px;
    cursor: pointer;
    font-size: 18px;
    color: white;
}

.version-switch {
    display: flex;
    gap: 8px;
}

.version-btn {
    background: #1e3340;
    border: 1px solid #3d6375;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: #8aaec0;
    text-decoration: none;
}

.version-btn.new {
    background: #0a5c3c;
    color: white;
    border-color: #2ecc71;
}

/* ===== ОСНОВНАЯ СЕТКА ===== */
.main-content {
    display: flex;
    gap: 5px;
    padding: 5px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Колонка 1: 20% */
.column-1 {
    width: 22%;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto !important;
    overflow-x: visible !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.column-1::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    display: none !important;
}

/* Колонка 2: 35% */
.column-2 {
    width: 30%;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto !important;
    overflow-x: visible !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.column-2::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    display: none !important;
}

/* Колонка 3: 45% */
.column-3 {
    width: 48%;
    min-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto !important;
    overflow-x: visible !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.column-3::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    display: none !important;
}




/* ===== КАРТОЧКИ ===== */
.card {
    background: #14232e;
    border-radius: 8px;
    padding: 5px;
}

/* Фото водителя */
.driver-photo-card {
    background: #14232e;
    border-radius: 8px;
    padding: 5px;
}

.reference-photo {
    width: 100%;
    aspect-ratio: 3/4;
    background: #1e3340;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 2px solid #3d6375;
}

/* Информация о водителе */
.driver-info-card #driverInfoContent {
    font-size: 13px;
    color: white;
    line-height: 1.5;
}

.driver-name {
    font-size: 16px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.driver-company {
    font-size: 12px;
    color: #8aaec0;
    margin-bottom: 4px;
}

.exam-meta {
    font-size: 10px;
    color: #5f8aa8;
    margin-top: 6px;
}

/* Показатели */
.vital-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.vital-label {
    font-size: 14px;
    color: #8aaec0;
}

.vital-value {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.vital-value.warning {
    background: #a03224;
    padding: 2px 8px;
    border-radius: 8px;
}

.vital-unit {
    font-size: 11px;
    color: #6b8ca0;
    margin-left: 4px;
}

.complaint-value {
    font-size: 14px;
    padding: 2px 10px;
    border-radius: 8px;
}

.complaint-value.yes {
    background: #a03224;
    color: white;
}

.complaint-value.no {
    background: #0a5c3c;
    color: white;
}

/* ===== ВИДЕО КОНТЕЙНЕРЫ ===== */
.video-card {
    background: #0a1820;
    border-radius: 8px;
    padding: 5px;
}

.video-container {
    position: relative;
    width: 100%;
    background: #050e14;
    border-radius: 8px;
    overflow: hidden;
}

/* Видео 1 - портрет 4:5 */
/* Видео 1 - портрет 4:5 */
.video-portrait .video-container {
    aspect-ratio: 4/5;
    background: #050e14;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Видео 2 - альбом 16:9 */
.video-landscape .video-container {
    aspect-ratio: 16/9;
}

.current-frame {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Видео 1 - поворот */
/* Видео 1 - правильное отображение без обрезания */
/* Видео 1 - переопределяем с максимальным приоритетом */
#videoContainer1 .current-frame,
#currentFrame1 {
    transform: rotate(-90deg) scale(1.25) !important;
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
}

/* Видео 2 */
#videoContainer2 .current-frame,
#currentFrame2 {
    transform: scale(1.0) !important;
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
}

/* Контролы видео */
.video-controls {
    position: absolute;
    bottom: 10px;
    left: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 6px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
}

.progress-row {
    position: absolute;
    bottom: 55px;
    left: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 15;
}

.progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #8fc9ff;
}

.frame-counter {
    position: absolute;
    bottom: 60px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #ccc;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    z-index: 10;
}

.play-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    font-size: 11px;
}

.speed-control input {
    width: 60px;
}

/* ===== КНОПКИ РЕШЕНИЯ ===== */
.decision-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 5px;
}

.btn-accept, .btn-reject {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}

.btn-accept {
    background: #0a5c3c;
    border: 2px solid #2ecc71;
    color: white;
}

.btn-reject {
    background: #a03224;
    border: 2px solid #ff6b6b;
    color: white;
}

.btn-accept:disabled, .btn-reject:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-unlock {
    background: #f4c542;
    color: #1e3340;
    border: none;
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

/* Прогресс бар для захвата фото */
.progress-container {
    background: #1e3340;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #3d6375;
}

.progress-bar-horizontal {
    background: #2c3e50;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.progress-fill-horizontal {
    background: #2ecc71;
    width: 0%;
    height: 100%;
    transition: width 0.3s ease;
}

.progress-status {
    color: #8aaec0;
    font-size: 11px;
    margin-top: 8px;
    text-align: center;
}

/* ===== ВНУТРЕННИЕ КОЛОНКИ 3 ===== */
.column-3-inner {
    display: flex;
    gap: 5px;
    flex: 1;
    min-height: 0;
}

.column-3-inner-left {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.column-3-inner-right {
    width: 60%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Средние значения */
.avg-stats-card {
    text-align: center;
}

.avg-stats-card .values {
    font-size: 20px;
    font-weight: bold;
    color: white;
    line-height: 1.5;
}

.detail-btn {
    background: #f39c12;
    color: #1e3340;
    border: none;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
}

.detail-btn:hover {
    background: #e67e22;
}

/* История водителя */
.history-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

/* История внутри колонки 3 - скрываем полосу */
.history-card #historyContent {
    flex: 1;
    overflow-y: auto !important;
    padding-right: 5px;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.history-card #historyContent::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    display: none !important;
}

.history-item:hover {
    background: #254a5a;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.history-id {
    font-size: 12px;
    font-weight: bold;
    color: #8fc9ff;
}

.history-status {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
}

.history-status.accepted {
    background: #0a5c3c;
    color: white;
}

.history-status.rejected {
    background: #a03224;
    color: white;
}

.history-metrics {
    font-size: 11px;
    color: #8aaec0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.show-more-btn {
    background: #1e3340;
    border: 1px solid #3d6375;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    margin-top: 10px;
    color: #8fc9ff;
    font-size: 12px;
}

/* ===== ВЫЕЗЖАЮЩАЯ ПАНЕЛЬ ===== */
.side-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #0f1a24;
    border-left: 2px solid #254a5a;
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-panel.open {
    right: 0;
}

.side-panel-header {
    background: #1e3340;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.side-panel-header h3 {
    color: white;
    font-size: 16px;
}

.close-panel-btn {
    background: none;
    border: none;
    color: #8fc9ff;
    font-size: 24px;
    cursor: pointer;
}

.side-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.panel-overlay.show {
    display: block;
}

/* Секции очереди и истории в панели */
.queue-section, .history-section {
    margin-bottom: 5px;
}

.section-header {
    padding: 5px 5px;
    background: #1e3340;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.section-header h3 {
    color: white;
    font-size: 13px;
    font-weight: bold;
}

.section-header span {
    color: #8fc9ff;
    background: #254a5a;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
}

.examinations-scroll {
    max-height: 660px;
    overflow-y: auto;
    padding-right: 5px;
}

.exam-card {
    background: #1e3340;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    cursor: pointer;
}

.exam-card:hover {
    background: #254a5a;
}

.exam-row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.exam-number {
    font-weight: bold;
    color: #8fc9ff;
    font-size: 12px;
}

.driver-name-card {
    flex: 1;
    color: white;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exam-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
}

.exam-status.accepted {
    background: #0a5c3c;
    color: white;
}

.exam-status.rejected {
    background: #a03224;
    color: white;
}

.exam-status.pending {
    background: #e67e22;
    color: white;
}

.exam-row2 {
    font-size: 10px;
    color: #8aaec0;
}

/* Цвет показателей в карточках очереди и истории */
.exam-metrics {
    color: white !important;
    font-size: 11px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Для алкоголя оставляем красный */
.exam-metrics .alcohol-warning {
    color: #f87171 !important;
    font-weight: bold;
}

.no-selection {
    color: #8aaec0;
    text-align: center;
    padding: 5px;
}

.loading-spinner {
    text-align: center;
    color: #8fc9ff;
    padding: 5px;
}

/* Адаптация */
@media (max-width: 1200px) {
    .column-3-inner {
        flex-direction: column;
    }
    .column-3-inner-left,
    .column-3-inner-right {
        width: 100%;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Цвета заголовков карточек */
.card-header {
    font-size: 13px;
    font-weight: bold;
    color: white !important;  /* ← белый цвет */
    margin-bottom: 5px;
    padding-bottom: 5px;
 //   border-bottom: 1px solid #254a5a;
}

/* Заголовки секций в выезжающей панели */
.section-header h3 {
    color: white !important;
    font-size: 13px;
    font-weight: bold;
}

/* Текст в карточках */
.driver-name, .driver-company, .exam-meta {
    color: white;
}

.vital-label, .vital-value {
    color: white;
}

/* Кнопка toggle-panel (≡) видимая */
.toggle-panel-btn {
    background: #1e3340;
    border: 1px solid #3d6375;
    border-radius: 8px;
    padding: 8px 8px;
    cursor: pointer;
    font-size: 20px;
    color: white;
    display: block !important;
}

#adminLink {
    display: inline-block !important;
}

#adminLink button {
    background: #1e3340;
    color: white;
    border: 1px solid #4f7a94;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
}


/* ===== ПРИНУДИТЕЛЬНЫЕ СТИЛИ ДЛЯ HEADER ===== */

.vepas-dashboard .header {
    background: #0b1a24 !important;
//    border-bottom: 1px solid #254a5a !important;
    padding: 0px 5px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    width: 100% !important;
}

.vepas-dashboard .logo {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #8fc9ff !important;
    display: block !important;
}

.vepas-dashboard .doctor-badge {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
}

.vepas-dashboard .header-right {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

.vepas-dashboard .online-indicator {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.vepas-dashboard .online-dot {
    width: 8px !important;
    height: 8px !important;
    background: #2ecc71 !important;
    border-radius: 50% !important;
}

.vepas-dashboard #doctorName {
    color: white !important;
    font-size: 14px !important;
}

.vepas-dashboard .queue-stats {
    display: flex !important;
    gap: 10px !important;
    background: #1e3340 !important;
    padding: 6px 6px !important;
    border-radius: 8px !important;
}

.vepas-dashboard .queue-count,
.vepas-dashboard .queue-time {
    color: #f4c542 !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

.vepas-dashboard .version-switch {
    display: flex !important;
    gap: 8px !important;
}

.vepas-dashboard .version-btn {
    background: #1e3340 !important;
    border: 1px solid #3d6375 !important;
    border-radius: 8px !important;
    padding: 6px 6px !important;
    font-size: 12px !important;
    color: #8aaec0 !important;
    text-decoration: none !important;
}

.vepas-dashboard .version-btn.new {
    background: #0a5c3c !important;
    color: white !important;
    border-color: #2ecc71 !important;
}

.vepas-dashboard .toggle-panel-btn {
    background: #1e3340 !important;
    border: 1px solid #3d6375 !important;
    border-radius: 8px !important;
    padding: 6px 6px !important;
    cursor: pointer !important;
    font-size: 18px !important;
    color: white !important;
}

.vepas-dashboard .toggle-panel-btn:hover {
    background: #254a5a !important;
}

.vepas-dashboard #adminLink {
    display: inline-block !important;
    text-decoration: none !important;
}

.vepas-dashboard #adminLink button {
    background: #1e3340 !important;
    color: white !important;
    border: 1px solid #4f7a94 !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    cursor: pointer !important;
    font-size: 18px !important;
}


/* Компактная история */
.history-item {
    background: #1e3340;
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.history-item > div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
/* удалить .history-header, .history-metrics, .history-date как отдельные блоки */
/* Компактная история */

.history-item:hover {
    background: #254a5a;
}

.history-id {
    font-size: 12px;
    font-weight: bold;
    color: #8fc9ff;
}

.history-status {
    font-size: 11px;
    padding: 0px 6px;
    border-radius: 8px;
}

.history-status.accepted {
    background: #0a5c3c;
    color: white;
}

.history-status.rejected {
    background: #a03224;
    color: white;
}

.exam-status.refused {
    background: #6b5b95;
    color: white;
}

/* Анимации для уведомлений */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.driver-photo-card {
    position: relative;
    overflow: hidden;
}

/* Бейдж поверх видео - прозрачный, сверху */
.recognition-badge-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    
    /* Вообще без фона */
    background: transparent;
    backdrop-filter: none;
    
    /* Только тень для читаемости */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    
    padding: 0;
    pointer-events: none;
}

.video-controls {
    background: transparent !important;
    backdrop-filter: none !important;
}

.play-btn, .speed-control, .frame-counter {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px) !important;
}

/* Цвета для блока распознавания */
.recognition-badge-overlay div div:first-child span:last-child {
    color: #f87171 !important;  /* Красный по умолчанию */
}

.recognition-badge-overlay div div:first-child span:last-child[data-value="high"] {
    color: #2ecc71 !important;  /* Зелёный при высоком проценте */
}


/* Подсветка активного осмотра в истории */
.history-item.active {
    background: #0a5c3c !important;
    border-left: 3px solid #2ecc71;
}

.history-item.active .exam-id {
    color: #fff;
}

.history-item {
    transition: all 0.2s ease;
}

/* ===== ЗАГЛУШКИ (ОБЩИЕ ДЛЯ ВСЕХ ЭКРАНОВ) ===== */
/* Заглушка для фото водителя */
.placeholder-driver {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 150px;
    background: #1e3340;
    color: #ffffff !important;
    font-size: 14px;
    flex-direction: column;
    gap: 8px;
    border-radius: 8px;
}
.placeholder-driver .icon {
    font-size: 48px;
    opacity: 0.5;
    color: #8aaec0 !important;
}
.placeholder-driver .text {
    font-size: 13px;
    opacity: 0.8;
    color: #ffffff !important;
}

/* Заглушка для видео */
.placeholder-video {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: #0f1a24;
    color: #ffffff !important;
    gap: 12px;
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
.placeholder-video .icon {
    font-size: 56px;
    opacity: 0.4;
    color: #8aaec0 !important;
}
.placeholder-video .title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff !important;
    letter-spacing: 0.5px;
}
.placeholder-video .sub {
    font-size: 12px;
    opacity: 0.6;
    color: #8aaec0 !important;
}

/* Кнопка Табло — десктопная версия с иконкой 📺 */
#tabloLink button {
    background: #1e3340 !important;
    color: white !important;
    border: 1px solid #4f7a94 !important;
    border-radius: 20px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    cursor: pointer !important;
}

#tabloLink button:hover {
    background: #254a5a !important;
}


/* ===== МОДАЛЬНОЕ ОКНО ДЛЯ ВЫБОРА ВОДИТЕЛЯ ===== */
.driver-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.driver-selection-modal.active {
    display: flex;
}

.driver-selection-content {
    background: linear-gradient(135deg, #1e3340 0%, #0f1a24 100%);
    border-radius: 24px;
    padding: 30px 40px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid #4f7a94;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    animation: fadeInScale 0.3s ease;
}

.driver-selection-content h2 {
    color: white;
    margin-bottom: 8px;
    font-size: 22px;
}

.driver-selection-content .subtitle {
    color: #8aaec0;
    font-size: 14px;
    margin-bottom: 20px;
}

.driver-candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.driver-candidate-card {
    background: #1a2c38;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    border: 2px solid #2a4a5a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.driver-candidate-card:hover {
    border-color: #8fc9ff;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.driver-candidate-card .candidate-photo {
    width: 240px;
    height: 240px;
    border-radius: 12px;
    background: #1e3340;
    margin: 0 auto 12px;
    border: 3px solid #4f7a94;
    object-fit: cover;
    display: block;           /* ← ВАЖНО для img */
}

.driver-candidate-card .candidate-name {
    color: white;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.driver-candidate-card .candidate-stats {
    color: #8aaec0;
    font-size: 12px;
}

.driver-candidate-card .candidate-stats .sim {
    color: #2ecc71;
    font-weight: bold;
}

.driver-candidate-card .candidate-stats .sim-low {
    color: #f87171;
}

.driver-candidate-card .select-btn {
    margin-top: 10px;
    background: #0a5c3c;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 24px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.driver-candidate-card .select-btn:hover {
    background: #0e7a50;
}

.driver-selection-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.driver-selection-actions button {
    padding: 10px 30px;
    border-radius: 30px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.driver-selection-actions .btn-auto {
    background: #4f7a94;
    color: white;
}

.driver-selection-actions .btn-auto:hover {
    background: #5f8aa8;
}

.driver-selection-actions .btn-reject-modal {
    background: #6b3a3a;
    color: white;
}

.driver-selection-actions .btn-reject-modal:hover {
    background: #8a4a4a;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}


/* Модальное окно выбора водителя */
.driver-selection-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 20000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.driver-selection-modal.active {
    display: flex;
}

.driver-selection-content {
    background: #14232e;
    border: 1px solid #2ecc71;
    border-radius: 16px;
    padding: 20px;
    max-width: 1200px;
    width: 95%;
    max-height: 92vh;
    overflow-y: auto;
    color: white;
}

.driver-selection-content h2 {
    color: #8fc9ff;
    margin: 0 0 8px 0;
    font-size: 22px;
}

.driver-selection-content .subtitle {
    color: #8aaec0;
    font-size: 14px;
    margin-bottom: 15px;
}

.driver-candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.driver-candidate-card {
    background: #1e3340;
    border: 2px solid #4f7a94;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.driver-candidate-card:hover {
    transform: scale(1.02);
    border-color: #8fc9ff;
}

.driver-candidate-card .candidate-photo {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 6px;
    background: #0f1a24;
}

.driver-candidate-card .candidate-name {
    font-weight: bold;
    font-size: 13px;
    margin: 6px 0 2px 0;
    color: white;
}

.driver-candidate-card .candidate-stats {
    font-size: 11px;
    color: #8aaec0;
}

.driver-candidate-card .candidate-stats .sim {
    color: #2ecc71;
    font-weight: bold;
}

.driver-candidate-card .candidate-stats .sim-low {
    color: #f87171;
    font-weight: bold;
}

.driver-selection-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    border-top: 1px solid #254a5a;
    padding-top: 15px;
    margin-top: 5px;
}

.driver-selection-actions .btn-auto,
.driver-selection-actions .btn-reject-modal {
    padding: 10px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.driver-selection-actions .btn-auto {
    background: #0a5c3c;
    color: white;
}

.driver-selection-actions .btn-auto:hover {
    background: #0e7a50;
}

.driver-selection-actions .btn-reject-modal {
    background: #1e3340;
    color: #8aaec0;
    border: 1px solid #3d6375;
}

.driver-selection-actions .btn-reject-modal:hover {
    background: #254a5a;
}

.selection-video-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.selection-video-controls button:hover {
    background: rgba(255,255,255,0.15);
}