/* Venue Unified Design System */
/* Единые стили для PWA и Web версий */
/* Навигация переключается через класс на html: is-pwa-mode / is-web-mode */

/* ==================== */
/* PWA Mode - Мобильный интерфейс (bottom navbar) */
/* ==================== */

html.is-pwa-mode .mobile-only {
    display: block !important;
}

html.is-pwa-mode .mobile-bottom-nav {
    display: flex !important;
}

html.is-pwa-mode .desktop-only {
    display: none !important;
}

html.is-pwa-mode .desktop-only-inline {
    display: none !important;
}

html.is-pwa-mode .sidebar {
    display: none !important;
}

html.is-pwa-mode .navbar {
    display: flex !important;
}

/* ==================== */
/* Web Mode - Десктоп интерфейс (sidebar) */
/* ==================== */

html.is-web-mode .mobile-only {
    display: none !important;
}

html.is-web-mode .mobile-bottom-nav {
    display: none !important;
}

html.is-web-mode .mobile-bottom-nav-more-menu {
    display: none !important;
}

html.is-web-mode .desktop-only {
    display: block !important;
}

html.is-web-mode .desktop-only-inline {
    display: inline !important;
}

html.is-web-mode .sidebar {
    display: flex !important;
}

html.is-web-mode .navbar {
    display: none !important;
}

/* Меню "Ещё" - скрыто по умолчанию, показывается по клику */
.mobile-bottom-nav-more-menu {
    display: none;
}

/* ==================== */
/* CSS Variables - Venue iOS Theme */
/* ==================== */
:root {
    /* Venue iOS Color Palette */
    --color-primary: #6366F1; /* venuePrimary - Indigo */
    --color-primary-hover: #4F46E5;
    --color-primary-light: rgba(99, 102, 241, 0.1);
    
    --color-secondary: #8B5CF6; /* venueSecondary - Purple */
    --color-accent: #EC4899; /* venueAccent - Pink */
    
    --color-success: #10B981; /* venueSuccess - Emerald */
    --color-danger: #EF4444; /* venueDanger - Red */
    --color-warning: #F59E0B; /* venueWarning - Amber */
    
    /* Neutrals - Venue iOS style */
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #FAFAFB; /* venueBackground light */
    --color-bg-tertiary: #F5F5F7;
    --color-text-primary: #1F2937;
    --color-text-secondary: #6B7280;
    --color-text-tertiary: #9CA3AF;
    --color-border: #E5E7EB;
    --color-border-light: #E5E7EB;
    
    /* Gradients - Venue iOS style */
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    --gradient-secondary: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    
    /* Shadows - Venue iOS style with colored glows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-primary: 0 4px 12px rgba(99, 102, 241, 0.25);
    --shadow-primary-lg: 0 8px 24px rgba(99, 102, 241, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    
    /* Border Radius - Venue iOS style */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    --spacing-3xl: 32px;
    
    /* Typography - System fonts like Instagram */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 20px;
    --font-size-3xl: 24px;
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.2;
    --line-height-normal: 1.4;
    --line-height-relaxed: 1.5;
    
    /* Transitions - Smooth like Instagram */
    --transition-fast: 150ms ease-out;
    --transition-base: 200ms ease-out;
    --transition-slow: 300ms ease-out;
    --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-index layers */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-fab: 1080;
}


/* Плавные переходы для основных элементов */
body, .card, .navbar, .mobile-bottom-nav, .modal-content, .dropdown-menu,
.settings-card-ios, .profile-card-ios, .list-group-item {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Переходы для интерактивных элементов */
input, textarea, select, button, .btn, .form-control, .form-select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== */
/* Global Animations - Optimized for Performance */
/* ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale3d(0.95, 0.95, 1);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(30px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 139, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 139, 255, 0.6);
    }
}

@keyframes shimmer {
    0% {
        transform: translate3d(-200%, 0, 0);
    }
    100% {
        transform: translate3d(200%, 0, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -10px, 0);
    }
}

@keyframes breathe {
    0%, 100% {
        transform: scale3d(1, 1, 1);
        opacity: 1;
    }
    50% {
        transform: scale3d(1.02, 1.02, 1);
        opacity: 0.95;
    }
}



/* ==================== */
/* Base Styles */
/* ==================== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

/* Улучшенный скроллбар для всего приложения */
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
    transition: background 0.3s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-hover);
}



html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Не используем transform на html - это может ломать fixed позиционирование */
}

body {
    font-family: var(--font-family);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    min-height: 100vh;
    /* Prevent layout shifts during page transitions */
    overflow-x: hidden;
    /* Не используем transform на body - это ломает fixed позиционирование */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    line-height: var(--line-height-normal);
    font-size: var(--font-size-base);
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

/* Venue iOS gradient background overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.02) 50%, rgba(236, 72, 153, 0.03) 100%);
    pointer-events: none;
    z-index: -1;
    transition: background var(--transition-base);
}



/* Улучшенный скролл для мобильных */
@media (max-width: 991.98px) {
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Плавный скролл для всех элементов */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Улучшенная производительность скролла */
    main {
        will-change: scroll-position;
    }
}

/* iOS Safe Area Support */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .navbar {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    /* Навбар должен игнорировать padding body и занимать всю ширину экрана */
    .mobile-bottom-nav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-1 * env(safe-area-inset-left, 0px)) !important;
        margin-right: calc(-1 * env(safe-area-inset-right, 0px)) !important;
        padding-left: env(safe-area-inset-left, 0px) !important;
        padding-right: env(safe-area-inset-right, 0px) !important;
        background: var(--color-bg-secondary) !important;
        border: none !important;
        border-top: 0.5px solid rgba(0, 0, 0, 0.05) !important;
        box-shadow: none !important;
    }
}

/* ==================== */
/* Typography */
/* ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin: 0;
    letter-spacing: -0.01em;
    /* Убраны анимации - они вызывали дерганье при загрузке */
}

h1 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
}

h2 {
    font-size: var(--font-size-2xl);
}

h3 {
    font-size: var(--font-size-xl);
}

/* Gradient text effect for main headings */
.gradient-heading {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: headingGradient 4s ease infinite;
}

@keyframes headingGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

h4 {
    font-size: var(--font-size-lg);
}

h5, h6 {
    font-size: var(--font-size-base);
}

p {
    margin: 0;
    line-height: var(--line-height-relaxed);
}

.text-muted {
    color: var(--color-text-secondary) !important;
}

.text-tertiary {
    color: var(--color-text-tertiary) !important;
}

/* ==================== */
/* Sidebar - Используется в Web версии */
/* ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--color-bg-primary);
    border-right: 1px solid var(--color-border);
    z-index: 1000;
    flex-direction: column;
}


.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 0;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-tertiary);
}

/* Header */
.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 16px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text-primary);
}

.sidebar-brand img {
    height: 36px;
    width: auto;
}

.sidebar-brand-text {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0 16px;
    overflow-y: auto;
}

.sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav-item {
    margin: 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--color-text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 15px;
    position: relative;
}

.sidebar-nav-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav-link span {
    flex: 1;
}

.sidebar-nav-link .badge {
    margin-left: auto;
    font-size: 11px;
    padding: 3px 8px;
    font-weight: 600;
}

.sidebar-nav-link:hover {
    background: var(--color-bg-secondary);
}

.sidebar-nav-link.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

.sidebar-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--color-primary);
    border-radius: 0 2px 2px 0;
}

.sidebar-nav-link.active i {
    color: var(--color-primary);
}

/* Scroll Hint - фиксирован внизу видимой области навигации */
.sidebar-scroll-hint {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    margin-top: 8px;
    background: linear-gradient(to top, var(--color-bg-primary) 70%, transparent 100%);
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.sidebar-scroll-hint.hidden {
    opacity: 0;
    visibility: hidden;
}

.sidebar-scroll-hint i {
    font-size: 16px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}

/* Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.sidebar-balance {
    margin-bottom: 12px;
}

/* User */
.sidebar-user {
    margin-bottom: 12px;
}

.sidebar-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: background 0.2s ease;
}

.sidebar-user-link:hover {
    background: var(--color-bg-secondary);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-avatar i {
    font-size: 24px;
    color: white;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Actions */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-logout {
    color: var(--color-danger);
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

.sidebar-logout i {
    color: var(--color-danger);
}

/* Main Content - Optimized */
.main-content {
    min-height: 100vh;
    background: var(--color-bg-secondary);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page content wrapper - без анимаций */
.content-wrapper {
    /* Убраны анимации при загрузке */
}

/* Web режим - отступ слева под sidebar */
html.is-web-mode .main-content {
    margin-left: 260px;
    padding-top: 0;
}

/* PWA режим - без sidebar, отступ сверху под navbar */
html.is-pwa-mode .main-content {
    margin-left: 0;
    padding-top: 56px;
}

/* Legacy Navbar Styles (kept for compatibility) - скрыт на десктопе */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-border-light);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: background var(--transition-base), border-color var(--transition-base);
}

/* В PWA navbar всегда скрыт - используется нижняя навигация */



.navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: var(--spacing-md);
}

.navbar-brand {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary) !important;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.navbar-brand svg,
.navbar-brand img[src$=".svg"] {
    width: 24px;
    height: 24px;
    color: var(--color-text-primary);
}

/* SVG icon color adaptation for dark/light theme */
.navbar-brand img[src$=".svg"] {
    filter: none;
}



.nav-link {
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary) !important;
    padding: var(--spacing-sm) var(--spacing-sm) !important;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
    font-size: var(--font-size-base);
    text-decoration: none;
    display: flex;
    align-items: center;
    min-height: 44px;
    touch-action: manipulation;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary) !important;
}

