/* ============================================
   DOROGA AI - СТИЛИ АДМИН-ПАНЕЛИ
   Версия: 2.3 (Финальный фикс сайдбара)
   ============================================ */

/* ========== ОСНОВНАЯ СТРУКТУРА ========== */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
    background: var(--color-background);
}

.admin-main {
    padding: 30px;
    overflow-y: auto;
    height: 100vh;
}

/* Сэндвич меню */
.mobile-header {
    display: none;
    background: var(--color-surface-solid);
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 90;
}

/* ========== САЙДБАР (ПОСТОЯННО ОТКРЫТ) ========== */
.admin-sidebar {
    background: var(--color-surface-solid);
    border-right: 1px solid var(--color-border);
    padding: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-light) transparent;
    position: sticky;
    top: 0;
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: var(--color-border-light);
    border-radius: 3px;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.03) 0%, transparent 100%);
}

.sidebar-header .logo-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.sidebar-tagline {
    font-size: 12px;
    color: var(--color-text-tertiary);
    letter-spacing: 0.004em;
}

/* Навигация сайдбара */
.sidebar-nav {
    padding: 15px 0;
    height: calc(100vh - 130px);
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 10px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 20px 8px 20px;
    margin: 0;
    user-select: none;
}

.nav-divider {
    height: 1px;
    background: var(--color-border);
    margin: 8px 20px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 14px;
    position: relative;
}

.nav-link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.nav-item.active > .nav-link {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 500;
}

.nav-item.active > .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-primary);
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Подменю */
.nav-item.has-submenu .nav-link {
    padding-right: 40px;
}

.nav-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
    color: var(--color-text-tertiary);
}

.nav-item.has-submenu.open .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: rgba(0, 0, 0, 0.02);
    border-left: 2px solid var(--color-border);
    margin-left: 20px;
}

.nav-submenu.show {
    display: block;
}

.nav-subitem {
    margin: 0;
}

.nav-sublink {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 15px;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition-smooth);
}

.nav-sublink:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.nav-subitem.active > .nav-sublink {
    color: var(--color-primary);
    font-weight: 500;
    background: var(--color-primary-light);
}

.nav-subitem.active > .nav-sublink::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-primary);
}

/* ========== ШАПКА АДМИНКИ ========== */
.admin-header {
    background: var(--color-surface-solid);
    padding: 20px 25px;
    border-radius: var(--radius-large);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-card);
}

.header-title h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.header-date {
    font-size: 13px;
    color: var(--color-text-tertiary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

/* ========== КАРТОЧКИ ========== */
.admin-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.admin-card {
    background: var(--color-surface-solid);
    border-radius: var(--radius-large);
    padding: 25px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.admin-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-elevated);
}

.card-header {
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--color-text-tertiary);
    line-height: 1.5;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: var(--color-primary-light);
    padding: 18px 15px;
    border-radius: var(--radius-medium);
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.1);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-tertiary);
    margin-top: 4px;
}

/* Быстрые действия */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    width: 100%;
    padding: 14px 16px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-medium);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.action-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.action-btn.secondary {
    background: var(--color-surface-solid);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-light);
}

.action-btn.secondary:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Системная информация */
.system-info {
    margin-top: 5px;
}

.info-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    color: var(--color-text-primary);
}

.info-value.success {
    color: var(--color-success);
    font-weight: 600;
}

.info-value.danger {
    color: var(--color-danger);
    font-weight: 600;
}

/* ========== РАЗДЕЛ БЕЗОПАСНОСТИ ========== */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.security-card {
    background: var(--color-surface-solid);
    border-radius: var(--radius-large);
    padding: 25px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.security-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-elevated);
}

.security-card.critical {
    border-color: var(--color-danger);
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.03) 0%, var(--color-surface-solid) 100%);
}

.security-card.warning {
    border-color: var(--color-warning);
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.03) 0%, var(--color-surface-solid) 100%);
}

.security-card.success {
    border-color: var(--color-success);
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.03) 0%, var(--color-surface-solid) 100%);
}

.security-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.security-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.security-icon.backup {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
}

.security-icon.update {
    background: linear-gradient(135deg, #34C759, #2DA847);
    color: white;
}

.security-icon.settings {
    background: linear-gradient(135deg, #AF52DE, #FF2D55);
    color: white;
}

.security-icon.logs {
    background: linear-gradient(135deg, #FF9500, #FFCC00);
    color: white;
}

.security-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.security-subtitle {
    font-size: 14px;
    color: var(--color-text-tertiary);
}

.security-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 15px;
}

.status-success {
    background: rgba(52, 199, 89, 0.15);
    color: #1D7E2D;
}

.status-warning {
    background: rgba(255, 149, 0, 0.15);
    color: #BF5800;
}

.status-danger {
    background: rgba(255, 59, 48, 0.15);
    color: #D70015;
}

.status-neutral {
    background: rgba(142, 142, 147, 0.15);
    color: var(--color-text-secondary);
}

.security-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
}

.security-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.security-btn {
    padding: 10px 16px;
    border-radius: var(--radius-medium);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-btn.primary {
    background: var(--color-primary);
    color: white;
}

.security-btn.primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.security-btn.secondary {
    background: var(--color-surface-solid);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-light);
}

.security-btn.secondary:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ========== УВЕДОМЛЕНИЯ ========== */
.notification {
    padding: 18px 20px;
    border-radius: var(--radius-large);
    margin-bottom: 20px;
    border-left: 4px solid;
    background: var(--color-surface-solid);
    box-shadow: var(--shadow-card);
}

.notification.warning {
    border-left-color: var(--color-warning);
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.05) 0%, var(--color-surface-solid) 100%);
}

