/* Новый современный дизайн - Neo Finance */
:root {
    /* Цветовая палитра по умолчанию */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #06b6d4;

    /* Фоны */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --bg-footer: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);

    /* Текст */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-light: #ffffff;

    /* Дополнительные цвета */
    --border-color: #475569;
    --shadow-color: rgba(0, 0, 0, 0.3);

    /* Эффекты */
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --border-radius-lg: 28px;

    --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.1);

    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--warning) 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, var(--info) 100%);

    --blur: blur(20px);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.2s ease;
}

/* Обновленные темы с новым дизайном */
body[data-theme="cyber"] {
    --primary: #00f5ff;
    --primary-light: #6efafd;
    --primary-dark: #00a8b5;
    --secondary: #ff2a6d;
    --accent: #ffcc00;
    --success: #05d9e8;
    --warning: #ff2a6d;
    --error: #ff2a6d;
    --info: #005678;

    --bg-primary: #05071c;
    --bg-secondary: #0a0f2d;
    --bg-card: #15193b;
    --bg-footer: #05071c;
    --bg-gradient: linear-gradient(135deg, #05071c 0%, #0a0f2d 50%, #15193b 100%);

    --text-primary: #ffffff;
    --text-secondary: #a1a8d0;
    --border-color: #2a2f5d;
}

body[data-theme="gradient-purple"] {
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #06b6d4;

    --bg-primary: #1e1b2e;
    --bg-secondary: #2d2b42;
    --bg-card: #3e3b5e;
    --bg-footer: #1e1b2e;
    --bg-gradient: linear-gradient(135deg, #1e1b2e 0%, #2d2b42 50%, #3e3b5e 100%);
}

body[data-theme="nordic"] {
    --primary: #5e81ac;
    --primary-light: #81a1c1;
    --primary-dark: #4c6a92;
    --secondary: #88c0d0;
    --accent: #bf616a;
    --success: #a3be8c;
    --warning: #ebcb8b;
    --error: #bf616a;
    --info: #b48ead;

    --bg-primary: #2e3440;
    --bg-secondary: #3b4252;
    --bg-card: #434c5e;
    --bg-footer: #2e3440;
    --bg-gradient: linear-gradient(135deg, #2e3440 0%, #3b4252 50%, #434c5e 100%);
}

/* Базовые стили нового дизайна */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    background-attachment: fixed;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Скрытые элементы */
.hidden {
    display: none !important;
}

/* Новый селектор тем - стеклянный морфизм */
.theme-selector-expanded {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-palette {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    display: none;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 15px;
    min-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.3s ease;
}

.theme-selector-expanded:hover .theme-palette {
    display: grid;
}

.theme-color {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.theme-color::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: 10px;
}

.theme-color:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.theme-color.active {
    border-color: var(--text-light);
    box-shadow: 0 0 0 3px var(--bg-secondary), 0 0 0 5px var(--primary);
}

.theme-toggle-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 14px 22px;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Модальное окно авторизации */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--error);
}

.modal-body {
    padding: 20px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.auth-tab.active {
    background: var(--primary);
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

/* Панель пользователя */
.user-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.user-details {
    display: flex;
    flex-direction: column;
}

.user-email {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-status {
    font-size: 0.7rem;
    color: var(--success);
}

.logout-btn {
    background: rgba(249, 65, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(249, 65, 68, 0.3);
}

.logout-btn:hover {
    background: var(--error);
    color: white;
}

/* Новый хедер - стеклянный морфизм */
.header {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius-lg);
    padding: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1vw;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: var(--transition);
}

.logo:hover::before {
    transform: rotate(45deg) translate(50%, 50%);
}

.logo-section h1 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Новые элементы управления */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--gradient-accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Новая статистика в хедере */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.period-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: var(--blur);
    padding: 10px;
    border-radius: var(--border-radius);
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    flex: 1;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
}



.stat-card.highlight::after {
    opacity: 1;
}



.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(10deg);
}

.stat-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Новый дропдаун */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 18px 24px;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    transition: var(--transition);
    min-width: 240px;
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
    justify-content: center;
}

.dropdown-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: var(--blur);
    width: 350px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.3s ease;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header h4 {
    color: var(--text-primary);
    font-size: 1rem;
}

.dropdown-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 3px 8px;
    border-radius: 20px;
}

.dropdown-item {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

.item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-info i {
    font-size: 1.2rem;
    color: var(--primary);
}

.item-name {
    font-weight: 600;
    color: var(--text-primary);
}

.item-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.item-price {
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-light);
}

/* Основной контент - новая сетка */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 50px;
}

/* Новые карточки - стеклянный морфизм */
.card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius-lg);
    padding: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.card-header h2, .card-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Секция сканера */
.scanner-section {
    display: flex;
}