.nav-link:active {
    opacity: 0.7;
}

.nav-link i {
    margin-right: var(--spacing-xs);
    font-size: 16px;
    flex-shrink: 0;
}

.navbar-nav {
    gap: 0;
}

/* Компактный навбар на средних экранах (MacBook Air 13" и подобные) */
@media (min-width: 992px) and (max-width: 1440px) {
    .navbar {
        min-height: 56px;
    }
    
    .navbar .container-fluid {
        padding-left: var(--spacing-xs);
        padding-right: var(--spacing-xs);
        gap: var(--spacing-xs);
        flex-wrap: nowrap;
        overflow: hidden;
    }
    
    .navbar-brand {
        font-size: var(--font-size-lg);
        padding: var(--spacing-sm) 0;
        flex-shrink: 0;
        margin-right: var(--spacing-xs);
    }
    
    .navbar-brand img {
        height: 20px !important;
    }
    
    .navbar-collapse {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        display: flex !important;
    }
    
    .navbar-nav {
        gap: 0;
        flex-wrap: nowrap;
        overflow: visible;
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-start;
        display: flex;
        align-items: center;
    }
    
    .navbar-nav .nav-item {
        flex-shrink: 0;
    }
    
    .nav-link {
        padding: var(--spacing-sm) 6px !important;
        min-height: 44px;
        white-space: nowrap;
        position: relative;
        font-size: 0; /* Скрываем текст, оставляем только иконки */
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        max-width: 44px;
    }
    
    .nav-link i {
        margin-right: 0;
        font-size: 17px;
        display: inline-block;
        vertical-align: middle;
        line-height: 1;
    }
    
    /* Показываем текст при наведении в тултипе */
    .nav-link[title] {
        cursor: help;
    }
    
    .nav-link .badge {
        margin-left: 4px;
        font-size: 9px;
        padding: 1px 4px;
        line-height: 1.2;
        display: inline-block;
        vertical-align: middle;
    }
    
    /* Компактный ник пользователя - скрываем на очень узких экранах */
    .navbar > .container-fluid > .ms-auto.d-flex {
        margin-left: var(--spacing-xs) !important;
        gap: var(--spacing-xs);
        flex-shrink: 0;
    }
    
    /* Скрываем имя пользователя на экранах уже 1300px */
    @media (max-width: 1300px) {
        .navbar > .container-fluid > .ms-auto.d-flex span {
            display: none !important;
        }
        
        .navbar > .container-fluid > .ms-auto.d-flex i {
            font-size: 1.1rem !important;
        }
        
        .navbar > .container-fluid > .ms-auto.d-flex > a {
            padding: var(--spacing-xs) 4px;
        }
    }
    
    .navbar > .container-fluid > .ms-auto.d-flex > a {
        display: flex;
        align-items: center;
        gap: var(--spacing-xs);
        text-decoration: none;
        padding: var(--spacing-xs);
    }
    
    .navbar > .container-fluid > .ms-auto.d-flex span {
        font-size: var(--font-size-xs);
        white-space: nowrap;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }
    
    .navbar > .container-fluid > .ms-auto.d-flex i {
        font-size: 1.2rem !important;
        flex-shrink: 0;
    }
    
}

/* Еще более компактный навбар на всех больших экранах */
@media (min-width: 1441px) {
    .navbar-nav .nav-item {
        margin-right: 0;
    }
    
    .nav-link {
        padding: var(--spacing-sm) var(--spacing-xs) !important;
        font-size: var(--font-size-sm);
    }
    
    .nav-link i {
        margin-right: var(--spacing-xs);
        font-size: 16px;
    }
    
    .nav-link span {
        font-size: var(--font-size-sm);
    }
}

/* Мобильная навигация */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--color-bg-primary);
        border-top: 1px solid var(--color-border-light);
        margin-top: var(--spacing-sm);
        padding: var(--spacing-sm) 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-nav {
        padding: 0 var(--spacing-md);
    }
    
    .nav-link {
        padding: var(--spacing-md) !important;
        border-radius: var(--radius-sm);
        margin-bottom: var(--spacing-xs);
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .nav-link i {
        width: 20px;
        text-align: center;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .nav-link span {
        display: inline-block;
    }
}

/* ==================== */
/* Cards - Modern Glassmorphism Style with Animations */
/* ==================== */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-2xl);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease;
    position: relative;
    /* Убраны анимации при загрузке - они вызывали дерганье */
}

/* Animated gradient border on hover */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-2xl);
    padding: 2px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899, #6366F1);
    background-size: 300% 300%;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: subtract;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientShift 4s ease infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.card:hover {
    box-shadow: 
        0 20px 60px rgba(99, 102, 241, 0.2),
        0 0 0 1px rgba(99, 102, 241, 0.1) inset;
    transform: translate3d(0, -8px, 0) scale3d(1.01, 1.01, 1);
    border-color: transparent;
}

.card:active {
    transform: translate3d(0, -4px, 0) scale3d(0.99, 0.99, 1);
    transition-duration: 0.15s;
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    letter-spacing: -0.02em;
}

.card-body {
    padding: var(--spacing-xl);
}

/* Dark theme cards - Neon Glassmorphism */





/* ==================== */
/* Buttons - Modern Animated Style */
/* ==================== */
.btn {
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    min-height: 44px;
    box-shadow: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

/* Shimmer effect on buttons - Optimized */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: transform 0.5s ease;
    transform: translateX(0);
    will-change: transform;
}

.btn:hover::before {
    transform: translateX(200%);
}

.btn-primary {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.4),
        0 4px 8px rgba(139, 92, 246, 0.2);
    font-weight: var(--font-weight-bold);
    animation: gradientPulse 3s ease infinite;
}

@keyframes gradientPulse {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-primary:hover {
    color: white;
    box-shadow: 
        0 16px 40px rgba(99, 102, 241, 0.5),
        0 8px 16px rgba(139, 92, 246, 0.3);
    transform: translate3d(0, -4px, 0) scale3d(1.02, 1.02, 1);
}

.btn-primary:active {
    transform: translate3d(0, 0, 0) scale3d(0.96, 0.96, 1);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    transition-duration: 0.1s;
}

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
    color: white;
}

.btn-success:active {
    opacity: 0.8;
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
    color: white;
}

.btn-danger:active {
    opacity: 0.8;
}

.btn-outline-primary {
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

.btn-outline-success {
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
    min-height: 44px;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
    min-height: 28px;
}

/* ==================== */
/* Forms - Modern Glassmorphism Style with Animations */
/* ==================== */
.form-control,
.form-select {
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--color-text-primary);
    min-height: 54px;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
}

.form-control:focus,
.form-select:focus {
    border-color: transparent;
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.2),
        0 8px 24px rgba(99, 102, 241, 0.15);
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

/* Animated border gradient on focus */
.form-group {
    position: relative;
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6366F1, #8B5CF6, #EC4899);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group:focus-within::after {
    transform: translateX(-50%) scaleX(1);
}

.form-control::placeholder {
    color: var(--color-text-tertiary);
    transition: opacity 0.3s ease;
}

.form-control:focus::placeholder {
    opacity: 0.5;
}

.form-label {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
    display: block;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.form-group:focus-within .form-label {
    color: var(--color-primary);
}

/* Dark theme forms - Neon Style */







/* Мобильная оптимизация форм */
@media (max-width: 991.98px) {
    .form-control,
    .form-select {
        font-size: 16px; /* Предотвращает зум на iOS */
        min-height: 44px;
        padding: var(--spacing-md);
        border-radius: var(--radius-sm);
        touch-action: manipulation;
    }
    
    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 3px rgba(0, 149, 246, 0.15);
    }
    
    .form-label {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-xs);
        font-weight: var(--font-weight-semibold);
    }
    
    /* Улучшенные группы полей */
    .mb-3,
    .form-group {
        margin-bottom: var(--spacing-lg) !important;
    }
    
    /* Оптимизация textarea */
    textarea.form-control {
        min-height: 120px;
        resize: vertical;
    }
    
    /* Улучшенные чекбоксы и радиокнопки */
    .form-check {
        margin-bottom: var(--spacing-md);
        padding-left: calc(1.5em + var(--spacing-sm));
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
        margin-top: 0;
        margin-left: calc(-1.5em - var(--spacing-sm));
        cursor: pointer;
        touch-action: manipulation;
    }
    
    .form-check-label {
        font-size: var(--font-size-base);
        cursor: pointer;
        padding-left: var(--spacing-sm);
    }
    
    /* Улучшенные input groups */
    .input-group {
        flex-wrap: nowrap;
    }
    
    .input-group .form-control {
        flex: 1;
    }
    
    .input-group-text {
        min-height: 44px;
        padding: var(--spacing-md);
        font-size: var(--font-size-base);
    }
    
    /* Оптимизация кнопок в формах */
    .form-actions {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-xl);
    }
    
    .form-actions .btn {
        width: 100%;
        margin: 0;
    }
}

