:root {
    /* Основные цвета бренда */
    --color-red: #E53935;
    --color-orange: #FF8C00;
    --gradient-primary: linear-gradient(135deg, #E53935, #FF8C00);
    --gradient-hover: linear-gradient(135deg, #FF8C00, #E53935);

    /* Дополнительные цвета */
    --color-red-light: #FFEBEE;
    --color-orange-light: #FFF3E0;
    --color-red-soft: rgba(229, 57, 53, 0.08);
    --color-orange-soft: rgba(255, 140, 0, 0.08);

    /* Нейтральные цвета */
    --color-white: #FFFFFF;
    --color-light: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-600: #4B5563;
    --color-gray-800: #1F2937;

    /* Тени */
    --shadow-sm: 0 2px 8px rgba(229, 57, 53, 0.08);
    --shadow-md: 0 4px 16px rgba(229, 57, 53, 0.12);
    --shadow-lg: 0 8px 32px rgba(229, 57, 53, 0.15);

    /* Скругления */
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Шрифты */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Базовые стили */
body {
    background-color: var(--color-light);
    color: var(--color-gray-800);
    font-family: var(--font-body);
    line-height: 1.7;
    padding-top: 80px;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-gray-800);
    margin-top: 0;
}

/* Навигация */
.navbar {
    background-color: var(--color-white);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-gray-200);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-square {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
}

.logo-square img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.6rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--color-gray-600);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-link {
    color: var(--color-gray-600) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 3px;
    font-family: var(--font-heading);
    text-decoration: none;
}

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

/* Кнопки */
.btn-gradient {
    background: var(--gradient-primary);
    border: none;
    color: var(--color-white);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
    display: inline-block;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-hover);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn-gradient:hover::before {
    left: 0;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-white);
}

.btn-outline-accent {
    border: 2px solid var(--color-red);
    background: transparent;
    color: var(--color-red);
    font-weight: 600;
    padding: 10px 26px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-red);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn-outline-accent:hover::before {
    left: 0;
}

.btn-outline-accent:hover {
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Боковое меню ЛК */
.sidebar {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-header {
    border-bottom: 2px solid var(--color-gray-200);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--color-white);
    font-size: 1.5rem;
    font-weight: bold;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.user-status {
    font-size: 0.85rem;
    color: var(--color-gray-600);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-red-light);
    color: var(--color-red);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 5px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--color-gray-600);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-menu a:hover {
    background: var(--color-red-soft);
    color: var(--color-red);
    transform: translateX(5px);
}

.sidebar-menu a.active {
    background: var(--gradient-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.sidebar-menu i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
}

/* Статистические блоки */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
    color: var(--color-gray-800);
}

.stat-label {
    color: var(--color-gray-600);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.stat-change {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #10B981;
}

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

/* Блок с начислениями */
.earnings-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.earnings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

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

.earnings-chart {
    height: 200px;
    background: linear-gradient(135deg, var(--color-red-soft), var(--color-orange-soft));
    border-radius: var(--radius-lg);
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-600);
    font-weight: 500;
}

/* Действия */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    text-align: center;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-orange);
}

.action-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--color-red-soft), var(--color-orange-soft));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.action-icon i {
    font-size: 1.8rem;
    color: var(--color-red);
}

/* Таблицы */
.table-container {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
}

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

.table-custom {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table-custom thead th {
    background: var(--color-gray-100);
    padding: 15px;
    font-weight: 600;
    color: var(--color-gray-800);
    border-bottom: 2px solid var(--color-gray-200);
    text-align: left;
}

.table-custom tbody td {
    padding: 15px;
    border-bottom: 1px solid var(--color-gray-200);
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background: var(--color-red-soft);
}

.status-active {
    color: #10B981;
    font-weight: 600;
}

.status-pending {
    color: var(--color-orange);
    font-weight: 600;
}

/* Новости */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.news-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-date {
    background: var(--color-red);
    color: var(--color-white);
    padding: 8px 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.news-content {
    padding: 20px;
}

/* Прогресс бар */
.progress-custom {
    height: 10px;
    background: var(--color-gray-200);
    border-radius: 5px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-bar-custom {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: width 0.6s ease;
}

/* Формы */
.form-control, .form-select {
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    padding: 10px 15px;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-red);
    box-shadow: 0 0 0 0.25rem rgba(229, 57, 53, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--color-gray-800);
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

/* Карточки */
.card {
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    background: var(--color-white);
}

.card-header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
    padding: 20px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* Утилиты */
.text-link {
    color: var(--color-red);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.text-link:hover {
    color: var(--color-orange);
    text-decoration: underline;
}

.badge.bg-gradient {
    background: var(--gradient-primary);
    color: var(--color-white);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
}

.form-check-input:checked {
    background-color: var(--color-red);
    border-color: var(--color-red);
}

.input-group .form-control {
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 10px;
    font-weight: bold;
}

/* Анимации */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Уведомления */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    z-index: 9999;
    max-width: 300px;
}

.notification.slide-out {
    animation: slideOut 0.3s ease;
}

/* Стили для страницы товаров */
.product-image-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-card {
    transition: transform 0.2s;
    border: 1px solid #e9ecef;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-description {
    line-height: 1.6;
}

.product-description p:last-child {
    margin-bottom: 0;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
}

/* Большие версии логотипа (для специфических страниц) */
.logo-square.large {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
}

.logo-square.x-large {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    font-size: 3rem;
}

.step-icon .badge {
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-bottom: 30px;
    }

    .user-info {
        flex-direction: column;
        text-align: center;
    }

    .user-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }

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

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

    .navbar-collapse {
        margin-top: 15px;
    }

    .nav-link {
        margin: 2px 0;
    }

    .btn-gradient, .btn-outline-accent {
        padding: 10px 20px;
    }
    
    .logo-square.large,
    .logo-square.x-large {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}
