/* admin-blog.css — стили для управления статьями */

/* Контейнер админ-панели */
.admin-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--main-border);
    backdrop-filter: blur(5px);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-title {
    font-size: 28px;
    font-weight: 600;
    color: white;
    border-left: 4px solid #FFC107;
    padding-left: 15px;
}

.btn-add {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.5);
    border-radius: var(--main-border);
    padding: 10px 20px;
    color: #FFC107;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background: rgba(255, 193, 7, 0.3);
    transform: translateY(-2px);
}

/* Таблица (плитки) статей */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.post-card-admin {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--main-border);
    padding: 16px;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.post-card-admin:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.post-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: calc(var(--main-border) - 4px);
    margin-bottom: 12px;
    background: rgba(0,0,0,0.2);
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

.post-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.status-published {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.status-draft {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid #ff9800;
}

.post-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-actions a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.post-actions a:hover {
    color: #FFC107;
}

.btn-edit {
    background: rgba(33, 150, 243, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

.btn-delete {
    background: rgba(244, 67, 54, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Пагинация */
.pagination-admin {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-admin a, .pagination-admin span {
    display: inline-block;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-admin a:hover {
    background: rgba(255, 193, 7, 0.4);
    transform: translateY(-2px);
}

.pagination-admin .active-page {
    background: #FFC107;
    color: #222;
    font-weight: bold;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--main-border);
    border: 1px dashed rgba(255, 193, 7, 0.5);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-title {
    font-size: 24px;
    color: white;
    margin-bottom: 10px;
}

.empty-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .admin-container {
        margin: 20px;
        padding: 15px;
    }
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }

}