.form-check-input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M10 3L4.5 8.5 2 6l1.4-1.4L4.5 5.7 8.6 1.6 10 3z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.form-check-input:focus {
    box-shadow: none;
    outline: none;
}

/* ==================== */
/* Lists - Instagram Style */
/* ==================== */
.list-group {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}






.list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: var(--spacing-lg);
    background: transparent;
    transition: background-color 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
    /* Убраны анимации при загрузке страницы - они вызывали дерганье */
}

/* Hover highlight effect */
.list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6366F1, #EC4899);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item-action {
    cursor: pointer;
}

.list-group-item-action:hover {
    background: rgba(99, 102, 241, 0.06);
    padding-left: calc(var(--spacing-lg) + 8px);
    transform: translate3d(4px, 0, 0);
}

.list-group-item-action:hover::before {
    transform: scaleY(1);
}

.list-group-item-action:active {
    background: rgba(99, 102, 241, 0.12);
    transform: translate3d(0, 0, 0) scale3d(0.99, 0.99, 1);
    transition-duration: 0.1s;
}

/* ==================== */
/* Mobile Bottom Navigation - iOS Style - часть страницы */
/* ==================== */
/* Базовые стили - БЕЗ display, он управляется классами устройства */
.mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-top: 6px !important;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: env(safe-area-inset-left, 0px) !important;
    padding-right: env(safe-area-inset-right, 0px) !important;
    background: rgba(248, 248, 248, 0.85) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border: none !important;
    border-top: 0.5px solid rgba(60, 60, 67, 0.13) !important;
    border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    /* В PWA режиме нижний navbar всегда показан */
    justify-content: space-around !important;
    align-items: flex-start !important;
    z-index: 1020 !important;
    box-shadow: 0 -0.33px 0 rgba(60, 60, 67, 0.13), 0 -0.33px 0 rgba(60, 60, 67, 0.13) !important;
    -webkit-box-shadow: 0 -0.33px 0 rgba(60, 60, 67, 0.13), 0 -0.33px 0 rgba(60, 60, 67, 0.13) !important;
    text-shadow: none !important;
    min-height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    pointer-events: auto !important;
    box-sizing: border-box !important;
    transform: none !important;
    opacity: 1 !important;
    transition: background var(--transition-base), border-color var(--transition-base), backdrop-filter var(--transition-base);
}



.mobile-bottom-nav::-webkit-scrollbar {
    display: none;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    text-decoration: none;
    color: var(--color-text-secondary);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s ease,
                color 0.2s ease;
    border-radius: var(--radius-lg);
    flex: 0 0 auto;
    min-width: 56px;
    max-width: 72px;
    height: 48px;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto !important;
    z-index: 1;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Animated indicator dot */
.mobile-bottom-nav .nav-item::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1, #EC4899);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-bottom-nav .nav-item i {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 2px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.2s ease,
                opacity 0.2s ease;
    flex-shrink: 0;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.mobile-bottom-nav .nav-item span {
    font-size: 10px;
    font-weight: var(--font-weight-semibold);
    line-height: 1.1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    flex-shrink: 0;
    transition: color 0.2s ease, opacity 0.2s ease;
}

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

/* Animated top bar indicator - Optimized */
.mobile-bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: 32px;
    height: 4px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899);
    background-size: 200% 200%;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    animation: navIndicatorGlow 3s ease-in-out infinite;
    will-change: opacity;
    backface-visibility: hidden;
}

/* Упрощенная анимация - только opacity для плавности */
@keyframes navIndicatorGlow {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.8;
    }
}

.mobile-bottom-nav .nav-item.active::after {
    transform: translateX(-50%) scale(1);
}