.scanner-main {
    display: flex;
    justify-content: space-around;
    padding: 10px;
}

/* Левый блок сканера */
.scanner-left .card {
    background: rgba(30, 41, 59, 0.8) !important;
}

.scanner-left .card-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.scanner-left .card-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Действия сканера */
.scanner-actions {
    display: flex;
    gap: 12px;
}

.scanner-actions .icon-btn {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: var(--blur);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    position: relative;
}

.scanner-actions .icon-btn:hover {
    background: var(--primary);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    border-color: var(--primary);
}

.scanner-actions .icon-btn:active {
    transform: translateY(-1px) scale(1.05);
}

/* Сообщение об ошибке камеры */
#camera-error {
    margin: 20px 0;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: rgba(239, 68, 68, 0.1);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    border-left: 6px solid var(--error);
    transition: var(--transition);
}

.error-message:hover {
    background: rgba(239, 68, 68, 0.15);
    transform: translateY(-2px);
}

.error-message i {
    color: var(--error);
    font-size: 2.5rem;
    flex-shrink: 0;
}

.error-message div h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.error-message div p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

/* Контейнер камеры */
.camera-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow:
        0 0 40px rgba(99, 102, 241, 0.3),
        inset 0 0 40px rgba(99, 102, 241, 0.1);
    background: var(--bg-secondary);
    margin: 20px 0;
    transition: var(--transition);
}

.camera-container:hover {
    border-color: var(--primary-light);
    box-shadow:
        0 0 60px rgba(99, 102, 241, 0.4),
        inset 0 0 50px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.scanner-frame {
    position: relative;
    width: 100%;
    height: 320px;
    background: #000;
}

#qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Оверлей сканера */
.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.9) 0%,
        rgba(30, 41, 59, 0.8) 50%,
        rgba(51, 65, 85, 0.7) 100%
    ); */
    color: white;
    /* backdrop-filter: blur(2px); */
}

.scan-animation {
    width: 280px;
    height: 4px;
    background: var(--gradient-primary);
    box-shadow:
        0 0 20px var(--primary),
        0 0 40px rgba(99, 102, 241, 0.5);
    margin-bottom: 25px;
    animation: scan 2s infinite cubic-bezier(0.65, 0, 0.35, 1);
    border-radius: 2px;
    position: relative;
}

@keyframes scan {
    0% {
        transform: translateY(-140px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(140px);
        opacity: 0;
    }
}

.scan-text {
    text-align: center;
    padding: 20px;
}

.scan-text i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.scan-text p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Статистика сканера */
.scanner-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

.scanner-stats .stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 5px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.scanner-stats .stat:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.scanner-stats .stat i {
    font-size: 1rem;
    color: var(--primary);
    width: 30px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    transition: var(--transition);
}

.scanner-stats .stat:hover i {
    transform: scale(1.1) rotate(5deg);
    background: rgba(99, 102, 241, 0.2);
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Загрузка файла */
.file-upload {
    margin: 20px 0;
    text-align: center;
}

.upload-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 16px 28px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow);
    border: none;
    position: relative;
    overflow: hidden;
}

.upload-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: var(--transition);
}

.upload-btn:hover::before {
    left: 100%;
}

.upload-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Группа ввода URL */
.input-group {
    position: relative;
    margin: 20px 0;
    display: none;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 2;
    font-size: 1.1rem;
}

#manual-url {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: var(--blur);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

#manual-url:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

#manual-url::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

#manual-url:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.09);
}

/* Группа кнопок */
.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
    display: none;
}

.button-group .btn {
    padding: 16px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.button-group .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.button-group .btn:hover::before {
    left: 100%;
}

.button-group .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.button-group .btn-success:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.button-group .btn-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-secondary);
}

/* Результат сканирования */
#result {
    margin: 20px 0;
    padding: 0;
}

.result.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    border-left: 6px solid var(--success);
    color: var(--success);
    padding: 20px;
    border-radius: var(--border-radius);
}

.result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    border-left: 6px solid var(--error);
    color: var(--error);
    padding: 20px;
    border-radius: var(--border-radius);
}

/* Секция товаров */
#items-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

#items-section .card-header {
    margin-bottom: 20px;
}

#items-section .card-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.items-count {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Список товаров */
.items-list {
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.items-list::-webkit-scrollbar {
    width: 6px;
}

.items-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.items-list::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 3px;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
}

.item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-bottom-color: transparent;
}

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

.item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 1rem;
}

