/* Основные стили CRM */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Обертка приложения */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Боковое меню */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    transition: width 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.logo i {
    font-size: 28px;
}

.sidebar.collapsed .logo span {
    display: none;
}

/* Навигация */
.sidebar-nav {
    padding: 20px 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 8px 12px;
    letter-spacing: 0.5px;
}

.sidebar.collapsed .nav-section-title {
    display: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link i {
    width: 20px;
    font-size: 18px;
}

.nav-link .badge {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
}

.nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-link .badge {
    display: none;
}

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Верхняя панель */
.top-header {
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    gap: 8px;
}

.header-search i {
    color: var(--text-secondary);
}

.header-search input {
    border: none;
    background: none;
    outline: none;
    width: 250px;
}

.notifications {
    position: relative;
    cursor: pointer;
    padding: 8px;
}

.notifications i {
    font-size: 20px;
    color: var(--text-secondary);
}

.notifications .badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

.user-profile .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Контент страницы */
.page-content {
    padding: 24px;
}

/* Канбан-доска */
.kanban-board {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.kanban-column {
    flex: 0 0 320px;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 16px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.column-title {
    font-weight: 600;
    font-size: 16px;
}

.column-count {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.kanban-cards {
    min-height: 200px;
}

.kanban-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.invoice-number {
    font-weight: 600;
    color: var(--primary-color);
}

.invoice-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-shop {
    margin-bottom: 12px;
}

.shop-number {
    font-weight: 500;
    margin-bottom: 4px;
}

.shop-address {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.card-devices {
    margin-bottom: 12px;
}

.device-badge {
    display: inline-block;
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

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

.user-avatar-sm {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.user-name-sm {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-search input {
        width: 150px;
    }
}/* Дополнительные стили для InvoicePro */

/* Градиентные фоны */
.bg-gradient-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Карточки статистики */
.stat-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Прогресс-бары */
.progress-gradient {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

.progress-bar-gradient {
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 4px;
}

/* Бейджи */
.badge-gradient {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Таблицы */
.table-hover tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

/* Модальные окна */
.modal-content {
    border-radius: 16px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

/* Загрузка */
.spinner-gradient {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Пустые состояния */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    opacity: 0.3;
}

.empty-state-icon i {
    font-size: 40px;
    color: white;
}

/* Анимация для логотипа */
@keyframes logoGlow {
    0%, 100% {
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
    }
}

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