.mobile-bottom-nav .nav-item.active i {
    transform: translate3d(0, -2px, 0) scale3d(1.25, 1.25, 1);
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Используем text-shadow вместо filter: drop-shadow для лучшей производительности */
    text-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.mobile-bottom-nav .nav-item:active {
    transform: translate3d(0, 0, 0) scale3d(0.95, 0.95, 1);
    background: rgba(99, 102, 241, 0.1);
    transition-duration: 0.1s;
}

/* Hover effect for non-touch */
@media (hover: hover) {
    .mobile-bottom-nav .nav-item:hover:not(.active) {
        color: var(--color-primary);
        background: rgba(99, 102, 241, 0.08);
    }
    
    .mobile-bottom-nav .nav-item:hover:not(.active) i {
        transform: translate3d(0, -1px, 0) scale3d(1.15, 1.15, 1);
    }
}

/* Убеждаемся, что все ссылки в нижнем меню кликабельны */
.mobile-bottom-nav .nav-item,
.mobile-bottom-nav .nav-item * {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.mobile-bottom-nav .nav-item i,
.mobile-bottom-nav .nav-item span {
    pointer-events: none;
}

/* Дополнительное меню "Еще" для мобильных - iOS Style */
.mobile-bottom-nav-more {
    position: relative;
}

/* Backdrop/overlay при открытом меню */
.mobile-bottom-nav-more-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: -1;
    will-change: opacity;
}

.mobile-bottom-nav-more-menu.show::before {
    opacity: 1;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.mobile-bottom-nav-more-menu {
    position: fixed;
    bottom: calc(56px + 20px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    left: 12px;
    background: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    padding: 0;
    border: none !important;
    outline: none !important;
    max-height: 70vh;
    z-index: 9999;
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translate3d(0, 30px, 0) scale3d(0.95, 0.95, 1);
    transition: 
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        display 0s linear 0.3s;
    pointer-events: none;
    overflow: hidden;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}

.mobile-bottom-nav-more-menu.show {
    display: flex;
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    pointer-events: auto;
    transition: 
        opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        display 0s linear 0s;
    background: #FFFFFF !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.mobile-bottom-nav-more-menu-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    overflow-y: auto;
    padding: 16px;
    background: #FFFFFF !important;
    border-radius: 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
}

.mobile-bottom-nav-more-menu.show .mobile-bottom-nav-more-menu-items {
    opacity: 1;
}

.mobile-bottom-nav-more-menu-items::-webkit-scrollbar {
    display: none;
}

.mobile-bottom-nav-more-menu .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    border-radius: 18px;
    text-decoration: none;
    color: #111827;
    transition: background-color 0.2s ease, transform 0.2s ease;
    min-width: auto;
    max-width: none;
    height: auto;
    min-height: 110px;
    background: #FFFFFF;
    position: relative;
    overflow: visible;
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale3d(0.95, 0.95, 1);
    animation: menuItemFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.mobile-bottom-nav-more-menu.show .nav-item {
    animation: menuItemFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Optimized staggered animation - только первые 8 элементов */
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(1) { animation-delay: 0s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(2) { animation-delay: 0.04s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(3) { animation-delay: 0.08s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(4) { animation-delay: 0.12s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(5) { animation-delay: 0.16s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(6) { animation-delay: 0.2s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(7) { animation-delay: 0.24s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(8) { animation-delay: 0.28s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(n+9) { 
    animation-delay: 0.32s;
    animation-duration: 0.3s;
}

@keyframes menuItemFadeIn {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale3d(0.95, 0.95, 1);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    }
}

.mobile-bottom-nav-more-menu .nav-item::before,
.mobile-bottom-nav-more-menu .nav-item::after {
    display: none !important;
    content: none !important;
}

.mobile-bottom-nav-more-menu .nav-item i {
    font-size: 32px;
    margin-right: 0;
    margin-bottom: 12px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366F1;
    flex-shrink: 0;
    -webkit-text-fill-color: currentColor !important;
    filter: none !important;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    transform: translate3d(0, 0, 0) scale3d(0.95, 0.95, 1);
    opacity: 0;
    animation: iconFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.mobile-bottom-nav-more-menu.show .nav-item:nth-child(1) i { animation-delay: 0.02s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(2) i { animation-delay: 0.06s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(3) i { animation-delay: 0.1s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(4) i { animation-delay: 0.14s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(5) i { animation-delay: 0.18s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(6) i { animation-delay: 0.22s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(7) i { animation-delay: 0.26s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(8) i { animation-delay: 0.3s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(n+9) i { 
    animation-delay: 0.34s;
    animation-duration: 0.25s;
}

@keyframes iconFadeIn {
    from {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale3d(0.95, 0.95, 1);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
    }
}

/* Разные цвета для иконок - более яркие и контрастные */
.mobile-bottom-nav-more-menu .nav-item:nth-child(1) i { 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.12) 100%);
    color: #4F46E5;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}
.mobile-bottom-nav-more-menu .nav-item:nth-child(2) i { 
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(236, 72, 153, 0.12) 100%);
    color: #DB2777;
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.35);
}
.mobile-bottom-nav-more-menu .nav-item:nth-child(3) i { 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.12) 100%);
    color: #059669;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}
.mobile-bottom-nav-more-menu .nav-item:nth-child(4) i { 
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.12) 100%);
    color: #D97706;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}
.mobile-bottom-nav-more-menu .nav-item:nth-child(5) i { 
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.12) 100%);
    color: #7C3AED;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}
.mobile-bottom-nav-more-menu .nav-item:nth-child(6) i { 
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0.12) 100%);
    color: #0284C7;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
}
.mobile-bottom-nav-more-menu .nav-item:nth-child(7) i { 
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(107, 114, 128, 0.12) 100%);
    color: #4B5563;
    box-shadow: 0 4px 16px rgba(107, 114, 128, 0.35);
}
.mobile-bottom-nav-more-menu .nav-item:nth-child(8) i { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.12) 100%);
    color: #DC2626;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}
.mobile-bottom-nav-more-menu .nav-item:nth-child(9) i { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.12) 100%);
    color: #DC2626;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.mobile-bottom-nav-more-menu .nav-item span {
    font-size: 14px;
    font-weight: 600;
    display: block !important;
    white-space: normal;
    text-align: center;
    visibility: visible !important;
    opacity: 0;
    width: 100% !important;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    color: #111827;
    line-height: 1.4;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translate3d(0, 3px, 0);
    will-change: transform, opacity;
    word-wrap: break-word;
    hyphens: auto;
    padding: 0 4px;
    margin-top: 4px;
}

.mobile-bottom-nav-more-menu.show .nav-item span {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Optimized delays for spans */
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(1) span { transition-delay: 0.04s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(2) span { transition-delay: 0.08s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(3) span { transition-delay: 0.12s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(4) span { transition-delay: 0.16s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(5) span { transition-delay: 0.2s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(6) span { transition-delay: 0.24s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(7) span { transition-delay: 0.28s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(8) span { transition-delay: 0.32s; }
.mobile-bottom-nav-more-menu.show .nav-item:nth-child(n+9) span { transition-delay: 0.36s; }

.mobile-bottom-nav-more-menu .nav-item:hover,
.mobile-bottom-nav-more-menu .nav-item:active {
    background: rgba(99, 102, 241, 0.1);
    opacity: 1;
    transform: translate3d(0, -2px, 0) scale3d(0.98, 0.98, 1);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.mobile-bottom-nav-more-menu .nav-item:hover i {
    transform: translate3d(0, 0, 0) scale3d(1.08, 1.08, 1);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.mobile-bottom-nav-more-menu .nav-item:active {
    transform: translate3d(0, 0, 0) scale3d(0.95, 0.95, 1);
    transition-duration: 0.1s;
}

.mobile-bottom-nav-more-menu .nav-item:active i {
    transform: translate3d(0, 0, 0) scale3d(0.95, 0.95, 1);
}

.mobile-bottom-nav-more-menu .nav-item.active {
    background: rgba(99, 102, 241, 0.12);
}

.mobile-bottom-nav-more-menu .nav-item.active span {
    color: var(--color-primary);
    font-weight: 600;
}

.mobile-bottom-nav-more-menu .nav-item.active i {
    background: linear-gradient(135deg, var(--color-primary) 0%, #8B5CF6 100%) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
    /* Убираем box-shadow для лучшей производительности */
}

/* Адаптивность для маленьких экранов */
@media (max-width: 375px) {
    .mobile-bottom-nav-more-menu-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 20px;
    }
    
    .mobile-bottom-nav-more-menu .nav-item {
        min-height: 120px;
        padding: 24px 16px;
    }
    
    .mobile-bottom-nav-more-menu .nav-item i {
        width: 72px;
        height: 72px;
        font-size: 36px;
    }
    
    .mobile-bottom-nav-more-menu .nav-item span {
        font-size: 15px;
    }
}

/* Scroll indicator для меню "Еще" */
.mobile-bottom-nav-more-menu-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0 8px;
    color: #6B7280;
    font-size: 12px;
    font-weight: 500;
    gap: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.mobile-bottom-nav-more-menu-scroll-hint i {
    animation: bounce-down 1.2s ease-in-out infinite;
    font-size: 14px;
}

.mobile-bottom-nav-more-menu-scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    padding: 0;
    overflow: hidden;
}

@keyframes bounce-down {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}

/* Темная тема для меню "Еще" - Neon Glassmorphism */





/* Разные неоновые цвета для иконок в темной теме */








/* Content padding for mobile bottom nav - PWA режим */
body {
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
}

main {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ==================== */
/* Alerts with Animations */
/* ==================== */
.alert {
    border: none;
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg) var(--spacing-xl);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
    animation: alertSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Animated shine effect */
.alert::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: alertShine 3s ease-in-out infinite;
}

@keyframes alertShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(52, 211, 153, 0.08) 100%);
    color: var(--color-success);
    border-left-color: var(--color-success);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(248, 113, 113, 0.08) 100%);
    color: var(--color-danger);
    border-left-color: var(--color-danger);
}

.alert-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(251, 191, 36, 0.08) 100%);
    color: var(--color-warning);
    border-left-color: var(--color-warning);
}

/* ==================== */
/* Badges with Animations */
/* ==================== */
.badge {
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-xs);
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-bg-tertiary) 0%, rgba(0,0,0,0.05) 100%);
    color: var(--color-text-primary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.badge:hover {
    transform: scale(1.05);
}

.badge-primary {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.badge-success {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Notification badge with pulse */
.badge-notification {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
    50% { transform: scale(1.1); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5); }
}

.badge.bg-primary {
    background: var(--color-primary) !important;
    color: white !important;
}

.badge.bg-success {
    background: var(--color-success) !important;
    color: white !important;
}

.badge.bg-danger {
    background: var(--color-danger) !important;
    color: white !important;
}

.badge.bg-warning {
    background: var(--color-warning) !important;
    color: white !important;
}

.badge.bg-secondary {
    background: var(--color-bg-tertiary) !important;
    color: var(--color-text-primary) !important;
}

.badge.bg-info {
    background: var(--color-primary) !important;
    color: white !important;
}

/* ==================== */
/* FAB - Floating Action Button with Animations */
/* ==================== */
.fab {
    position: fixed;
    bottom: calc(65px + var(--spacing-lg));
    right: var(--spacing-lg);
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    box-shadow: 
        0 8px 32px rgba(99, 102, 241, 0.5),
        0 4px 12px rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    z-index: var(--z-fab);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    touch-action: manipulation;
    animation: fabFloat 3s ease-in-out infinite, fabGradient 4s ease infinite;
}

@keyframes fabFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes fabGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Pulse ring effect */
.fab::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-full);
    background: inherit;
    opacity: 0.4;
    filter: blur(12px);
    z-index: -1;
    animation: fabPulse 2s ease-in-out infinite;
}

@keyframes fabPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 0.2; }
}

.fab:hover {
    transform: scale(1.15) translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(99, 102, 241, 0.6),
        0 8px 20px rgba(139, 92, 246, 0.4);
    color: white;
    animation-play-state: paused;
}

.fab:active {
    transform: scale(0.9);
    box-shadow: 
        0 4px 16px rgba(99, 102, 241, 0.4),
        0 2px 8px rgba(139, 92, 246, 0.2);
}

@media (min-width: 992px) {
    .fab {
        bottom: var(--spacing-lg);
    }
}

@media (max-width: 991.98px) {
    .fab {
        width: 56px;
        height: 56px;
        right: var(--spacing-md);
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 6px 16px rgba(0, 149, 246, 0.4);
    }
}

/* ==================== */
/* Modals - ИСПРАВЛЕННЫЕ стили для PWA */
/* ==================== */

/* Backdrop - затемняет ТОЛЬКО фон, НЕ модальное окно */
.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    z-index: 1040 !important;
    pointer-events: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-backdrop.show {
    opacity: 1 !important;
}

/* Модальное окно - контейнер */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1050 !important;
    display: none;
    overflow: hidden;
    outline: 0;
    touch-action: none;
    /* НЕ используем backdrop-filter на модальном окне */
    background: transparent !important;
}

.modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Диалог модального окна */
.modal-dialog {
    position: relative !important;
    z-index: 1060 !important;
    margin: 1rem !important;
    max-width: 500px !important;
    width: calc(100% - 2rem) !important;
    pointer-events: auto !important;
}

.modal-dialog-centered {
    display: flex !important;
    align-items: center !important;
    min-height: calc(100% - 2rem) !important;
}

/* В PWA режиме центрируем модальное окно по вертикали */
html.is-pwa-mode .modal-dialog-centered {
    min-height: calc(100vh - 56px - 52px - env(safe-area-inset-bottom, 0px) - 2rem) !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

/* Контент модального окна - ВСЕГДА яркий */
.modal-content {
    position: relative !important;
    z-index: 1070 !important;
    background: #FFFFFF !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    pointer-events: auto !important;
    /* КРИТИЧНО: убираем любые фильтры и эффекты */
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    max-height: 100% !important;
}

/* В PWA режиме ограничиваем максимальную высоту модального окна */
html.is-pwa-mode .modal-content {
    max-height: calc(100vh - 56px - 52px - 2rem - env(safe-area-inset-bottom, 0px)) !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal.show .modal-dialog {
    animation: modalSlideIn 0.3s ease-out;
}

/* Заголовок модального окна */
.modal-header {
    padding: 16px 20px !important;
    border-bottom: 1px solid #E5E7EB !important;
    background: #FFFFFF !important;
    flex-shrink: 0 !important;
}

/* Тело модального окна */
.modal-body {
    padding: 20px !important;
    background: #FFFFFF !important;
    max-height: calc(100vh - 200px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

/* В PWA режиме учитываем верхний navbar и нижнюю навигацию */
html.is-pwa-mode .modal-body {
    max-height: calc(100vh - 56px - 52px - 80px - 70px - 2rem - env(safe-area-inset-bottom, 0px)) !important;
}

/* Стили для скроллбара в модальных окнах */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Футер модального окна */
.modal-footer {
    padding: 16px 20px !important;
    border-top: 1px solid #E5E7EB !important;
    background: #FAFAFA !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: flex-start !important;
    flex-shrink: 0 !important;
}

/* Кнопки в футере */
.modal-footer .btn {
    flex: 1;
    min-width: 100px;
}

/* Кнопка закрытия */
.modal-header .btn-close {
    padding: 8px !important;
    margin: -8px -8px -8px auto !important;
}

/* Убеждаемся, что все интерактивные элементы кликабельны */
.modal button,
.modal .btn,
.modal a,
.modal input,
.modal select,
.modal textarea,
.modal [role="button"],
.modal [onclick],
.modal [data-bs-dismiss] {
    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
}

/* КРИТИЧНО: когда body.modal-open - модальное окно ПОВЕРХ всего */
body.modal-open {
    overflow: hidden !important;
}

body.modal-open .modal-backdrop {
    z-index: 1040 !important;
}

body.modal-open .modal.show {
    z-index: 1050 !important;
}

body.modal-open .modal.show .modal-dialog {
    z-index: 1060 !important;
}

body.modal-open .modal.show .modal-content {
    z-index: 1070 !important;
    background: #FFFFFF !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Мобильная оптимизация */
@media (max-width: 991.98px) {
    .modal-dialog {
        margin: 1rem !important;
        max-width: calc(100% - 2rem) !important;
    }
    
    .modal-dialog-centered {
        min-height: calc(100% - 2rem) !important;
    }
    
    /* В PWA режиме на мобильных учитываем navbar и нижнюю навигацию */
    html.is-pwa-mode .modal-dialog {
        margin: 0 !important;
        max-width: calc(100% - 2rem) !important;
    }
    
    html.is-pwa-mode .modal-dialog-centered {
        min-height: calc(100vh - 56px - 52px - env(safe-area-inset-bottom, 0px) - 2rem) !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .modal-content {
        border-radius: 16px !important;
    }
    
    .modal-header {
        padding: 14px 16px !important;
    }
    
    .modal-body {
        padding: 16px !important;
        max-height: calc(100vh - 180px) !important;
    }
    
    /* В PWA режиме на мобильных учитываем navbar и нижнюю навигацию */
    html.is-pwa-mode .modal-body {
        max-height: calc(100vh - 56px - 52px - 70px - 60px - 2rem - env(safe-area-inset-bottom, 0px)) !important;
    }
    
    .modal-footer {
        padding: 14px 16px !important;
    }
}





/* ==================== */
/* Utilities */
/* ==================== */
.shadow-apple {
    box-shadow: none;
}

.gradient-text {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
}

/* Instagram-style image thumbnails */
.img-thumbnail {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 0;
    background: var(--color-bg-primary);
}

/* Text colors for icons */
.text-primary {
    color: var(--color-primary) !important;
}

.text-success {
    color: var(--color-success) !important;
}

.text-danger {
    color: var(--color-danger) !important;
}

.text-muted {
    color: var(--color-text-secondary) !important;
}

/* ==================== */
/* PWA Layout - Мобильный интерфейс */
/* ==================== */

/* В PWA режиме: footer с отступом под мобильную навигацию */
html.is-pwa-mode .footer {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    margin-left: 0;
}

/* В Web режиме: footer с отступом под sidebar */
html.is-web-mode .footer {
    margin-left: 260px;
}

/* Адаптивная ширина контейнера для больших экранов */
@media (min-width: 768px) {
    .container-fluid {
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
        max-width: 935px;
        margin: 0 auto;
    }
}

/* ==================== */
/* Mobile Optimizations */
/* ==================== */

/* PWA мобильные оптимизации */
.container-fluid {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

/* Remove hover effects on touch devices */
html.has-touch .card:hover {
    transform: none;
}

html.has-touch .btn:hover {
    opacity: 1;
}

html.has-touch .list-group-item-action:hover {
    background: var(--color-bg-primary);
}

/* Fallback: media queries для маленьких экранов */
@media (max-width: 991.98px) {
    .container-fluid {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
    
    /* Remove hover effects on mobile */
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        opacity: 1;
    }
    
    .list-group-item-action:hover {
        background: var(--color-bg-primary);
    }
    
    /* Улучшенные карточки для мобильных */
    .card {
        margin-bottom: var(--spacing-md);
        border-radius: var(--radius-md);
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    /* Оптимизация заголовков */
    h1 {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-md);
    }
    
    h2 {
        font-size: var(--font-size-xl);
    }
    
    /* Улучшенные кнопки для touch */
    .btn {
        min-height: 44px;
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
        touch-action: manipulation;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    /* Оптимизация форм */
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px; /* Предотвращает зум на iOS */
        padding: var(--spacing-md);
    }
    
    /* Улучшенные списки */
    .list-group-item {
        padding: var(--spacing-md);
        min-height: 60px;
    }
    
    /* Оптимизация модальных окон */
    .modal-dialog {
        margin: var(--spacing-md) !important;
        max-width: calc(100% - 2 * var(--spacing-md)) !important;
    }
    
    .modal-content {
        border-radius: var(--radius-lg) !important;
        background: #FFFFFF !important;
        opacity: 1 !important;
        filter: none !important;
        -webkit-filter: none !important;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--spacing-lg);
        background: #FFFFFF !important;
    }
    
    .modal-footer {
        background: #FAFAFA !important;
    }
    
    /* Оптимизация таблиц */
    .table-responsive {
        border-radius: var(--radius-md);
        overflow: hidden;
    }
    
    .table {
        font-size: var(--font-size-sm);
    }
    
    /* Улучшенные бейджи */
    .badge {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-xs);
        min-height: 20px;
    }
    
    /* Оптимизация навигации */
    .navbar {
        min-height: 48px;
        padding: 0 var(--spacing-md);
    }
    
    .navbar-brand {
        font-size: var(--font-size-lg);
    }
    
    .navbar-toggler {
        padding: var(--spacing-xs);
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Улучшенные карточки клиентов и записей */
    .client-card,
    .appointment-card {
        margin-bottom: var(--spacing-md);
    }
    
    .client-card .card-body,
    .appointment-card .card-body {
        padding: var(--spacing-md);
    }
    
    /* Оптимизация статистики на главной */
    .row.g-4 > [class*="col-"] {
        margin-bottom: var(--spacing-md);
    }
    
    /* Улучшенные input groups */
    .input-group {
        flex-wrap: nowrap;
    }
    
    .input-group .btn {
        min-width: 44px;
        padding: var(--spacing-md);
    }
    
    /* Оптимизация dropdown */
    .dropdown-menu {
        max-width: calc(100vw - 2 * var(--spacing-lg));
        max-height: 60vh;
        overflow-y: auto;
    }
    
    /* Улучшенные alert */
    .alert {
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
        font-size: var(--font-size-sm);
    }
    
    /* Оптимизация FAB */
    .fab {
        width: 56px;
        height: 56px;
        font-size: 24px;
        box-shadow: 0 6px 16px rgba(0, 149, 246, 0.4);
    }
    
    /* Улучшенные карточки быстрых действий */
    .card.text-center {
        min-height: 140px;
    }
    
    /* Оптимизация текста */
    .text-muted {
        font-size: var(--font-size-sm);
    }
    
    /* Улучшенные фильтры */
    .d-flex.flex-wrap.gap-2 {
        gap: var(--spacing-sm) !important;
    }
    
    /* Оптимизация поиска */
    .input-group .form-control {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
    
    /* Улучшенные списки */
    .list-group {
        border-radius: var(--radius-md);
    }
    
    .list-group-item {
        border-radius: 0;
    }
    
    .list-group-item:first-child {
        border-top-left-radius: var(--radius-md);
        border-top-right-radius: var(--radius-md);
    }
    
    .list-group-item:last-child {
        border-bottom-left-radius: var(--radius-md);
        border-bottom-right-radius: var(--radius-md);
    }
    
    /* Оптимизация статистических карточек */
    .card.text-center .card-body {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    /* Улучшенные бейджи в мобильных */
    .badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 20px;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    /* Оптимизация dropdown меню */
    .dropdown-toggle::after {
        margin-left: var(--spacing-xs);
    }
    
    /* Улучшенные разделители */
    hr {
        margin: var(--spacing-lg) 0;
    }
    
    /* Оптимизация контейнеров */
    .container-fluid {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
    
    /* Улучшенные заголовки секций */
    .row.mb-4,
    .row.mb-5 {
        margin-bottom: var(--spacing-lg) !important;
    }
    
    /* Оптимизация пустых состояний */
    .alert.text-center {
        padding: var(--spacing-xl) var(--spacing-md);
        border-radius: var(--radius-md);
    }
    
    /* Улучшенная производительность */
    .card,
    .list-group-item,
    .btn {
        will-change: transform;
        transform: translateZ(0);
    }
    
    /* Компактный футер для мобильных */
    .footer {
        margin-bottom: calc(56px + 8px + 8px + env(safe-area-inset-bottom, 0px)) !important;
        padding-bottom: var(--spacing-lg) !important;
        position: relative;
        z-index: 1;
    }
    
    .footer a {
        transition: color var(--transition-fast);
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: var(--spacing-xs) var(--spacing-sm);
        position: relative;
        z-index: 2;
    }
    
    .footer a:hover {
        color: var(--color-primary) !important;
    }
    
    /* Убеждаемся, что футер не перекрывается нижним меню */
    body {
        padding-bottom: 0;
    }
    
    /* Увеличиваем отступ для main, чтобы футер был виден */
    main {
        padding-bottom: calc(56px + 8px + 8px + env(safe-area-inset-bottom, 0px) + 100px) !important;
    }
}

/* ==================== */
/* Accessibility */
/* ==================== */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Disabled states */
.btn:disabled,
.form-control:disabled,
.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== */
/* Input autofill styling */
/* ==================== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--color-text-primary);
    -webkit-box-shadow: 0 0 0px 1000px var(--color-bg-primary) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* ==================== */
/* Select styling */
/* ==================== */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    -webkit-appearance: none;
    appearance: none;
}

/* ==================== */
/* Links */
/* ==================== */
a {
    color: var(--color-primary);
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(0, 149, 246, 0.1);
    touch-action: manipulation;
}

a:hover {
    color: var(--color-primary-hover);
    text-decoration: none;
}

a:active {
    opacity: 0.7;
}

/* Мобильная оптимизация ссылок */
@media (max-width: 991.98px) {
    a {
        -webkit-tap-highlight-color: rgba(0, 149, 246, 0.15);
    }
    
    /* Улучшенные кликабельные области */
    .list-group-item-action,
    .card[href],
    .card a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ==================== */
/* Status colors */
/* ==================== */
.status-select {
    font-weight: var(--font-weight-medium);
    color: white !important;
}

/* Обновлены цвета для согласованности: completed - зеленый, cancelled - красный, scheduled - синий */
.status-select.status-scheduled {
    background-color: #0dcaf0 !important; /* bg-info - синий */
    border-color: #0dcaf0 !important;
    color: white !important;
}

.status-select.status-completed {
    background-color: var(--color-success) !important; /* bg-success - зеленый */
    border-color: var(--color-success) !important;
    color: white !important;
}

.status-select.status-cancelled {
    background-color: #dc3545 !important; /* bg-danger - красный */
    border-color: #dc3545 !important;
    color: white !important;
}

/* ==================== */
/* Advanced Animations */
/* ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

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

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(99, 102, 241, 0.3); }
    50% { border-color: rgba(236, 72, 153, 0.5); }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

/* Floating animation for FAB */
.fab {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation for badges/notifications */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Shimmer effect for loading states */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}


/* Glow effect for important elements */
.glow {
    animation: glow 2s ease-in-out infinite;
}

/* ==================== */
/* Client & Appointment Cards */
/* ==================== */
.client-card,
.appointment-card {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    background: var(--color-bg-primary);
    transition: all var(--transition-base);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.client-card:hover,
.appointment-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-border);
}

/* Appointment Card Status Colors - Subtle */
.appointment-card.status-scheduled {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.08) 0%, rgba(13, 202, 240, 0.03) 100%);
    border-left: 3px solid rgba(13, 202, 240, 0.4);
}

.appointment-card.status-completed {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.08) 0%, rgba(25, 135, 84, 0.03) 100%);
    border-left: 3px solid rgba(25, 135, 84, 0.4);
}

.appointment-card.status-cancelled {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.08) 0%, rgba(220, 53, 69, 0.03) 100%);
    border-left: 3px solid rgba(220, 53, 69, 0.4);
}

.appointment-card.status-scheduled:hover {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.12) 0%, rgba(13, 202, 240, 0.05) 100%);
    border-left-color: rgba(13, 202, 240, 0.6);
}

.appointment-card.status-completed:hover {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.12) 0%, rgba(25, 135, 84, 0.05) 100%);
    border-left-color: rgba(25, 135, 84, 0.6);
}

.appointment-card.status-cancelled:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.12) 0%, rgba(220, 53, 69, 0.05) 100%);
    border-left-color: rgba(220, 53, 69, 0.6);
}

.client-card a,
.appointment-card a {
    display: block;
    height: 100%;
}

/* Avatar Circle */
.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-semibold);
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.client-avatar,
.appointment-avatar {
    flex-shrink: 0;
}

/* Card Info Sections */
.client-info,
.appointment-details {
    color: var(--color-text-primary);
}

/* Status Badge */
.status-badge {
    font-weight: var(--font-weight-medium);
    padding: 4px 10px;
}

/* Card Borders */
.client-card .border-top,
.appointment-card .border-top {
    border-color: var(--color-border-light) !important;
}

/* Selected Cards */
.client-card.card-selected,
.appointment-card.card-selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 149, 246, 0.1);
}