.notification h4 {
    font-size: 16px;
    color: #BF5800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-content {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.notification-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.notification-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* ========== КНОПКА УДАЛЕНИЯ ========== */
.delete-install-btn {
    background: var(--gradient-danger);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-medium);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.delete-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.3);
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .admin-sidebar {
        height: auto;
        max-height: 70px;
        overflow: hidden;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
    
    .admin-sidebar.active {
        max-height: 500px;
    }
    
    .sidebar-nav {
        height: auto;
        max-height: 350px;
        overflow-y: auto;
    }
    
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .admin-main {
        padding: 20px 15px;
        height: auto;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
        margin-top: 0;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
    }
    
    .admin-content,
    .security-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .security-actions,
    .notification-actions {
        flex-direction: column;
    }
    
    .delete-install-btn,
    .security-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .admin-card,
    .security-card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 24px;
    }
}
/* ========== СТИЛИ ДЛЯ УВЕДОМЛЕНИЙ ========== */

/* Если уже есть стили для notification, можно их дополнить */
.gradient-warning {
    background: linear-gradient(135deg, #FF9500 0%, #FFCC00 100%);
}

/* Улучшенные стили для кнопок уведомлений */
.notification-btn {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Адаптивность для уведомлений */
@media (max-width: 768px) {
    .notifications-list .notification {
        padding: 12px;
    }
    
    .notification-header h4 {
        font-size: 15px;
    }
    
    .notification-content p {
        font-size: 13px;
    }
}
/* ========== МОДУЛЬНАЯ СИСТЕМА ========== */

/* Контейнер для уведомлений */
.notifications-section {
    margin-bottom: 30px;
}

/* Уведомления */
.notification-item {
    padding: 16px;
    border-radius: var(--radius-large);
    border-left: 4px solid;
    margin-bottom: 15px;
    background: var(--color-surface-solid);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.notification-critical {
    border-left-color: var(--color-danger);
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.05) 0%, var(--color-surface-solid) 100%);
}

.notification-warning {
    border-left-color: var(--color-warning);
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.05) 0%, var(--color-surface-solid) 100%);
}

.notification-info {
    border-left-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, var(--color-surface-solid) 100%);
}

.notification-success {
    border-left-color: var(--color-success);
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.05) 0%, var(--color-surface-solid) 100%);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.notification-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-module {
    font-size: 12px;
    color: var(--color-text-tertiary);
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.notification-content p {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.notification-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.notification-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-medium);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.notification-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-btn-critical {
    background: linear-gradient(135deg, var(--color-danger) 0%, #FF3750 100%);
    color: white;
}

.notification-btn-warning {
    background: linear-gradient(135deg, var(--color-warning) 0%, #FFB100 100%);
    color: white;
}

.notification-btn-info {
    background: linear-gradient(135deg, var(--color-primary) 0%, #5AC8FA 100%);
    color: white;
}

.notification-btn-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #30D158 100%);
    color: white;
}

.notification-btn-secondary {
    background: var(--color-surface-solid);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-light);
}

.notification-btn-secondary:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Стили для виджетов */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.widget-container {
    display: grid;
    gap: 20px;
}

.widget-column-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget-column-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget-full-width {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

#desktop-bottom-widgets {
    display: none;
}

/* Карточки виджетов */
.admin-widget {
    background: var(--color-surface-solid);
    border-radius: var(--radius-large);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-card);
}

.admin-widget:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-3px);
}

.widget-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-surface);
}

.widget-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-primary);
}

.widget-actions {
    display: flex;
    gap: 8px;
}

