body {
    padding-top: 5rem;
    font-family: 'Segoe UI', Roboto, Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    min-height: 100vh;
}

.extra-small {
    font-size: 0.75rem;
}

/* Блок заголовка страницы */
.page-header {
    background-color: #f8f9fa;
    padding: 1rem !important;
    border-bottom: 2px solid #3498db !important;
}

.page-header h1.h2 {
    font-weight: 800;
    font-size: 2rem;
    color: #2c3e50;
    letter-spacing: -0.5px;
    text-transform: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%233498db" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"/></svg>');
    background-repeat: no-repeat;
    background-position: left center;
    padding-left: 2.5rem;
}

@media (max-width: 768px) {
    .page-header h1.h2 {
        font-size: 1.5rem;
        background-size: 20px;
        padding-left: 30px;
    }
}

/* Бренд/логотип */
.brand-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-icon {
    font-size: 2rem;
    color: #64dd17;
    margin-right: 0.75rem;
    filter: drop-shadow(0 2px 4px rgba(100, 221, 23, 0.3));
}

.brand-text {
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.5px;
}

.brand-leads {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-finder {
    color: #64dd17;
    background: linear-gradient(135deg, #64dd17 0%, #aeea00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background: linear-gradient(180deg, #1a237e 0%, #283593 100%);
}

.sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.form-label {
    font-weight: 600;
    color: #1a237e;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #3949ab;
    box-shadow: 0 0 0 0.25rem rgba(57, 73, 171, 0.25);
    transform: translateY(-1px);
}

/* Компактные карточки */
.compact-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.compact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.compact-card-header {
    background: linear-gradient(135deg, #3949ab 0%, #1a237e 100%);
    color: white;
    padding: 1rem 1.25rem;
    border: none;
}

.compact-card-header h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compact-card-body {
    padding: 1.25rem;
}

/* Компактные фичи */
.compact-feature {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0.75rem;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.compact-feature:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.compact-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.compact-feature-content h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1a237e;
}

.compact-feature-content p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* Статистика системы */
.stats-card {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00c853, #64dd17, #ffd600, #ff6d00);
}

.stats-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.stats-label {
    font-size: 0.8rem;
    opacity: 0.9;
    letter-spacing: 0.3px;
}

/* Кейсы успеха */
.success-case-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.success-case-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.success-case-number {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.success-case-text {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.3;
}


/* Утилиты */
.cursor-pointer {
    cursor: pointer;
}

/* Градиентные акценты */
.gradient-bg {
    background: linear-gradient(135deg, #3949ab 0%, #1a237e 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #00c853 0%, #64dd17 100%);
}

.gradient-warning {
    background: linear-gradient(135deg, #ff6d00 0%, #ffab00 100%);
}

/* Адаптивность */
@media (max-width: 768px) {
    .compact-feature {
        grid-template-columns: 28px 1fr;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .sidebar {
        position: static;
        height: auto;
        padding-top: 0;
        background: linear-gradient(180deg, #1a237e 0%, #283593 100%);
    }

    .sidebar .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.125rem 0.5rem;
    }
}

/* Плавные переходы */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Кастомные скроллбары */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3949ab 0%, #1a237e 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #303f9f 0%, #0d1b6b 100%);
}


/* Стили для карточек статистики */
.stat-card {
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    overflow: hidden;
    color: white;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.stat-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-icon i {
    font-size: 1.75rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stat-info {
    text-align: left;
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.95;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Градиенты для карточек */
.stat-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-primary .stat-icon {
    background: rgba(255, 255, 255, 0.25);
}

.stat-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-success .stat-icon {
    background: rgba(255, 255, 255, 0.25);
}

.stat-info {
    background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
}

.stat-info .stat-icon {
    background: rgba(255, 255, 255, 0.25);
}

.stat-warning {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.stat-warning .stat-icon {
    background: rgba(255, 255, 255, 0.25);
}

/* Декоративные элементы */
.stat-card::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -60px;
    right: -60px;
    transition: all 0.4s ease;
}

.stat-card:hover::after {
    transform: scale(1.2);
    opacity: 0.8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .stat-card {
        padding: 1.25rem;
    }

    .stat-content {
        gap: 1rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-icon i {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .stat-card {
        padding: 1rem;
    }

    .stat-content {
        gap: 0.75rem;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
    }

    .stat-icon i {
        font-size: 1.25rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

/* Анимация при появлении */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stat-card {
    animation: slideInUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}


/*KWORK LIST*/
.clickable-row:hover {
    background-color: #f8f9fa;
}

.badge.bg-danger[title="Новый проект"] {
    font-size: 0.7rem;
    padding: 2px 6px;
}

/* Стили для индикации активных фильтров */
/*.auto-apply-filter:not([value=""]),*/
/*.budget-input:not(:placeholder-shown) {*/
/*    border-color: #198754 !important;*/
/*    background-color: rgba(25, 135, 84, 0.05) !important;*/
/*}*/

/*.auto-apply-checkbox:checked {*/
/*    background-color: #198754 !important;*/
/*    border-color: #198754 !important;*/
/*}*/

/* Анимация для кнопки Применить при изменении бюджета */
@keyframes budgetChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.budget-input:focus + .btn-warning {
    animation: budgetChange 0.5s ease;
}

/* Подсказка для полей бюджета */
.budget-input::after {
    content: "Нажмите Enter или кнопку 'Применить'";
    display: none;
    position: absolute;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.budget-input:focus::after {
    display: block;
}