.client-card.card-selected {
    background: var(--color-primary-light);
}

.appointment-card.card-selected.status-scheduled {
    background: linear-gradient(135deg, rgba(253, 126, 20, 0.15) 0%, rgba(253, 126, 20, 0.08) 100%);
}

.appointment-card.card-selected.status-completed {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.15) 0%, rgba(25, 135, 84, 0.08) 100%);
}

.appointment-card.card-selected.status-cancelled {
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.15) 0%, rgba(108, 117, 125, 0.08) 100%);
}

.client-card.card-selected .avatar-circle,
.appointment-card.card-selected .avatar-circle {
    box-shadow: 0 0 0 2px var(--color-primary);
}

/* Fallback for browsers that support :has() */
@supports selector(:has(*)) {
    .client-card:has(.client-checkbox:checked),
    .appointment-card:has(.appointment-checkbox:checked) {
        border-color: var(--color-primary);
        background: var(--color-primary-light);
        box-shadow: 0 0 0 2px rgba(0, 149, 246, 0.1);
    }

    .client-card:has(.client-checkbox:checked) .avatar-circle,
    .appointment-card:has(.appointment-checkbox:checked) .avatar-circle {
        box-shadow: 0 0 0 2px var(--color-primary);
    }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .client-card:hover,
    .appointment-card:hover {
        transform: none;
    }
    
    .avatar-circle {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    /* Улучшенные карточки для мобильных */
    .client-card,
    .appointment-card {
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }
    
    .client-card .card-body,
    .appointment-card .card-body {
        padding: var(--spacing-md);
    }
    
    /* Оптимизация сетки карточек */
    .row.g-3 > [class*="col-"] {
        padding-left: calc(var(--spacing-sm) / 2);
        padding-right: calc(var(--spacing-sm) / 2);
    }
    
    /* Улучшенные чекбоксы в карточках - справа вверху, но не перекрывают стрелочку */
    .client-card .form-check,
    .appointment-card .form-check {
        top: var(--spacing-md);
        right: 36px; /* Смещаем левее, чтобы не перекрывать стрелочку */
        left: auto !important;
    }
    
    .form-check-input {
        width: 22px;
        height: 22px;
        cursor: pointer;
        background-color: var(--color-bg-primary);
        border: 2px solid var(--color-border);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .form-check-input:checked {
        background-color: var(--color-primary);
        border-color: var(--color-primary);
    }
    
    /* На мобильных стрелочка более заметная */
    .client-card .bi-chevron-right,
    .appointment-card .bi-chevron-right {
        display: inline-block;
        color: var(--color-text-tertiary) !important;
        opacity: 0.6;
        font-size: 18px;
    }
}

/* Десктопная версия - также справа вверху, но не перекрывает стрелочку */
@media (min-width: 992px) {
    .client-card .form-check,
    .appointment-card .form-check {
        top: 12px;
        right: 36px; /* Смещаем левее, чтобы не перекрывать стрелочку */
        left: auto !important;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
        cursor: pointer;
        background-color: var(--color-bg-primary);
        border: 2px solid var(--color-border);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .form-check-input:checked {
        background-color: var(--color-primary);
        border-color: var(--color-primary);
    }
    
    /* На десктопе стрелочка видна и более заметная */
    .client-card .bi-chevron-right,
    .appointment-card .bi-chevron-right {
        display: inline-block;
        color: var(--color-text-tertiary) !important;
        opacity: 0.7;
        font-size: 18px;
    }
}

/* ==================== */
/* Reduced Motion */
/* ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .client-card:hover,
    .appointment-card:hover {
        transform: none;
    }
}

/* ==================== */
/* Table styling (if used) */
/* ==================== */
table {
    border-collapse: separate;
    border-spacing: 0;
}

.table {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Мобильная оптимизация таблиц */
@media (max-width: 991.98px) {
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md);
    }
    
    .table {
        font-size: var(--font-size-sm);
        margin-bottom: 0;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: var(--spacing-md);
        border: 1px solid var(--color-border-light);
        border-radius: var(--radius-md);
        background: var(--color-bg-primary);
        padding: var(--spacing-md);
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: var(--spacing-sm) 0;
        border: none;
        text-align: right;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: var(--font-weight-semibold);
        text-align: left;
        margin-right: var(--spacing-md);
        flex-shrink: 0;
    }
    
    .table tbody td:last-child {
        border-bottom: none;
    }
    
    /* Альтернативный вариант - карточки вместо таблиц */
    .table-mobile-cards {
        display: block;
    }
    
    .table-mobile-cards thead {
        display: none;
    }
    
    .table-mobile-cards tbody {
        display: block;
    }
    
    .table-mobile-cards tbody tr {
        display: block;
        margin-bottom: var(--spacing-md);
        background: var(--color-bg-primary);
        border: 1px solid var(--color-border-light);
        border-radius: var(--radius-md);
        padding: var(--spacing-md);
        box-shadow: var(--shadow-sm);
    }
    
    .table-mobile-cards tbody td {
        display: block;
        padding: var(--spacing-sm) 0;
        border: none;
        text-align: left;
    }
    
    .table-mobile-cards tbody td::before {
        content: attr(data-label) ": ";
        font-weight: var(--font-weight-semibold);
        display: inline-block;
        min-width: 100px;
    }
}

/* ==================== */
/* Dropdown menus */
/* ==================== */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: var(--spacing-sm);
    margin-top: var(--spacing-xs);
}

.dropdown-item {
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--color-bg-secondary);
}

