/* Общие стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Навбар */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Сайдбар */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 1000;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #f8f9fa;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 56px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: #0d6efd;
    background-color: #e9ecef;
    border-left-color: #0d6efd;
}

.sidebar .nav-link.active {
    color: #0d6efd;
    background-color: #e7f1ff;
    border-left-color: #0d6efd;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Основной контент */
.main-content {
    margin-top: 56px;
    min-height: calc(100vh - 56px);
    background-color: #f8f9fa;
}

.content-section {
    padding: 1rem 0;
}

/* Статистические карточки */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Таблицы */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Кнопки действий */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Модальные окна */
.modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Адаптивность */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
        box-shadow: none;
    }
    
    .sidebar-sticky {
        height: auto;
    }
    
    .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .main-content {
        margin-left: 200px;
    }
    
    .sidebar {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 220px;
    }
    
    .sidebar {
        width: 220px;
    }
}

@media (min-width: 1200px) {
    .main-content {
        margin-left: 240px;
    }
    
    .sidebar {
        width: 240px;
    }
}

/* Улучшения для мобильных устройств */
@media (max-width: 575.98px) {
    .table-responsive {
        border-radius: 0.375rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* Анимации */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Улучшения для форм */
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Улучшения для бейджей */
.badge {
    font-weight: 500;
}

/* Улучшения для навигации */
.breadcrumb {
    background-color: transparent;
    margin-bottom: 1rem;
}

/* Улучшения для карточек */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Улучшения для кнопок */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Улучшения для dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

.posts-table table {
    width: 100%;
    border-collapse: collapse;
}

.posts-table th {
    background-color: #F9FAFB;
    padding: 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #E5E7EB;
}

.posts-table td {
    padding: 16px;
    font-size: 14px;
    color: #4B5563;
    border-bottom: 1px solid #F3F4F6;
}

.posts-table tr:last-child td {
    border-bottom: none;
}

.posts-table tr:hover {
    background-color: #F9FAFB;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status.published {
    background-color: #D1FAE5;
    color: #065F46;
}

.status.draft {
    background-color: #FEF3C7;
    color: #92400E;
}

.action-btn {
    background: none;
    border: 1px solid #D1D5DB;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: #F3F4F6;
    border-color: #9CA3AF;
}

.action-btn.delete {
    color: #DC2626;
    border-color: #FECACA;
}

.action-btn.delete:hover {
    background-color: #FEE2E2;
    border-color: #DC2626;
}



.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid #ddd;
    margin: 0 0 15px;
    padding: 0 0 4px;
    list-style: none;
}

.tabs-nav li {
    border: none;
    background: transparent;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
    color: #555;
    transition: background .15s, color .15s, box-shadow .15s;
}

.tabs-nav li:hover {
    background: #e7f1ff;
}

.tabs-nav li.active {
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 2px 4px rgba(13,110,253,.35);
}

.tabs-content .tab-pane {
    display: none;
    padding-top: 4px;
}

.tabs-content .tab-pane.active {
    display: block;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }
    
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        padding: 16px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-table {
        overflow-x: auto;
    }
    
    .posts-table table {
        min-width: 600px;
    }
}

@media (max-width: 640px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-title {
        font-size: 18px;
    }
    
    .site-link {
        display: none;
    }
}
