/* ============================================================
   Admin News  (an-* prefix)
   ============================================================ */

/* ── New Article button ── */
.an-new-btn {
    background: var(--bg-main);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.an-new-btn:hover {
    opacity: 0.9;
    color: #fff;
}

/* ── Filter bar ── */
.an-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.an-filter-btn {
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1.5px solid #d1d5db;
    border-radius: 20px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.an-filter-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.an-filter-btn.active {
    background: var(--bg-main);
    color: #fff;
    border-color: var(--info-color);
}

/* ── News card list ── */
.an-news-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.an-news-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.an-news-card:hover {
    border-color: var(--info-color);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.08);
}

.an-news-meta {
    flex: 1;
    min-width: 0;
}

.an-news-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.an-news-info {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.an-news-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.an-btn-edit {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 8px;
    border: 1.5px solid var(--info-color);
    color: var(--info-color);
    background: #fff;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.an-btn-edit:hover {
    background: var(--info-color);
    color: #fff;
}

.an-btn-delete {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 8px;
    border: 1.5px solid var(--danger-color);
    color: var(--danger-color);
    background: #fff;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.an-btn-delete:hover {
    background: var(--danger-color);
    color: #fff;
}

/* ── Empty state ── */
.an-empty {
    text-align: center;
    padding: 48px 16px;
    color: #9ca3af;
}

/* ── Form overlay ── */
.an-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

@media (min-width: 768px) {
    .an-overlay {
        align-items: center;
    }
}

.an-form-card {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: anSlideUp 0.22s ease;
}

@media (min-width: 768px) {
    .an-form-card {
        border-radius: 16px;
        max-height: 85vh;
    }
}

@keyframes anSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

.an-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.an-form-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111827;
}

.an-form-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.an-form-body label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    display: block;
}

.an-form-body input,
.an-form-body select,
.an-form-body textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
}

.an-form-body input:focus,
.an-form-body select:focus,
.an-form-body textarea:focus {
    outline: none;
    border-color: var(--info-color);
}

.an-form-body textarea {
    resize: vertical;
    min-height: 80px;
}

.an-featured-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.an-featured-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.an-featured-row label {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
}

.an-form-footer {
    padding: 12px 18px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.an-btn-cancel {
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    cursor: pointer;
}

.an-btn-save {
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: var(--bg-main);
    color: #fff;
    cursor: pointer;
}

.an-btn-save:hover {
    opacity: 0.9;
}