.dropdown-item:active {
    background: var(--color-bg-tertiary);
    opacity: 0.9;
}

/* ==================== */
/* Input group */
/* ==================== */
.input-group {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.input-group .form-control {
    border-right: none;
}

.input-group-text {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-right: none;
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    padding: var(--spacing-md);
}

.input-group .form-control:focus ~ .input-group-text,
.input-group .form-control:first-child:focus ~ .input-group-text {
    border-color: var(--color-border);
}

.input-group .btn {
    border-left: none;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-left: none;
    color: var(--color-text-primary);
}

.input-group .btn:focus {
    border-color: var(--color-border);
    box-shadow: none;
}

.input-group .form-control:focus ~ .btn,
.input-group .btn:focus {
    border-color: var(--color-border);
}

/* ==================== */
/* Navbar toggler */
/* ==================== */
.navbar-toggler {
    border: none;
    padding: var(--spacing-xs);
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='2'%3E%3Cpath d='M3 12h18M3 6h18M3 18h18'/%3E%3C/svg%3E");
}

/* Дополнительные стили для темной темы */


/* Темная тема - карточки клиентов и записей */




/* Темная тема - списки */


/* Темная тема - алерты */




/* Темная тема - таблицы */




/* Темная тема - бейджи */

/* Темная тема - текст */


/* Темная тема - формы */


/* Темная тема - разделители */

/* Темная тема - фоны с прозрачностью */

/* Темная тема - iOS стили */


/* Темная тема - модальные окна */

/* Темная тема - выпадающие списки */

/* Темная тема - input groups */

/* Темная тема - кнопки outline */




/* Темная тема - страницы авторизации */















/* ==================== */
/* УЛУЧШЕННЫЕ СТИЛИ ДЛЯ ТЕМНОЙ ТЕМЫ - МАКСИМАЛЬНАЯ ЧИТАБЕЛЬНОСТЬ */
/* ==================== */

/* Улучшенная типографика для темной темы */


/* Улучшенные карточки для темной темы - Neon Style */




/* Улучшенные кнопки для темной темы - Neon Glow */








/* Улучшенные формы для темной темы */




/* Улучшенные списки для темной темы */




/* Улучшенные бейджи для темной темы */






/* Улучшенные алерты для темной темы - Neon Glow */





/* Улучшенные модальные окна для темной темы */





/* Улучшенная навигация для темной темы */





/* Улучшенное нижнее меню для темной темы - Neon Style */








/* Неоновое свечение для активных элементов */

@keyframes glowPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(139, 139, 255, 0.8);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 20px rgba(139, 139, 255, 1);
    }
}