.item-price {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Массовые действия */
.bulk-actions {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.select-wrapper {
    position: relative;
}

.category-select {
    width: 30%;
    padding: 15px 5px 15px 5px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    font-size: 0.95rem;
    appearance: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.category-select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 0.8rem;
}

.bulk-actions .btn {
    padding: 14px 20px;
    font-weight: 600;
    transition: var(--transition);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Правый блок - ручной ввод */
.scanner-right .card {
    background: rgba(30, 41, 59, 0.8) !important;
}

.manual-add-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.field label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.field label::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.field input {
    width: 100%;
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: var(--blur);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.field input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.field input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.field input:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

/* Стили для списка товаров */
.items-list-manual {
    margin-top: 10px;
}

.items-list-manual h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.items-list-manual h4::before {
    content: '';
    width: 6px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

#manual-items-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Строка товара */
.manual-item-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 20px;
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    align-self: center;
}

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

.manual-item-row:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
}

.manual-item-row input {
    padding: 12px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
}

.manual-item-row input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.manual-item-row input::placeholder {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Специфические стили для полей в строке */
.mi-name {
    grid-column: 1;
}

.mi-qty {
    grid-column: 2;
    text-align: center;
}

.mi-price {
    grid-column: 3;
    text-align: center;
}

.mi-category {
    grid-column: 4;
}

.mi-remove {
    grid-column: 5;
    white-space: nowrap;
}

/* Кнопка удаления */
.mi-remove {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mi-remove:hover {
    background: var(--error);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.mi-remove:active {
    transform: scale(0.95);
}

/* Кнопка добавления товара */
#manual-add-row {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    font-weight: 600;
}

#manual-add-row:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Блок общей суммы */
.total-amount-display {
    margin: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.total-amount-display.valid {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.total-amount-display.invalid {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.total-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.total-info strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.items-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: auto;
}

.total-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--warning);
    font-weight: 500;
}

.total-amount-display.valid .total-warning {
    color: var(--success);
}

/* Действия формы */
.manual-actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#manual-save {
    flex: 2;
    background: var(--gradient-primary);
    font-weight: 700;
    font-size: 1rem;
    justify-content: center;
}

#manual-save:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

#manual-clear {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    justify-content: center;
}

#manual-clear:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Секция графиков */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.categories-chart {
    margin-top: 20px;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
}

.chart-bar:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chart-bar-label {
    width: 140px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-bar-label i {
    color: var(--primary);
    font-size: 1.2rem;
}

.chart-bar-track {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin: 0 40px;
    height: 28px;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 12px;
    position: relative;
}

.chart-bar-fill::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: shimmer 2s infinite;
}

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

.chart-bar-value {
    width: 100px;
    text-align: right;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Селектор периода */
.period-selector {
    display: flex;
    gap: 5px;
    background: var(--bg-secondary);
    padding: 5px;
    border-radius: var(--border-radius-sm);
}

.period-btn {
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
}

.period-btn.active {
    background: var(--primary);
    color: white;
}

/* График трендов */
.trend-chart {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trend-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.trend-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
    color: var(--primary);
}

/* Загрузка */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
}

.spinner {
    border: 4px solid var(--bg-secondary);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Новый футер */
.footer {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: var(--blur);
    color: var(--text-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 10px 20px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition);
    padding: 8px 0;
}

.footer-section a:hover {
    color: var(--primary);
    transform: translateX(10px);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-bottom {
    padding: 5px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.card {
    animation: fadeInUp 0.6s ease forwards;
}

.logo {
    animation: float 3s ease-in-out infinite;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .scanner-main,
    .charts-section,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .stats-header {
        flex-direction: column;
    }

    .period-stats {
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    .scanner-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .button-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .bulk-actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .manual-item-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .manual-item-row input {
        width: 100%;
    }

    .mi-remove {
        grid-column: 1;
        width: 100%;
        margin-top: 5px;
    }

    .manual-actions {
        flex-direction: column;
    }
}

@media (max-width: 500px) {
    .container {
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .logo-section {
        justify-content: center;
    }

    .theme-palette {
        grid-template-columns: repeat(3, 1fr);
        min-width: 250px;
    }

    .stat-card {
        min-width: 3%;
    }

    .card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .scanner-actions {
        gap: 8px;
    }

    .scanner-actions .icon-btn {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .scanner-frame {
        height: 250px;
    }

    .scan-animation {
        width: 200px;
    }

    .scan-text i {
        font-size: 2.5rem;
    }

    .scan-text p {
        font-size: 1rem;
    }

    .error-message {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }

    .upload-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .manual-add-body {
        gap: 20px;
    }

    .field input {
        padding: 14px 16px;
    }

    .manual-item-row {
        padding: 14px;
    }

    .manual-actions {
        gap: 12px;
    }

    .total-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .items-count {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .scanner-left .card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .scanner-actions {
        justify-content: center;
    }

    .scanner-frame {
        height: 200px;
    }

    .scanner-stats .stat {
        padding: 15px;
        gap: 12px;
    }

    .scanner-stats .stat i {
        font-size: 1.8rem;
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .manual-add-body {
        gap: 16px;
    }

    .manual-item-row {
        padding: 12px;
        gap: 10px;
    }

    .manual-item-row input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .manual-actions {
        gap: 10px;
    }
}

/* Специальные эффекты для тем */
[data-theme="cyber"] .card:hover {
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.4);
    border-color: rgba(0, 245, 255, 0.3);
}

[data-theme="gradient-purple"] .stat-card:hover {
    transform: translateY(-8px) scale(1.02) rotate(1deg);
}

[data-theme="nordic"] .btn:hover {
    transform: translateY(-3px) scale(1.05);
}

[data-theme="cyber"] .camera-container {
    border-color: #00f5ff;
    box-shadow:
        0 0 50px rgba(0, 245, 255, 0.4),
        inset 0 0 40px rgba(0, 245, 255, 0.15);
}

[data-theme="cyber"] .scan-animation {
    background: linear-gradient(135deg, #00f5ff 0%, #ff2a6d 100%);
    box-shadow:
        0 0 25px #00f5ff,
        0 0 50px rgba(0, 245, 255, 0.6);
}

[data-theme="gradient-purple"] .scanner-stats .stat:hover {
    border-color: #8b5cf6;
}

[data-theme="nordic"] .upload-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(94, 129, 172, 0.4);
}

[data-theme="cyber"] .manual-item-row:hover {
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
    border-color: rgba(0, 245, 255, 0.4);
}

[data-theme="gradient-purple"] .field label::before {
    background: var(--gradient-primary);
}

[data-theme="nordic"] .manual-item-row input:focus {
    box-shadow: 0 0 0 3px rgba(94, 129, 172, 0.2);
}

[data-theme="cyber"] .mi-remove:hover {
    background: #ff2a6d;
    box-shadow: 0 4px 15px rgba(255, 42, 109, 0.4);
}

/* Улучшенный скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

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

/* Стили для скроллбара контейнера товаров */
#manual-items-container::-webkit-scrollbar {
    width: 6px;
}

#manual-items-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

#manual-items-container::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 3px;
}

/* Микро-интеракции */
.stat-card, .btn, .card {
    cursor: pointer;
}

/* .stat-card:active, .btn:active {
    transform: scale(0.98);
} */

/* Текстурные overlay */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: var(--border-radius-lg);
}

/* Анимации появления */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#items-section:not(.hidden) {
    animation: fadeInScale 0.5s ease-out;
}

/* Индикатор активности камеры */
.camera-container.active::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Состояние загрузки */
#loading:not(.hidden) ~ .scanner-left .camera-container {
    opacity: 0.7;
    filter: blur(2px);
    pointer-events: none;
}

/* Стили для состояний полей ввода */
.manual-item-row input:invalid {
    border-color: rgba(239, 68, 68, 0.5);
}

.manual-item-row input:valid {
    border-color: rgba(16, 185, 129, 0.5);
}

.mi-price:focus:valid {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.mi-price:focus:invalid {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Анимация появления новой строки */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Улучшенные плейсхолдеры */
.mi-name::placeholder { color: var(--text-secondary); opacity: 0.8; }
.mi-qty::placeholder { color: var(--text-secondary); opacity: 0.8; }
.mi-price::placeholder { color: var(--text-secondary); opacity: 0.8; }
.mi-category::placeholder { color: var(--text-secondary); opacity: 0.8; }

/* Эффект при фокусе на всей строке */
.manual-item-row:focus-within {
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.1);
}

.scanner-left {
    width: 40%;
}

.scanner-right {
    width: auto;
}

/* Flex стили для items-list-manual */
.items-list-manual {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.items-list-manual h4 {
    color: var(--text-primary);
    margin-bottom: 0;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.items-list-manual h4::before {
    content: '';
    width: 6px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

#manual-items-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 0;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

#manual-add-row {
    width: 100%;
    justify-content: center;
    margin-top: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 12px 20px;
}

#manual-add-row:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Flex стили для manual-actions */
.manual-actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#manual-save {
    flex: 2;
    background: var(--gradient-primary);
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 20px;
}

#manual-save:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

#manual-clear {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 14px 20px;
}

#manual-clear:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 500px) {
    .manual-actions {
        flex-direction: column;
        gap: 12px;
    }

    #manual-save,
    #manual-clear {
        flex: none;
        width: 100%;
    }

    .items-list-manual {
        gap: 12px;
    }

    #manual-items-container {
        max-height: 450px;
    }
}

@media (max-width: 480px) {
    .manual-actions {
        gap: 10px;
    }

    .items-list-manual h4 {
        font-size: 1.1rem;
    }
}

/* Flex стили для строк товаров */
.manual-item-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 20px;
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.manual-item-row:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-sm);
}