.widget-refresh,
.widget-minimize {
    background: none;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    border-radius: var(--radius-small);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.widget-refresh:hover,
.widget-minimize:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.widget-content {
    padding: 22px;
}

.widget-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 12px;
    color: var(--color-text-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-module {
    font-weight: 500;
    color: var(--color-text-secondary);
}

.widget-updated {
    font-size: 11px;
}

/* Размеры виджетов */
.widget-size-small .widget-content {
    padding: 18px;
}

.widget-size-small .widget-header {
    padding: 16px 20px;
}

.widget-size-large .widget-content {
    padding: 28px;
}

.widget-size-large .widget-header {
    padding: 20px 24px;
}

/* Типы виджетов */
.widget-type-info {
    border-top: 4px solid var(--color-primary);
}

.widget-type-warning {
    border-top: 4px solid var(--color-warning);
}

.widget-type-success {
    border-top: 4px solid var(--color-success);
}

.widget-type-danger {
    border-top: 4px solid var(--color-danger);
}

.widget-type-primary {
    border-top: 4px solid var(--color-primary);
}

.widget-type-secondary {
    border-top: 4px solid var(--color-secondary);
}

/* Стили для конкретных виджетов */
.widget-default {
    text-align: center;
    padding: 20px;
    color: var(--color-text-secondary);
}

.widget-error {
    text-align: center;
    padding: 20px;
    color: var(--color-danger);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-medium);
    background: rgba(255, 59, 48, 0.03);
}

/* Сетка внутри виджетов */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 0;
}

.stat-item {
    background: var(--color-primary-light);
    padding: 18px 15px;
    border-radius: var(--radius-medium);
    text-align: center;
    transition: var(--transition-smooth);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.1);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-tertiary);
    margin-top: 4px;
}

/* Быстрые действия */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}

.action-btn {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-medium);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.action-btn.secondary {
    background: var(--color-surface-solid);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-light);
}

.action-btn.secondary:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Системная информация */
.system-info {
    margin-top: 5px;
}

.info-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    color: var(--color-text-primary);
    font-weight: 500;
}

.info-value.success {
    color: var(--color-success);
    font-weight: 600;
}

/* Кнопки виджетов */
.widget-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-medium);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    background: var(--color-primary);
    color: white;
}

.widget-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.widget-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.widget-btn-secondary {
    background: var(--color-surface-solid);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-light);
}

.widget-btn-secondary:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Контейнеры для контента */
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mb-5 { margin-bottom: 20px !important; }

.text-muted {
    color: var(--color-text-tertiary) !important;
}

.text-small {
    font-size: 13px !important;
}

.text-center {
    text-align: center !important;
}

/* Адаптивность для модульной системы */
@media (min-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 2fr 1fr;
        gap: 30px;
    }
    
    .widget-column-left {
        grid-column: 1;
    }
    
    .widget-column-right {
        grid-column: 2;
    }
    
    .widget-full-width {
        grid-column: 1 / span 2;
    }
    
    #desktop-bottom-widgets {
        display: block;
        grid-column: 1 / span 2;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .widget-column-left,
    .widget-column-right {
        grid-column: 1;
    }
    
    .widget-full-width {
        grid-column: 1;
    }
    
    .notification-actions {
        flex-direction: column;
    }
    
    .notification-btn {
        width: 100%;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .notification-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .notification-module {
        align-self: flex-start;
    }
    
    .widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .widget-actions {
        align-self: flex-end;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .widget-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.spin {
    animation: spin 1s linear infinite;
}

/* Улучшенные тени */
.shadow-widget {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.shadow-widget-hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Плавные переходы */
.transition-widget {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Градиенты для виджетов */
.widget-gradient-primary {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, rgba(255, 255, 255, 0.8) 100%);
}

.widget-gradient-success {
    background: linear-gradient(135deg, var(--color-success-light) 0%, rgba(255, 255, 255, 0.8) 100%);
}

.widget-gradient-warning {
    background: linear-gradient(135deg, var(--color-warning-light) 0%, rgba(255, 255, 255, 0.8) 100%);
}

.widget-gradient-danger {
    background: linear-gradient(135deg, var(--color-danger-light) 0%, rgba(255, 255, 255, 0.8) 100%);
}
/* ========== СТИЛИ ДЛЯ МОДУЛЕЙ ========== */

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.module-card {
    background: var(--color-surface-solid);
    border-radius: var(--radius-large);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.module-card:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.module-card-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    gap: 15px;
}

.module-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    background: var(--color-primary-light);
    border-radius: var(--radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-title {
    flex: 1;
}

.module-title h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: var(--color-text-primary);
}

.module-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--color-text-tertiary);
}

.module-version {
    background: rgba(0, 122, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--color-primary);
}

.module-author {
    font-style: italic;
}

.module-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.module-card-body {
    padding: 20px;
}

.module-description {
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.module-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.stat-badge.success {
    background: rgba(52, 199, 89, 0.15);
    color: #1D7E2D;
}

.stat-badge.secondary {
    background: rgba(142, 142, 147, 0.15);
    color: var(--color-text-secondary);
}

.stat-badge.info {
    background: rgba(0, 122, 255, 0.15);
    color: var(--color-primary);
}

.module-features ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.module-features li {
    padding: 5px 0;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.module-features li:before {
    content: '✓';
    color: var(--color-success);
    font-weight: bold;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--color-text-tertiary);
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: var(--color-text-secondary);
}

.module-filters .row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.module-filters .col-md-6 {
    flex: 1;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}