        :root {
            --primary: #2563eb;
            --primary-dark: #1d4ed8;
            --primary-light: #3b82f6;
            --secondary: #ea580c;
            --success: #16a34a;
            --danger: #dc2626;
            --dark: #111827;
            --gray-100: #f9fafb;
            --gray-200: #f3f4f6;
            --gray-300: #e5e7eb;
            --gray-400: #d1d5db;
            --gray-500: #9ca3af;
            --gray-600: #6b7280;
            --gray-700: #4b5563;
            --gray-800: #374151;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-xl: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            --radius: 8px;
            --radius-sm: 6px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            line-height: 1.6;
            color: var(--dark);
            background: var(--gray-100);
            padding-top: 65px;
            min-width: 100%;
            position: relative;
        }
        
        /* Предотвращаем горизонтальную прокрутку без блокировки кликов */
        html {
            overflow-x: hidden;
        }
        
        /* Фикс для iOS Safari */
        @supports (-webkit-touch-callout: none) {
            body {
                -webkit-overflow-scrolling: touch;
            }
        }
        
        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 20px;
        }
        
        /* Navigation */
        .navigation {
            background: white;
            border-bottom: 1px solid var(--gray-200);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
        }
        
        .nav-container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .nav-logo {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--dark);
            text-decoration: none;
            letter-spacing: -0.02em;
        }
        
        .nav-links {
            display: flex;
            gap: 2rem;
            align-items: center;
        }
        
        .nav-links a {
            color: var(--gray-700);
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
            padding: 4px 0;
        }
        
        .nav-links a:hover {
            color: var(--primary);
        }
        
        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--primary);
            transition: width 0.2s ease;
        }
        
        .nav-links a:hover::after {
            width: 100%;
        }
        
        .auth-actions {
            display: flex;
            gap: 1.25rem;
            align-items: center;
            font-size: 0.95rem;
        }
        
        .auth-actions .profile-link {
            color: var(--gray-600);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s ease;
        }
        
        .auth-actions .profile-link:hover {
            color: var(--primary);
        }
        
        .auth-button {
            background: var(--primary);
            color: white !important;
            padding: 0.5rem 1.25rem;
            border-radius: var(--radius-sm);
            text-decoration: none;
            font-weight: 500;
            transition: background-color 0.2s ease;
        }
        
        .auth-button:hover {
            background: var(--primary-dark);
        }
        
        /* Messages */
        .messages {
            margin: 1rem 0;
            position: relative;
            z-index: 1001;
        }
        
        .alert {
            padding: 1rem 1.5rem;
            border-radius: var(--radius);
            margin-bottom: 1rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            position: relative;
            z-index: 1001;
        }
        
        .alert-success {
            background: #d1fae5;
            color: #065f46;
            border: 1px solid #a7f3d0;
        }
        
        .alert-error, .alert-danger {
            background: #fee2e2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }
        
        .alert-warning {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fde68a;
        }
        
        .alert-info {
            background: #dbeafe;
            color: #1e40af;
            border: 1px solid #bfdbfe;
        }
        
        /* Footer */
        .footer {
            margin-top: 60px;
            padding: 40px 20px 30px;
            background: #fafafa;
            border-top: 1px solid var(--gray-200);
            color: var(--gray-500);
        }
        
        .footer-container {
            max-width: 1200px;
            margin: 0 auto;
        }
        
        .footer-content {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr;
            gap: 40px;
            margin-bottom: 30px;
        }
        
        @media (max-width: 768px) {
            .footer-content {
                grid-template-columns: 1fr;
                gap: 40px;
                text-align: center;
            }
        }
        
        .footer-brand {
            max-width: 500px;
        }
        
        .footer-brand h3 {
            color: var(--gray-700);
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 0.3rem;
        }
        
        .footer-slogan {
            color: var(--gray-500);
            font-size: 0.85rem;
            font-style: italic;
            margin-bottom: 1rem;
        }
        
        .footer-description {
            line-height: 1.6;
            font-size: 0.85rem;
            color: var(--gray-500);
        }
        
        .footer-section h4 {
            color: var(--gray-700);
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .footer-links {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .footer-links li {
            margin-bottom: 0.5rem;
        }
        
        .footer-links a {
            color: var(--gray-500);
            text-decoration: none;
            font-size: 0.85rem;
            transition: color 0.2s ease;
        }
        
        .footer-links a:hover {
            color: var(--primary);
        }
        
        .footer-contact {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            color: var(--gray-500);
            text-decoration: none;
            font-size: 0.85rem;
            transition: color 0.2s ease;
        }
        
        .footer-contact:hover {
            color: var(--gray-700);
        }
        
        .footer-contact svg {
            width: 14px;
            height: 14px;
        }
        
        @media (max-width: 768px) {
            .footer-contact {
                justify-content: center;
            }
        }
        
        .footer-bottom {
            padding-top: 20px;
            border-top: 1px solid var(--gray-200);
            text-align: center;
            color: var(--gray-400);
            font-size: 0.8rem;
        }
        
        .footer-bottom p {
            margin: 0;
        }
        
        /* Common button styles */
        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: var(--radius-sm);
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        
        .btn-primary {
            background: var(--primary);
            color: white;
        }
        
        .btn-primary:hover:not(:disabled) {
            background: var(--primary-dark);
        }
        
        .btn-secondary {
            background: white;
            color: var(--gray-700);
            border: 1px solid var(--gray-300);
        }
        
        .btn-secondary:hover {
            background: var(--gray-50);
        }
        
        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        /* Forms */
        .form-group {
            margin-bottom: 1.5rem;
        }
        
        .form-label {
            display: block;
            font-weight: 600;
            color: var(--gray-700);
            margin-bottom: 0.5rem;
            font-size: 0.95rem;
        }
        
        .form-input {
            width: 100%;
            padding: 0.625rem 0.875rem;
            border: 1px solid var(--gray-300);
            border-radius: var(--radius-sm);
            font-size: 0.95rem;
            font-family: inherit;
            transition: border-color 0.2s ease;
            background: white;
        }
        
        .form-input:focus {
            outline: none;
            border-color: var(--primary);
        }
        
        .form-input.error {
            border-color: var(--danger);
        }
        
        /* Cards */
        .card {
            background: white;
            border-radius: var(--radius);
            border: 1px solid var(--gray-200);
            overflow: hidden;
            transition: all 0.2s ease;
        }
        
        .card:hover {
            box-shadow: var(--shadow-lg);
            transform: translateY(-2px);
        }
        
        .card-header {
            padding: 1.5rem;
            border-bottom: 1px solid var(--gray-200);
        }
        
        .card-body {
            padding: 1.5rem;
        }
        
        /* Mobile menu toggle */
        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--gray-700);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: var(--radius-sm);
            transition: all 0.2s ease;
        }
        
        .mobile-menu-toggle:hover {
            background: var(--gray-100);
            color: var(--primary);
        }
        
        /* Mobile menu overlay с повышенным z-index для предотвращения конфликтов */
        .mobile-menu-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 9998; /* Увеличен с 999 до 9998 для гарантии перекрытия всех элементов */
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }
        
        .mobile-menu-overlay.active {
            display: block;
            opacity: 1;
            pointer-events: auto;
        }
        
        /* Mobile menu с исправленным z-index и safe area для iOS */
        .mobile-menu {
            display: none;
            position: fixed;
            top: 0;
            right: -300px;
            width: 300px;
            /* Используем CSS функции для корректной высоты на всех устройствах */
            height: 100vh;
            height: 100dvh; /* Dynamic viewport height для мобильных браузеров */
            background: white;
            z-index: 9999; /* Максимальный z-index для гарантии отображения поверх всего */
            padding: 2rem 0;
            /* Добавляем безопасный отступ снизу для iOS устройств */
            padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
            box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
            transition: right 0.3s ease;
            overflow-y: auto;
            /* Улучшаем прокрутку на iOS */
            -webkit-overflow-scrolling: touch;
        }
        
        /* Fallback для старых браузеров без поддержки dvh */
        @supports not (height: 100dvh) {
            .mobile-menu {
                height: 100vh;
                /* Дополнительный отступ снизу для браузеров без поддержки safe-area-inset */
                padding-bottom: 3rem;
            }
        }
        
        .mobile-menu.active {
            right: 0;
        }
        
        .mobile-menu-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 2rem 2rem 2rem;
            border-bottom: 1px solid var(--gray-200);
            margin-bottom: 2rem;
        }
        
        .mobile-menu-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--gray-700);
            cursor: pointer;
            padding: 0.5rem;
            border-radius: var(--radius-sm);
            transition: all 0.2s ease;
        }
        
        .mobile-menu-close:hover {
            background: var(--gray-100);
            color: var(--primary);
        }
        
        .mobile-nav-links {
            list-style: none;
            padding: 0;
            margin: 0 2rem 2rem 2rem;
        }
        
        .mobile-nav-links li {
            margin-bottom: 0.5rem;
        }
        
        .mobile-nav-links a {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            color: var(--gray-700);
            text-decoration: none;
            font-weight: 500;
            border-radius: var(--radius-sm);
            transition: all 0.2s ease;
        }
        
        .mobile-nav-links a:hover {
            background: var(--gray-100);
            color: var(--primary);
        }
        
        .mobile-nav-links a i {
            width: 20px;
            text-align: center;
            color: var(--gray-500);
        }
        
        .mobile-nav-links a:hover i {
            color: var(--primary);
        }
        
        /* Секция авторизации с учетом safe area */
        .mobile-auth-section {
            padding: 2rem;
            /* Добавляем дополнительный отступ снизу для безопасной области */
            padding-bottom: calc(2rem + env(safe-area-inset-bottom, 20px));
            border-top: 1px solid var(--gray-200);
            margin-top: auto;
            /* Фиксируем секцию внизу меню */
            position: sticky;
            bottom: 0;
            background: white;
            /* Добавляем тень для визуального разделения при прокрутке */
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        }
        
        .mobile-user-info {
            margin-bottom: 1.5rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--gray-200);
        }
        
        .mobile-user-name {
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 0.25rem;
        }
        
        .mobile-user-email {
            font-size: 0.875rem;
            color: var(--gray-600);
        }
        
        .mobile-auth-actions {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .mobile-auth-actions .btn {
            width: 100%;
            justify-content: center;
        }
        
        /* Mobile styles */
        @media (max-width: 768px) {
            body { 
                padding-top: 60px; 
            }
            
            .navigation {
                height: 60px;
            }
            
            .nav-container { 
                padding: 1rem; 
            }
            
            .nav-links { 
                display: none; 
            }
            
            .auth-actions {
                display: none;
            }
            
            .mobile-menu-toggle {
                display: block;
            }
            
            /* Мобильное меню скрыто по умолчанию */
            .mobile-menu {
                display: none;
            }
            
            /* Мобильное меню показывается только при активном состоянии */
            .mobile-menu.active {
                display: flex;
                flex-direction: column;
            }
            
            .container { 
                padding: 1rem; 
            }
        }
        
        @media (max-width: 480px) {
            .mobile-menu {
                width: 280px;
                right: -280px;
            }
        }