.manual-item-row input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    min-width: 0; /* Важно для правильного сжатия flex-элементов */
}

/* Специфические пропорции для полей */
.mi-name {
    flex: 3;
}

.mi-qty {
    flex: 1;
    max-width: 80px;
    text-align: center;
}

.mi-price {
    flex: 1;
    max-width: 100px;
    text-align: center;
}

.mi-category {
    flex: 2;
}

.mi-remove {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Адаптивность для строк товаров */
@media (max-width: 1024px) {
    .manual-item-row {
        flex-wrap: wrap;
    }

    .manual-item-row input {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }

    .mi-remove {
        flex: 1 1 100%;
        margin-top: 8px;
    }
}

@media (max-width: 500px) {
    .manual-item-row {
        gap: 10px;
        padding: 16px;
    }

    .manual-item-row input {
        flex: 1 1 100%;
    }

    .mi-qty,
    .mi-price {
        flex: 1 1 calc(50% - 5px);
        max-width: none;
    }

    .manual-item-row {
        width: 100%;
        display: flex;
        justify-content: center;
        text-align-last: center;
    }
}

@media (max-width: 480px) {
    .manual-item-row {
        padding: 12px;
        gap: 8px;
    }

    .manual-item-row input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}


/* Улучшенный хедер */
.header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius-lg);
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}