/* Улучшенная читабельность иконок в темной теме - специальные правила */




/* Улучшенные таблицы для темной темы */





/* Bootstrap table classes for dark theme */










/* Form controls in dark theme tables */




/* Canvas and Chart.js dark theme */


/* Card body with charts - transparent background */

/* Bootstrap utility classes for dark theme */





/* Улучшенные dropdown для темной темы */




/* Улучшенные разделители для темной темы */

/* Улучшенные input-group для темной темы */

/* Улучшенные карточки клиентов и записей для темной темы */





/* Улучшенные поисковые бары для темной темы */



/* Улучшенные фильтр-чипы для темной темы */



/* Улучшенный segmented control для темной темы */



/* Улучшенные статус-бейджи для темной темы */




/* Улучшенный FAB для темной темы - Neon Glow */




/* Улучшенные пустые состояния для темной темы */



/* Улучшенные ссылки для темной темы */


/* Улучшенный текст для темной темы */






/* Улучшенный фон body для темной темы */

/* ==================== */
/* УЛУЧШЕННЫЙ UX ДЛЯ НЕТЕХНИЧЕСКИХ ПОЛЬЗОВАТЕЛЕЙ */
/* ==================== */

/* Более крупные и заметные кнопки действий */
.btn-lg,
.btn-primary.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 14px;
    min-height: 52px;
}

/* Улучшенные карточки с более четким визуальным разделением */
.card {
    border-radius: 16px;
    overflow: hidden;
}

.card-header {
    font-size: 16px;
    font-weight: 600;
    padding: 16px 20px;
}

.card-body {
    padding: 20px;
}

/* Более заметные иконки в карточках */
.settings-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 26px;
}

/* Улучшенные аватары */
.client-avatar-ios,
.profile-avatar-ios {
    font-weight: 700;
    text-transform: uppercase;
}

/* Более четкие статусы */
.status-badge-ios {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 10px;
}

/* Улучшенная обратная связь при нажатии */
.btn:active,
.card:active,
.list-group-item-action:active,
.settings-card-ios:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Более заметные placeholder'ы */
.form-control::placeholder {
    color: var(--color-text-tertiary);
    font-style: italic;
}

