/* GipixCRM - Продвинутые UI/UX улучшения */

/* =================== Улучшенные Loading состояния =================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-spinner-advanced {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =================== Улучшенные формы =================== */
.form-group-enhanced {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-input-enhanced {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input-enhanced:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-input-enhanced.error {
    border-color: #f44336;
    animation: shake 0.5s ease-in-out;
}

.form-label-floating {
    position: absolute;
    left: 16px;
    top: 12px;
    color: #9e9e9e;
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 4px;
}

.form-input-enhanced:focus + .form-label-floating,
.form-input-enhanced:valid + .form-label-floating,
.form-input-enhanced:not(:placeholder-shown) + .form-label-floating {
    top: -8px;
    left: 12px;
    font-size: 12px;
    color: #1976d2;
    font-weight: 500;
}

/* =================== CRM прогресс работ =================== */
.work-progress-crm {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--crm-primary);
}

.work-progress-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--crm-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.work-progress-info {
    flex: 1;
}

.work-progress-title {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    margin-bottom: 4px;
}

.work-progress-status {
    font-size: 12px;
    color: #6c757d;
}

/* =================== Улучшенные таблицы =================== */
.table-enhanced {
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table-enhanced thead th {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    font-weight: 500;
    padding: 16px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Базовые стили строк - НЕ ПЕРЕЗАПИСЫВАЕМ статусные цвета */
.table-enhanced tbody tr {
    position: relative;
    /* transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - ОТКЛЮЧЕНО для предотвращения смещения */
}

/* Hover эффекты только для строк БЕЗ статусных классов - ОТКЛЮЧЕНЫ */
/* .table-enhanced tbody tr:not(.past-date):not(.today-date):not(.future-date):not(.pending-online):hover {
    background: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} */

.table-enhanced tbody td {
    padding: 16px;
    border-bottom: 1px solid #ffffff;
    vertical-align: middle;
}

/* =================== Современные цветные рамки =================== */

/* Общие стили для всех статусных элементов */
.table-enhanced tbody tr,
.appointment-card {
    position: relative !important;
}

/* Стандартные отступы для всех статусных элементов */
.table-enhanced tbody tr.past-date td:first-child,
.table-enhanced tbody tr.today-date td:first-child,
.table-enhanced tbody tr.future-date td:first-child,
.table-enhanced tbody tr.pending-online td:first-child,
.table-enhanced tbody tr.confirmed td:first-child,
.table-enhanced tbody tr.rejected td:first-child,
.appointment-card.past-date,
.appointment-card.today-date,
.appointment-card.future-date,
.appointment-card.pending-online,
.appointment-card.confirmed,
.appointment-card.rejected {
    padding-left: 16px; /* Стандартный отступ БЕЗ дополнительного смещения от рамок */
}

/* Прошедшие записи - элегантный серый */
.table-enhanced tbody tr.past-date,
.appointment-card.past-date {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.08), rgba(108, 117, 125, 0.12)) !important;
    box-shadow: inset 4px 0 0 #6c757d, 0 0 8px rgba(255, 255, 255, 0.3) !important;
}

/* Сегодняшние записи - энергичный красный */
.table-enhanced tbody tr.today-date,
.appointment-card.today-date {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08), rgba(220, 53, 69, 0.12)) !important;
    box-shadow: inset 4px 0 0 #dc3545, 0 0 8px rgba(255, 255, 255, 0.4) !important;
}

/* Будущие записи - свежий зеленый */
.table-enhanced tbody tr.future-date,
.appointment-card.future-date {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.08), rgba(40, 167, 69, 0.12)) !important;
    box-shadow: inset 4px 0 0 #28a745, 0 0 8px rgba(255, 255, 255, 0.3) !important;
}

/* Неподтвержденные онлайн записи - яркий оранжевый */
.table-enhanced tbody tr.pending-online,
.appointment-card.pending-online {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.12), rgba(255, 152, 0, 0.18)) !important;
    box-shadow: inset 4px 0 0 #ff9800, 0 0 12px rgba(255, 255, 255, 0.5) !important;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Подтвержденные записи - спокойный синий */
.table-enhanced tbody tr.confirmed,
.appointment-card.confirmed {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08), rgba(13, 110, 253, 0.12)) !important;
    box-shadow: inset 4px 0 0 #0d6efd, 0 0 8px rgba(255, 255, 255, 0.3) !important;
}

/* Отклоненные записи - строгий красный */
.table-enhanced tbody tr.rejected,
.appointment-card.rejected {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.12), rgba(220, 53, 69, 0.18)) !important;
    opacity: 0.8;
    box-shadow: inset 4px 0 0 #dc3545, 0 0 8px rgba(255, 255, 255, 0.4) !important;
}