/* Основная навигация */
.main-nav {
    flex: 1;
    max-width: 80%;
}

.nav-links {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: var(--blur);
    padding: 8px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 5px;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: var(--transition);
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-light);
}

.nav-link i {
    font-size: 1.1rem;
    transition: var(--transition);
}

.nav-link:hover i {
    transform: scale(1.2);
}

.nav-link.active i {
    transform: scale(1.2);
}

/* Улучшенные контролы хедера */
.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Уведомления и быстрые действия */
.notification-dropdown .dropdown-content,
.quick-actions-dropdown .dropdown-content {
    width: 320px;
}

.quick-action-item {
    padding: 0;
}

.quick-action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.quick-action-btn i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

/* Статистика в хедере */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.period-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: var(--blur);
    padding: 5px 15px;
    border-radius: var(--border-radius);
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 15px;
    /* transition: var(--transition); */
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    flex: 1;
}



.stat-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-change {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--error);
}

/* Действия хедера */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#quick-add-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

#quick-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Анимации для навигации */
@keyframes navPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.nav-link:active {
    animation: navPulse 0.3s ease;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .header-content {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
    }

    .nav-links {
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .header {
        padding: 15px;
    }

    .header-content {
        gap: 20px;
        margin-bottom: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 4px;
    }

    .nav-link {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        font-size: 0.8rem;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: var(--blur);
        padding: 5px 5px;
        border-radius: var(--border-radius);
        height: 17vw;
    }

    .stats-header {
        flex-direction: column;
        align-items: stretch;
    }

    .period-stats {
        justify-content: center;
    }

    .stat-card {
        min-width: 40%;
        text-align: center;
        padding: 5px 0px;
    }

    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-controls {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-controls {
        gap: 8px;
    }

    .nav-link {
        min-width: 120px;
        padding: 8px 12px;
        background: var(--gradient-primary);
    }

    .nav-link i {
        font-size: 1rem;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .header-actions .dropdown,
    #quick-add-btn {
        width: 100%;
    }

    #auth-btn {
        background: var(--gradient-primary);
    }
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Скрыть на мобильных устройствах */
@media (max-width: 500px) {
    .stat-icon {
        display: none;
    }
}

/* Специальные эффекты для тем */
[data-theme="cyber"] .nav-link.active {
    background: linear-gradient(135deg, #00f5ff 0%, #ff2a6d 100%);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

[data-theme="gradient-purple"] .nav-link:hover {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
}



/* Индикатор активной секции */
.nav-link.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
}

@keyframes ripple {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* Плавные переходы между секциями */
.main-content section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.main-content section.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.main-content section:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* Стили для блока последних покупок */
.recent-purchases-dropdown {
    position: relative;
}

.recent-purchases-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.9rem;
}

.recent-purchases-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.purchases-badge {
    background: var(--gradient-accent);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

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

.recent-purchases-content {
    width: 380px;
    max-height: 500px;
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

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

.recent-purchases-dropdown:hover .recent-purchases-content {
    display: block;
}

/* Заголовок dropdown */
.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.header-title h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.purchases-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.total-amount {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.dropdown-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 10px;
}

.header-actions-mini {
    display: flex;
    gap: 8px;
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-icon-sm:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Фильтры */
.purchases-filter {
    padding: 15px 20px 0;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    padding: 4px;
}

.filter-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-tab.active {
    background: var(--primary);
    color: white;
}

.filter-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Список покупок */
.purchases-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.purchases-list::-webkit-scrollbar {
    width: 4px;
}

.purchases-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.purchases-list::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 2px;
}

.purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    animation: slideInRight 0.3s ease;
}

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

.purchase-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.purchase-item.highlight {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary);
}

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

.purchase-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.purchase-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    transition: var(--transition);
}

.purchase-item:hover .purchase-icon {
    transform: scale(1.1);
    background: rgba(99, 102, 241, 0.2);
}

.purchase-info {
    flex: 1;
}

.purchase-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.purchase-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.purchase-category,
.purchase-date,
.purchase-location {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.purchase-category::before {
    content: '•';
    color: var(--primary);
}

.purchase-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.purchase-price {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    min-width: 60px;
    text-align: right;
}

.purchase-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}

.purchase-item:hover .purchase-actions {
    opacity: 1;
}

.btn-icon-xs {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.7rem;
}

.btn-icon-xs:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Футер dropdown */
.dropdown-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.btn-outline-sm {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-outline-sm:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.view-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-light);
    transform: translateX(3px);
}

/* Адаптивность */
@media (max-width: 500px) {
    .recent-purchases-content {
        width: 320px;
        right: -50px;
    }

    .purchase-item {
        padding: 10px 15px;
    }

    .purchase-meta {
        flex-direction: column;
        gap: 2px;
    }

    .footer-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-outline-sm,
    .view-all {
        width: 100%;
        justify-content: center;
    }

    .scanner-main {
        flex-direction: column;
    }

    .scanner-left {
        width: 100%;
        margin-bottom: 4vw;
    }

    .user-panel {
        display: flex;
        flex-direction: row;
        width: 100%;
        padding: 2px;
        gap: 3px;
    }
}

@media (max-width: 480px) {
    .recent-purchases-content {
        width: 280px;
        right: -80px;
    }

    .dropdown-header {
        padding: 15px;
    }

    .header-title {
        flex-direction: column;
        gap: 10px;
    }

    .purchases-stats {
        align-items: flex-start;
    }

    .purchase-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .purchase-details {
        width: 100%;
        justify-content: space-between;
    }
}

/* Стили для разных категорий */
.purchase-item[data-category="food"] .purchase-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.purchase-item[data-category="transport"] .purchase-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.purchase-item[data-category="groceries"] .purchase-icon {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.purchase-item[data-category="entertainment"] .purchase-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Анимации появления элементов с задержкой */
.purchase-item:nth-child(1) { animation-delay: 0.1s; }
.purchase-item:nth-child(2) { animation-delay: 0.2s; }
.purchase-item:nth-child(3) { animation-delay: 0.3s; }
.purchase-item:nth-child(4) { animation-delay: 0.4s; }


/* Стили для навигационного dropdown с последними покупками */
.nav-dropdown {
    position: relative;
    align-content: center;
    width: 20%;
}

.nav-dropdown .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 7vw;
}

.nav-badge {
    background: var(--gradient-accent);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
    animation: pulse 2s infinite;
}

.nav-arrow {
    font-size: 0.8rem;
    transition: var(--transition);
    margin-left: auto;
}

.nav-dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-content {
    display: none;
    /* position: absolute; */
    top: 100%;
    left: 0;
    width: 320px;
    background: rgb(30 41 59);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.nav-dropdown-header h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.nav-purchases-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.nav-total-amount {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.nav-items-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 1px 6px;
    border-radius: 8px;
}

.nav-purchases-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.nav-purchases-list::-webkit-scrollbar {
    width: 3px;
}

.nav-purchases-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.nav-purchases-list::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 2px;
}

.nav-purchase-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    animation: slideInRight 0.3s ease;
}