/* Улучшенные заголовки страниц */
.page-title,
h1[style*="font-size: 34px"],
h1[style*="font-size: 1.75rem"] {
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

/* Улучшенные подзаголовки */
.section-title-ios {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Улучшенная навигация - более крупные touch targets */
.mobile-bottom-nav .nav-item {
    min-width: 60px;
    min-height: 52px;
    padding: 6px 8px;
}

.mobile-bottom-nav .nav-item i {
    font-size: 22px;
}

.mobile-bottom-nav .nav-item span {
    font-size: 10px;
    font-weight: 600;
}

/* Улучшенный FAB - более заметный */
.fab {
    width: 60px;
    height: 60px;
    font-size: 26px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

/* Улучшенные формы - более крупные поля */
.form-control,
.form-select {
    min-height: 48px;
    font-size: 16px;
    padding: 12px 16px;
    border-radius: 12px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Улучшенные чекбоксы */
.form-check-input {
    width: 22px;
    height: 22px;
    margin-top: 0;
}

.form-check-label {
    font-size: 15px;
    padding-left: 8px;
}

/* Улучшенные алерты - более заметные */
.alert {
    padding: 16px 20px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.5;
}

.alert i {
    font-size: 20px;
    margin-right: 10px;
}

/* Улучшенные бейджи - более читабельные */
.badge {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
}

/* Улучшенные списки */
.list-group-item {
    padding: 16px 20px;
    font-size: 15px;
}

/* Улучшенные модальные окна */
.modal-content {
    border-radius: 20px !important;
    background: #FFFFFF !important;
    opacity: 1 !important;
    filter: none !important;
    -webkit-filter: none !important;
}

.modal-header {
    padding: 20px 24px;
    background: #FFFFFF !important;
}

.modal-body {
    padding: 24px;
    background: #FFFFFF !important;
}

.modal-footer {
    padding: 16px 24px 20px;
    background: #FAFAFA !important;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

/* Улучшенные dropdown */
.dropdown-item {
    padding: 12px 16px;
    font-size: 15px;
}

/* Анимация появления элементов */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.list-group-item,
.client-row-ios,
.appointment-row-ios {
    /* Убраны анимации при загрузке - они вызывали дерганье влево-вправо */
    transition: transform 0.2s ease, background-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Hover effect with animated border */
.client-row-ios::before,
.appointment-row-ios::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #6366F1, #EC4899);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-row-ios:hover,
.appointment-row-ios:hover {
    transform: translateX(8px) scale(1.01);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
}

.client-row-ios:hover::before,
.appointment-row-ios:hover::before {
    transform: scaleY(1);
}

.client-row-ios:active,
.appointment-row-ios:active {
    transform: scale(0.98);
}

/* Плавные переходы для всех интерактивных элементов */
.btn,
.card,
.list-group-item-action,
.nav-link,
.dropdown-item,
.form-control,
.form-select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== */
/* Глобальные стили для секций настроек в тёмной теме */
/* ==================== */














/* ==================== */
/* Performance Optimizations */
/* ==================== */

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* GPU acceleration for animated elements */
.card,
.btn,
.list-group-item,
.mobile-bottom-nav-more-menu,
.content-wrapper {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

/* GPU acceleration for nav items - не конфликтует с базовыми стилями */
.mobile-bottom-nav .nav-item {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Optimize repaints - remove will-change after animation completes */
.card:not(:hover):not(:focus) {
    will-change: auto;
}

/* Prevent layout shifts */
img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Optimize scrolling */
.mobile-bottom-nav-more-menu-items {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

/* Reduce animation complexity on lower-end devices */
@media (max-width: 767px) {
    .card {
        animation-duration: 0.3s;
    }
    
    .list-group-item {
        animation-duration: 0.25s;
    }
    
    .mobile-bottom-nav-more-menu.show {
        transition-duration: 0.3s;
    }
}

/* ==================== */
/* Улучшенные UI Компоненты для PWA */
/* ==================== */

/* Современные карточки с градиентами и тенями */
.card-modern {
    background: var(--color-bg-primary);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
}

.card-modern:hover::before {
    opacity: 1;
}



/* Улучшенные кнопки с микро-анимациями */
.btn-gradient {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-gradient:active::before {
    width: 300px;
    height: 300px;
}

.btn-gradient:active {
    transform: scale(0.98);
}

/* Иконки с эффектом свечения */
.icon-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.icon-glow:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}



/* Пульсирующий индикатор статуса */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.status-indicator::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 0; }
}

.status-indicator.online {
    background: var(--color-success);
}

.status-indicator.busy {
    background: var(--color-warning);
}

.status-indicator.offline {
    background: var(--color-text-tertiary);
}

/* Скелетон лоадер для лучшего UX */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-secondary) 0%,
        var(--color-bg-tertiary) 50%,
        var(--color-bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 12px;
    margin: 8px 0;
}

.skeleton-title {
    height: 20px;
    width: 70%;
    margin: 12px 0;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Чип/Бейдж компонент */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    transition: all 0.2s ease;
}

.chip:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.chip.chip-primary {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.chip.chip-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.chip.chip-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

.chip.chip-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}



/* Улучшенный input с floating label */
.input-group-modern {
    position: relative;
    margin-bottom: 24px;
}

.input-modern {
    width: 100%;
    padding: 16px 16px 8px;
    font-size: 16px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    transition: all 0.3s ease;
    outline: none;
}

.input-modern:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-light);
}

.input-modern::placeholder {
    color: transparent;
}

.input-label-modern {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--color-bg-primary);
    padding: 0 4px;
}

.input-modern:focus + .input-label-modern,
.input-modern:not(:placeholder-shown) + .input-label-modern {
    top: 0;
    font-size: 12px;
    color: var(--color-primary);
}



/* Тост уведомления */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--color-bg-primary);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text-primary);
}

.toast-message {
    font-size: 14px;
    color: var(--color-text-secondary);
}


@media (max-width: 768px) {
    .toast-container {
        right: 12px;
        left: 12px;
        top: 70px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* Пустое состояние с иллюстрацией */
.empty-state-modern {
    text-align: center;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
    animation: emptyStatePulse 3s ease-in-out infinite;
}

@keyframes emptyStatePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.empty-state-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.empty-state-description {
    font-size: 16px;
    color: var(--color-text-secondary);
    max-width: 400px;
    line-height: 1.6;
}


/* Прогресс-бар */
.progress-modern {
    height: 8px;
    background: var(--color-bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-modern {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}


/* Divider с текстом */
.divider-modern {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--color-text-tertiary);
    font-size: 14px;
}

.divider-modern::before,
.divider-modern::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border);
}

.divider-modern::before {
    margin-right: 16px;
}

.divider-modern::after {
    margin-left: 16px;
}

/* Accordion улучшенный */
.accordion-modern {
    border-radius: 16px;
    overflow: hidden;
    background: var(--color-bg-primary);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.08);
}

.accordion-item-modern {
    border-bottom: 1px solid var(--color-border);
}

.accordion-item-modern:last-child {
    border-bottom: none;
}

.accordion-header-modern {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-bg-primary);
    transition: all 0.3s ease;
}

.accordion-header-modern:hover {
    background: var(--color-bg-secondary);
}

.accordion-icon-modern {
    font-size: 20px;
    transition: transform 0.3s ease;
    color: var(--color-primary);
}

.accordion-item-modern.open .accordion-icon-modern {
    transform: rotate(180deg);
}

.accordion-content-modern {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content-inner {
    padding: 0 20px 20px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}




/* Tooltip современный */
.tooltip-modern {
    position: relative;
    display: inline-block;
}

.tooltip-modern .tooltip-text {
    visibility: hidden;
    opacity: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 13px;
    transition: all 0.3s ease;
}

.tooltip-modern .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.tooltip-modern:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}


/* ==================== */
/* Notifications Section - Instagram Style */
/* ==================== */

.notifications-container {
    max-width: 100%;
    padding: 0;
}

.notifications-header {
    padding: 16px;
    background: var(--color-bg-primary);
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.notifications-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.notifications-filters::-webkit-scrollbar {
    display: none;
}

.notifications-filters .btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.notifications-filters .btn {
    white-space: nowrap;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.notifications-filters .btn .badge {
    font-size: 11px;
    padding: 2px 6px;
}

.notification-group {
    padding: 0 16px;
}

.notification-group-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-top: 8px;
}

.notification-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    background: var(--color-bg-primary);
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    gap: 12px;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--color-bg-secondary);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.03);
}

.notification-item.unread:hover {
    background: rgba(99, 102, 241, 0.06);
}

.notification-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.notification-item.unread .notification-icon {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-text-primary);
    margin: 0;
    word-wrap: break-word;
}

.notification-item.unread .notification-message {
    font-weight: 500;
}

.notification-time {
    font-size: 12px;
    color: var(--color-text-tertiary);
    display: block;
    margin-top: 4px;
}

.notification-indicator {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: 16px;
    flex-shrink: 0;
}

.empty-notifications {
    padding: 60px 20px;
    text-align: center;
}

.empty-notifications i {
    opacity: 0.3;
    margin-bottom: 16px;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .notifications-header {
        padding: 12px;
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 16px;
    }
    
    .notification-message {
        font-size: 13px;
    }
    
    .notifications-filters .btn {
        font-size: 12px;
        padding: 5px 12px;
    }
}

/* Анимация появления уведомлений */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-item {
    animation: slideIn 0.3s ease;
}

/* Стили для кнопки "Отметить все как прочитанные" */
#markAllReadBtn {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
}

#markAllReadBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== */
/* Notification Bell Icon in Navigation */
/* ==================== */

/* Мобильная версия - иконка колокольчика в навбаре */
.navbar .ms-auto .position-relative {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.navbar .ms-auto .position-relative:hover {
    background-color: var(--color-bg-secondary);
}

.navbar .ms-auto .position-relative .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-weight: 600;
    line-height: 1.2;
    border: 2px solid var(--color-bg-primary);
}

/* Веб-версия - иконка колокольчика в сайдбаре */
.sidebar-nav-link {
    position: relative;
}

.sidebar-nav-link .badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    line-height: 1.2;
}

/* Анимация для иконки уведомлений при наличии непрочитанных */
@keyframes bell-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.navbar .ms-auto .position-relative:has(.badge) i,
.sidebar-nav-link:has(.badge) i {
    animation: bell-pulse 2s ease-in-out infinite;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .navbar .ms-auto .position-relative {
        padding: 6px;
    }
    
    .navbar .ms-auto .position-relative i {
        font-size: 1.2rem !important;
    }
    
    .navbar .ms-auto .position-relative .badge {
        font-size: 0.6rem;
        padding: 1px 4px;
        min-width: 16px;
    }
}


