/* Основные стили сайта */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-color: #f8f9fa;
    padding-top: 76px; /* Высота фиксированной навигации */
}

/* Навигация */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.brand-text {
    background: linear-gradient(135deg, #fff, #a5d8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Герой секция */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
}

/* Статистика в герое */
.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 15px;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Карточка обновления */
.update-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.update-card h4 {
    color: white;
    margin-bottom: 15px;
}

.update-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

/* Секции */
.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 3px solid var(--secondary-color);
    display: inline-block;
}

/* Фильтры */
.filters-section {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Карточки продуктов */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    height: 100%;
    transition: var(--transition);
    border: 1px solid #e9ecef;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.product-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    min-height: 52px;
}

.price-badge {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

.density-badge {
    background: linear-gradient(135deg, var(--secondary-color), #3498db);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 15px 0;
}

.price-unit {
    font-size: 0.9rem;
    color: #666;
}

.product-date {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

.product-actions {
    margin-top: 20px;
}

/* Статусы */
.status-online {
    color: var(--success-color);
    font-weight: bold;
}

.status-offline {
    color: var(--accent-color);
    font-weight: bold;
}

/* Таблица */
#pricesTable {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

#pricesTable th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px;
}

#pricesTable td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* Графики */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 15px 20px;
}

/* Подвал */
.footer {
    background-color: var(--dark-bg);
    margin-top: 60px;
}

.footer-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: white;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.contact-info p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    body {
        padding-top: 66px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

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

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

/* Загрузка */
#loadingSpinner {
    display: block;
    width: 3rem;
    height: 3rem;
}

/* Прогресс бар */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.2);
}

.progress-bar {
    background-color: var(--warning-color);
    border-radius: 5px;
}

/* Уведомления */
.alert-custom {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

/* Кнопки */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-outline-primary {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

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

/* Иконки в карточках */
.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.icon-circle.bg-primary {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
}

.icon-circle.bg-success {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

/* Ховер эффекты */
.hover-shadow {
    transition: var(--transition);
}

.hover-shadow:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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