.nav-purchase-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

.nav-purchase-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.nav-purchase-info {
    flex: 1;
    min-width: 0;
}

.nav-purchase-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-purchase-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-purchase-category,
.nav-purchase-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.nav-purchase-category::before {
    content: '•';
    color: var(--primary);
    margin-right: 4px;
}

.nav-purchase-price {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.nav-dropdown-footer {
    padding: 10px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-view-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    justify-content: center;
    width: 100%;
    padding: 8px;
    border-radius: var(--border-radius-sm);
}

.nav-view-all:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

/* Стили для разных категорий в навигации */
.nav-purchase-item[data-category="food"] .nav-purchase-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.nav-purchase-item[data-category="transport"] .nav-purchase-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.nav-purchase-item[data-category="groceries"] .nav-purchase-icon {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

/* static/css/style.css - добавим стили */
.barcode-controls {
    display: flex;
    gap: 5px;
    grid-column: 1 / -1;
}

.barcode-controls .mi-barcode {
    flex: 1;
    min-width: 120px;
}

.barcode-scan-btn,
.barcode-lookup-btn {
    padding: 8px 12px;
    white-space: nowrap;
}

.barcode-modal .modal-content {
    max-width: 500px;
}

.scan-frame {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

#barcode-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.scan-guide {
    width: 200px;
    height: 100px;
    border: 2px solid #00ff00;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.scan-instructions {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.barcode-message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Адаптация сетки для мобильных устройств */
@media (max-width: 500px) {
    .barcode-controls {
        flex-direction: column;
    }

    .barcode-controls .mi-barcode {
        min-width: auto;
    }
}

@keyframes scanLine {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

@keyframes scanLine {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

.close-scan:hover {
    background: #f0f0f0;
}

.stop-scan:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.wh {
    width: 100%;
}

.btn {
    border-radius: 15px;
}

.warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    color: #856404;
}

.warning h3 {
    margin-top: 0;
    color: #856404;
}

/* Добавьте в style.css */
.user-badges {
    display: flex;
    gap: 4px;
    margin: 2px 0;
}

.user-role-badge,
.user-subscription-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Стили для ролей */
.user-role-badge[data-role="user"] {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.user-role-badge[data-role="editor"] {
    background: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.user-role-badge[data-role="moderator"] {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

.user-role-badge[data-role="admin"] {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd9;
}

/* Стили для подписок */
.user-subscription-badge[data-subscription="free"] {
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
}

.user-subscription-badge[data-subscription="basic"] {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.user-subscription-badge[data-subscription="premium"] {
    background: #fff8e1;
    color: #ff8f00;
    border: 1px solid #ffecb3;
}

.user-subscription-badge[data-subscription="vip"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid #5a6fd8;
}

.user-subscription-badge[data-subscription="enterprise"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: 1px solid #e668fa;
}

/* Адаптивность для мобильных */
@media (max-width: 500px) {
    .user-badges {
        flex-direction: column;
        gap: 2px;
    }

    .user-role-badge,
    .user-subscription-badge {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
}

/* Добавьте в style.css для tooltip */
.user-role-badge,
.user-subscription-badge {
    position: relative;
    cursor: help;
}

.user-role-badge:hover::after,
.user-subscription-badge:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.user-role-badge:hover::before,
.user-subscription-badge:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    margin-bottom: -5px;
}


.nav-dropdown {
    position: relative;
    align-content: center;
    width: 20%;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 400px; /* Увеличил ширину для лучшего отображения */
    max-height: 500px; /* Ограничиваем высоту */
    overflow-y: auto; /* Добавляем прокрутку если нужно */
    background: rgb(30 41 59);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    z-index: 9999; /* ✅ УВЕЛИЧЬТЕ z-index */
    animation: slideDown 0.3s ease;
}

/* Показываем dropdown при наведении */
.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

/* Убедитесь, что header имеет правильный z-index */
.header {
    position: relative;
    z-index: 100; /* header должен быть ниже dropdown */
}

/* Убедитесь, что другие элементы не перекрывают dropdown */
.main-content {
    position: relative;
    z-index: 1;
}

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

/* Стили для контента внутри dropdown */
.nav-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-dropdown-header h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-purchases-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-total-amount {
    font-weight: 700;
    color: #10b981; /* Зеленый цвет для суммы */
    font-size: 1.1rem;
}

.nav-items-count {
    color: #94a3b8;
    font-size: 0.9rem;
}

.nav-purchases-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 8px 0;
}

.nav-purchase-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease;
}

.nav-purchase-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

.nav-purchase-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-right: 12px;
    flex-shrink: 0;
}

.nav-purchase-icon i {
    font-size: 1rem;
    color: #cbd5e1;
}

.nav-purchase-info {
    flex: 1;
    min-width: 0;
}

.nav-purchase-name {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-purchase-meta {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.nav-purchase-category {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.nav-purchase-price {
    font-weight: 600;
    font-size: 0.875rem;
    color: #10b981;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Стили для скроллбара */
.nav-purchases-list::-webkit-scrollbar {
    width: 6px;
}

.nav-purchases-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.nav-purchases-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.nav-purchases-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.nav-dropdown-content {
    display: none;
    position: fixed; /* Используем fixed вместо absolute */
    top: 120px; /* Отступ от верха страницы */
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    max-height: 500px;
    overflow-y: auto;
    background: rgb(30 41 59);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
    animation: slideDown 0.3s ease;
}

/* Временные стили для отладки */
.nav-dropdown-content {
    border: 2px solid red !important; /* Красная рамка для видимости */
    background: rgba(30, 41, 59, 0.95) !important; /* Полупрозрачный фон */
}

/* Сброс потенциально конфликтующих стилей */
* {
    box-sizing: border-box;
}

/* Убедитесь, что body не имеет overflow: hidden */
body {
    overflow-x: hidden;
}

/* Убедитесь, что контейнеры не обрезают контент */
.container {
    position: relative;
    overflow: visible;
}

/* Основная навигация - должен быть выше всех */
.main-nav {
    position: relative;
    z-index: 1000; /* ✅ Увеличиваем z-index навигации */
}

.nav-dropdown {
    position: relative;
    align-content: center;
    width: 20%;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 400px;
    max-height: 500px;
    overflow-y: auto;
    background: rgb(30 41 59);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    z-index: 10000; /* ✅ УВЕЛИЧИВАЕМ до 10000 */
    animation: slideDown 0.3s ease;
}

/* Stats header - должен быть ниже навигации */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 100; /* ✅ УМЕНЬШАЕМ z-index */
}

/* Header контейнер */
.header {
    position: relative;
    z-index: 1000; /* header должен быть выше stats */
}

.header-content {
    position: relative;
    z-index: 1001; /* контент header выше */
}


.header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius-lg);
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    /* Убираем overflow: hidden чтобы выпадающее меню могло выходить за границы */
    overflow: visible;
}

.header-content {
    position: relative;
    z-index: 1001; /* Повышаем z-index для контента хедера */
}

/* Стили для выпадающего меню */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 400px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: var(--blur);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1002; /* Высокий z-index чтобы было поверх всего */
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Убедитесь что stats-header имеет правильный z-index */
.stats-header {
    position: relative;
    z-index: 1000;
}

/* Дополнительные стили для лучшего отображения */
.nav-dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(30, 41, 59, 0.95);
}

.main-nav {
    position: relative;
    z-index: 1002;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.dropdown-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 400px;
    max-height: 500px;
    overflow-y: auto;
    background: rgb(30 41 59);
    backdrop-filter: var(--blur);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    z-index: 10000;
    animation: slideDown 0.3s ease;
}

.nav-dropdown-content.show {
    display: block;
}

.logo-text {
    width: 7vw;
}

.color-city {
    color: #ff6969;
}

.color-city-ads {
    color: #ee5fff;
}

.color-best-price {
    color: #69ff71;
}

.color-end-price {
    color: #6a69ff;
}

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

/* Для мобильных устройств */
@media (max-width: 500px) {
    .nav-dropdown-content {
        width: 90vw;
        left: 50%;
        transform: translateX(-50%);
        position: fixed;
    }

    .nav-dropdown-content.show {
        animation: slideDownMobile 0.3s ease;
    }
}

@keyframes slideDownMobile {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}



/* Адаптивность для навигационного dropdown */
@media (max-width: 500px) {
    .nav-dropdown-content {
        width: 82vw;
        left: -50px;
        margin-left: 0vw;
        position: sticky;
    }

    .nav-purchase-item {
        padding: 8px 12px;
    }

    .nav-purchase-meta {
        flex-direction: column;
        gap: 2px;
    }

    .chart-bar {
        transition: none;
    }

    .chart-bar-label {
        font-size: 3vw;
    }

    .user-info {
        flex-direction: row;
        gap: 20px;
    }

    .nav-dropdown {
        width: 47%;
        justify-items: center;
    }

    .btn-icon {
        width: 100%;
        transition: none;
    }

    .stat-amount {
        font-size: 1.5rem;
    }

    .fad {
        display: none;
    }

    .fa-shopping-bag {
        display: none;
    }

    .nav-purchase-icon {
        display: none;
    }

    .nav-dropdown-content {
        width: 90vw;
        /* Центрируем относительно экрана */
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        margin-left: 0;
        position: fixed; /* Используем fixed для лучшего позиционирования на мобильных */
    }

    .nav-dropdown:hover .nav-dropdown-content,
    .nav-dropdown-content[style*="display: block"] {
        transform: translateX(-50%) translateY(0);
    }

    .nav-dropdown-content {
        margin-top: -43vw;
    }

    .logo-text {
        width: auto;
    }

    .nav-dropdown .nav-link {
        width: auto;
    }

    .nav-dropdown-content {
        width: 91vw;
    }

    .color-city {
        color: white;
        background: #cb00e3;
    }

    .color-city-ads {
        color: white;
        background: #ee5fff;
    }

    .color-best-price {
        color: white;
        background: #00be0a;
    }

    .color-end-price {
        color: white;
        background: #6a69ff;
    }
}

@media (max-width: 480px) {
    .nav-dropdown-content {
        width: 91vw;
        left: -80px;
    }

    .nav-dropdown-header {
        flex-direction: column;
        gap: 8px;
    }

    .nav-purchases-stats {
        align-items: flex-start;
    }

    .nav-dropdown-content {
        width: 91vw;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Language Selector */
.language-selector {
    /* position: fixed; */
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-selector select {
    padding: 13px 3px;
    border: 1px solid #004a93;
    color: white;
    border-radius: 20px;
    background: #0081ff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .language-selector {
        top: 10px;
        right: 10px;
    }

    .language-selector select {
        padding: 12px 5px;
        font-size: 12px;
    }

    .user-avatar {
        display: none;
    }

    .nav-link {
        height: 12vw;
    }
}