/* Анимация пульсации для онлайн записей */
@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 8px rgba(255, 152, 0, 0.3);
    }
    50% { 
        box-shadow: 0 0 16px rgba(255, 152, 0, 0.6), 0 0 24px rgba(255, 152, 0, 0.3);
    }
}

/* Hover эффекты для цветных рамок - ОТКЛЮЧЕНЫ для предотвращения смещения */
/* .table-enhanced tbody tr.past-date:hover {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.15), rgba(108, 117, 125, 0.2)) !important;
    transform: translateX(2px);
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.2);
} */

/* =================== Дополнительные стили для мобильных карточек =================== */
/* Базовые стили для мобильных карточек */
.appointment-card {
    /* transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); - ОТКЛЮЧЕНО для предотвращения смещения */
    overflow: hidden;
}

/* Hover эффекты для мобильных карточек - ОТКЛЮЧЕНЫ для предотвращения смещения */
/* .appointment-card.past-date:hover {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.15), rgba(108, 117, 125, 0.2)) !important;
    transform: translateY(-2px) translateX(2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.2);
} */

/* =================== Дополнительные улучшения для статусных индикаторов =================== */
/* Улучшенные статусные бейджи */
.status-indicator {
    position: relative;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-indicator.past {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.status-indicator.today {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    animation: pulse-red 2s ease-in-out infinite;
}

.status-indicator.future {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.status-indicator.pending {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    animation: pulse-orange 2s ease-in-out infinite;
}

.status-indicator.confirmed {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
}

.status-indicator.rejected {
    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: white;
    opacity: 0.8;
}

/* Анимации для статусных индикаторов */
@keyframes pulse-red {
    0%, 100% { 
        box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    }
    50% { 
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.6), 0 0 12px rgba(220, 53, 69, 0.3);
    }
}

@keyframes pulse-orange {
    0%, 100% { 
        box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
    }
    50% { 
        box-shadow: 0 2px 8px rgba(255, 152, 0, 0.6), 0 0 12px rgba(255, 152, 0, 0.3);
    }
}

/* Улучшенные тени для таблицы */
.table-enhanced {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Улучшенные тени для карточек */
.appointment-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Плавные переходы для всех элементов - ОТКЛЮЧЕНЫ для предотвращения смещения */
/* * {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
} */

/* =================== Анимации =================== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(25, 118, 210, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 118, 210, 0); }
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease-out;
}

/* =================== Горячие клавиши =================== */
.hotkey-hint {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4081;
    color: white;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
}

.btn-with-hotkey {
    position: relative;
}

/* =================== CRM уведомления =================== */
.notification-enhanced {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 350px;
    max-width: 450px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow: hidden;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.25s ease-out;
    border: 1px solid #e9ecef;
}

.notification-enhanced.show {
    transform: translateX(0);
    opacity: 1;
}

/* CRM специфичные типы уведомлений */
.notification-enhanced.success {
    border-left: 4px solid var(--crm-success);
    background: linear-gradient(135deg, #ffffff, #f8fff9);
}

.notification-enhanced.error {
    border-left: 4px solid var(--crm-danger);
    background: linear-gradient(135deg, #ffffff, #fff8f8);
}

.notification-enhanced.warning {
    border-left: 4px solid var(--crm-warning);
    background: linear-gradient(135deg, #ffffff, #fffdf7);
}

.notification-enhanced.info {
    border-left: 4px solid var(--crm-info);
    background: linear-gradient(135deg, #ffffff, #f7fcfd);
}

/* Новый тип для автосервиса */
.notification-enhanced.appointment {
    border-left: 4px solid var(--crm-orange);
    background: linear-gradient(135deg, #ffffff, #fff9f5);
}

.notification-header {
    padding: 16px 16px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-body {
    padding: 0 16px 16px;
    color: #616161;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.notification-close {
    background: none;
    border: none;
    color: #9e9e9e;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.notification-close:hover {
    background: #f5f5f5;
}

/* =================== Улучшенная мобильная адаптивность =================== */
@media (max-width: 768px) {
    .mobile-optimized .table-enhanced {
        font-size: 14px;
    }
    
    .mobile-optimized .table-enhanced th,
    .mobile-optimized .table-enhanced td {
        padding: 12px 8px;
    }
    
    .mobile-optimized .btn {
        padding: 12px 16px;
        font-size: 16px; /* Для удобства нажатия на мобильных */
    }
    
    .mobile-optimized .form-input-enhanced {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
    
    .notification-enhanced {
        right: 10px;
        left: 10px;
        min-width: auto;
        transform: translateY(-100px);
    }
    
    .notification-enhanced.show {
        transform: translateY(0);
    }
}

/* =================== Улучшенные карточки =================== */
.card-enhanced {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-enhanced .card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    padding: 20px 24px;
}

.card-enhanced .card-body {
    padding: 1px;
}

/* =================== Контекстные меню =================== */
.context-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 160px;
    z-index: 9999;
    display: none;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item:hover {
    background: #f5f5f5;
}

.context-menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 4px 0;
}

/* =================== Улучшенные статистические карточки =================== */
.stats-card-enhanced {
    background: linear-gradient(135deg, white, #f8f9fa);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #1976d2;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1976d2, #42a5f5);
}

.stats-card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.stats-number-enhanced {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 8px;
    line-height: 1;
}

.stats-label-enhanced {
    color: #616161;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =================== Кастомные скроллбары =================== */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #1976d2, #42a5f5);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #1565c0, #1976d2);
}

/* =================== CRM специфичные состояния =================== */
/* Статусы записей клиентов */
.appointment-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.appointment-status-badge.confirmed {
    background: rgba(40, 167, 69, 0.1);
    color: var(--crm-success);
}

.appointment-status-badge.pending {
    background: rgba(255, 193, 7, 0.1);
    color: var(--crm-warning);
}

.appointment-status-badge.cancelled {
    background: rgba(220, 53, 69, 0.1);
    color: var(--crm-danger);
}

/* =================== Утилитарные классы =================== */
.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
}

.transition-all {
    transition: all 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* =================== Цветовая схема CRM автосервиса =================== */
:root {
    /* Основные цвета автосервиса */
    --crm-primary: #1976d2;        /* Основной синий */
    --crm-success: #28a745;        /* Завершенные работы */
    --crm-warning: #ffc107;        /* Ожидание/предупреждения */
    --crm-danger: #dc3545;         /* Критичные/просроченные */
    --crm-info: #17a2b8;          /* Информационные */
    --crm-orange: #fd7e14;         /* Акценты автосервиса */
    
    /* Градиенты для CRM */
    --primary-gradient: linear-gradient(135deg, var(--crm-primary), #1565c0);
    --success-gradient: linear-gradient(135deg, var(--crm-success), #218838);
    --warning-gradient: linear-gradient(135deg, var(--crm-warning), #e0a800);
    --error-gradient: linear-gradient(135deg, var(--crm-danger), #c82333);
    --info-gradient: linear-gradient(135deg, var(--crm-info), #138496);
    --orange-gradient: linear-gradient(135deg, var(--crm-orange), #e86100);
}

/* =================== КОМПАКТНЫЙ СТАТУС-БАР (главная) =================== */
.status-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 12px;
    padding: 8px 12px;
    background: linear-gradient(165deg, var(--md-gray-50, #fafafa) 0%, #fff 50%, rgba(25, 118, 210, 0.04) 100%);
    border: 1px solid var(--md-gray-200, #e5e7eb);
    border-radius: 12px;
    box-shadow: var(--md-elevation-1, 0 1px 3px rgba(0, 0, 0, 0.08));
    margin-bottom: 0.75rem;
    min-width: 0;
}

.status-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 5px 8px;
    min-width: 3.5rem;
    flex: 0 1 auto;
    background: #fff;
    border: 1px solid var(--md-gray-200, #e5e7eb);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    text-align: center;
    cursor: default;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.status-item:hover {
    border-color: rgba(25, 118, 210, 0.35);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}

.status-number {
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--crm-primary, #1976d2);
    line-height: 1.15;
}

.status-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--md-gray-600, #6c757d);
    line-height: 1.2;
    letter-spacing: 0.02em;
}

/* Убираем градиенты из заголовка таблицы */
.card-enhanced .card-header {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
    padding: 5px 7px !important;
}

/* Растягиваем таблицу на всю ширину */
.table-enhanced {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Убираем анимации при наведении, но сохраняем цвета статуса */
.table-enhanced tbody tr {
    transition: none !important;
}

.table-enhanced tbody tr:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* НЕ ПЕРЕЗАПИСЫВАЕМ фон для строк со статусом - позволяем им сохранять свои цвета */
.table-enhanced tbody tr:not(.past-date):not(.today-date):not(.future-date):not(.pending-online):hover {
    background: #f8f9fa !important;
}

.card-enhanced:hover {
    transform: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Убираем градиент из заголовка таблицы */
.table-enhanced thead th {
    background: #f8f9fa !important;
    color: #495057 !important;
    font-weight: 500 !important;
    padding: 16px !important;
    text-align: left !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    border-bottom: 2px solid #dee2e6 !important;
}

@media (max-width: 768px) {
    .status-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 8px 10px;
    }

    .status-stats {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
    }

    .status-item {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        padding: 6px 4px;
    }

    .status-number {
        font-size: 0.95rem;
    }

    .status-label {
        font-size: 0.6rem;
    }

    .vin-search-wrapper {
        width: 100%;
        max-width: none;
        margin-left: 0;
    }

    .vin-search-label {
        text-align: left;
    }
}

/* =================== Профиль / Avatar =================== */
.profile-btn {
    background: white;
    border-radius: 50px;
    padding: 6px 12px;
    box-shadow: var(--md-elevation-1);
    color: var(--md-gray-800);
    font-weight: 500;
    transition: all var(--md-transition-fast);
    line-height: 1;
}

.profile-btn:hover,
.profile-btn:focus {
    background: var(--md-gray-50);
    color: var(--md-primary);
    box-shadow: var(--md-elevation-2);
    text-decoration: none;
}

.profile-btn .avatar {
    width: 32px;
    height: 32px;
    border-radius: 10%;
    background: #ffffff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

/* Dropdown меню профиля */
.dropdown-menu.profile-menu {
    border-radius: 12px;
    box-shadow: var(--md-elevation-4);
    overflow: hidden;
}

.dropdown-menu.profile-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: background var(--md-transition-fast), color var(--md-transition-fast);
}

.dropdown-menu.profile-menu .dropdown-item:hover {
    background: var(--md-gray-50);
    color: var(--md-primary);
}

.dropdown-menu.profile-menu .dropdown-item.text-danger:hover {
    color: var(--md-error);
}

/* =================== СТАТУСНЫЕ ПОЛОСКИ ЗАПИСЕЙ (ВЫСШИЙ ПРИОРИТЕТ) =================== */
/* ВАЖНО: Эти стили должны быть в конце файла для максимального приоритета */

/* ДЕСКТОПНЫЕ СТИЛИ - базовые */
/* =================== СТАРЫЕ СТИЛИ УДАЛЕНЫ =================== */
/* Используем новые современные стили с ::before псевдоэлементами вместо border-left */

/* =================== СТАРЫЕ МОБИЛЬНЫЕ СТИЛИ УДАЛЕНЫ =================== */
/* Используем новые современные стили с ::before псевдоэлементами для всех устройств */

/* =================== СТАРЫЕ HOVER ЭФФЕКТЫ УДАЛЕНЫ =================== */
/* Используем новые hover эффекты из современных стилей выше */

/* =================== VIN ПОИСК В СТАТУС-БАРЕ (СПРАВА) =================== */
.vin-search-wrapper {

    min-width: 0;
    max-width: min(100%, 420px);
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

@media (min-width: 992px) {
    .vin-search-wrapper {
        max-width: 440px;
    }
}

.vin-search-label {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--md-gray-600, #6c757d);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: right;
    line-height: 1.2;
    cursor: pointer;
}

.vin-search-form {
    margin: 0;
}

.vin-search-input-group .input-group-text {
    background: #fff;
    border: 1px solid var(--md-gray-300, #ced4da);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 0 0.4rem;
}

.vin-search-input-group__icon {
    font-size: 18px;
    color: var(--crm-primary, #1976d2);
    opacity: 0.85;
}

.vin-search-wrapper #vinInput {
    border-left: none;
    border-right: none;
    font-family: "Roboto Mono", "Courier New", monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    min-width: 0;
}

.vin-search-wrapper #vinInput:focus {
    box-shadow: none;
    border-color: var(--md-gray-300, #ced4da);
}

.vin-search-input-group:focus-within .input-group-text,
.vin-search-input-group:focus-within #vinInput,
.vin-search-input-group:focus-within .vin-search-submit {
    border-color: rgba(25, 118, 210, 0.55);
}

.vin-search-wrapper #vinInput::placeholder {
    text-transform: none;
    font-family: "Roboto", sans-serif;
    font-weight: 400;
    letter-spacing: normal;
    font-size: 0.75rem;
}

.vin-search-submit {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.vin-search-submit .material-icons {
    font-size: 18px;
}

.vin-search-submit:hover {
    filter: brightness(1.03);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.28);
}

@media (max-width: 768px) {
    .vin-search-wrapper #vinInput {
        font-size: 0.8rem;
        letter-spacing: 0.04em;
    }

    .vin-search-submit #vinSearchText {
        display: none;
    }

    .vin-search-submit {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}