/* Мобильная адаптация 2025 - Современный дизайн */

/* Нижнее навигационное меню (как Яндекс Такси) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--gray-500);
    transition: var(--transition);
    flex: 1;
    max-width: 100px;
}

.bottom-nav-item i {
    font-size: 1.5rem;
}

.bottom-nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* Боковая панель для мобильных */
.sidebar-modern {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transform: translateX(-100%);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-modern.show {
    transform: translateX(0);
}

.sidebar-modern .sidebar-header {
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-bottom: none;
}

.sidebar-modern .sidebar-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-modern .sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex: 1;
}

.sidebar-modern .sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-modern .sidebar-menu li a:hover,
.sidebar-modern .sidebar-menu li a.active {
    background: var(--gray-50);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-modern .sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Топбар */
.topbar-modern {
    background: white;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
}

/* Основной контент */
.main-content-modern {
    margin-left: 280px;
    padding: 2rem;
    padding-bottom: 100px; /* Отступ для нижнего меню */
    min-height: 100vh;
}

/* Карточки заказов - современный дизайн */
.order-card-modern {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    margin-bottom: 1rem;
}

.order-card-modern:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.order-card-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.order-card-header-modern h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.order-price-badge-modern {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
}

.order-route-modern {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.route-point-modern {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.route-point-modern i {
    margin-top: 0.25rem;
    font-size: 1.25rem;
}

.route-point-modern span {
    flex: 1;
    color: var(--gray-700);
    line-height: 1.5;
}

/* Кнопки */
.btn-modern {
    border-radius: var(--radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary-modern {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* Модальные окна */
.modal-overlay-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay-modern.active {
    display: flex;
}

.modal-modern {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header-modern {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-modern h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close-modern {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.5rem;
}

.modal-close-modern:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body-modern {
    padding: 2rem;
}

.modal-footer-modern {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Формы */
.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-content-modern {
        margin-left: 0;
        padding: 1rem;
        padding-bottom: 80px;
    }
    
    .sidebar-modern {
        width: 100%;
        max-width: 320px;
    }
    
    .topbar-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .order-card-modern {
        padding: 1rem;
    }
    
    .modal-modern {
        max-width: 100%;
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 95vh;
    }
    
    .bottom-nav {
        display: flex;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }
}

/* Анимации загрузки */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Пустое состояние */
.empty-state-modern {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.empty-state-modern-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: var(--gray-400);
}

.empty-state-modern h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state-modern p {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

/* Улучшенные уведомления */
.notification-modern {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border-left: 4px solid;
}

.notification-modern.success {
    border-left-color: var(--success);
}

.notification-modern.error {
    border-left-color: var(--danger);
}

.notification-modern.info {
    border-left-color: var(--info);
}

.notification-modern.warning {
    border-left-color: var(--warning);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .notification-modern {
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
}

/* Карта заказов */
.map-container-modern {
    position: relative;
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .map-container-modern {
        height: 400px;
    }
}

/* Сетка заказов */
.orders-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .orders-grid-modern {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Статус бейджи */
.status-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending-modern {
    background: #fef3c7;
    color: #92400e;
}

.status-active-modern {
    background: #dbeafe;
    color: #1e40af;
}

.status-success-modern {
    background: #d1fae5;
    color: #065f46;
}

.status-danger-modern {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================
   ТЕМНАЯ ТЕМА
   ============================================ */

body.dark-theme {
    background: #1a1a1a;
    color: #e5e5e5;
}

body.dark-theme .profile-card,
body.dark-theme .topbar,
body.dark-theme .card,
body.dark-theme .modal-content {
    background: #2d2d2d;
    color: #e5e5e5;
    border-color: #404040;
}

body.dark-theme .info-item {
    border-bottom-color: #404040;
}

body.dark-theme .info-label {
    color: #a0a0a0;
}

body.dark-theme .info-value {
    color: #e5e5e5;
}

body.dark-theme .bottom-nav {
    background: #2d2d2d;
    border-top-color: #404040;
}

body.dark-theme .bottom-nav-item {
    color: #a0a0a0;
}

body.dark-theme .bottom-nav-item.active {
    color: var(--mustang-primary);
    background: rgba(255, 107, 53, 0.2);
}

body.dark-theme .form-control,
body.dark-theme .form-select {
    background: #1a1a1a;
    border-color: #404040;
    color: #e5e5e5;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
    background: #1a1a1a;
    border-color: var(--mustang-primary);
    color: #e5e5e5;
}

body.dark-theme .btn-outline-primary,
body.dark-theme .btn-outline-secondary {
    border-color: #404040;
    color: #e5e5e5;
}

body.dark-theme .btn-outline-primary:hover,
body.dark-theme .btn-outline-secondary:hover {
    background: #404040;
    border-color: #404040;
    color: #e5e5e5;
}

/* Компактный режим */
body.compact-mode {
    font-size: 0.9rem;
}

body.compact-mode .profile-card {
    padding: 16px;
}

body.compact-mode .info-item {
    padding: 12px 0;
}
