.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    animation: alertShow .35s ease;
    transition: opacity .35s ease, transform .35s ease;
}

.alert.hide {
    opacity: 0;
    transform: translateY(-8px);
}

.alert.error {
    background: #ffecec;
    color: #b00020;
}

.alert.success {
    background: #eafff1;
    color: #087a35;
}

@keyframes alertShow {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.new-post-btn {
    width: 100%;
    padding: 14px;
    margin-bottom: 22px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.new-post-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* usa o layout original do index.php */
.feed-grid.is-empty {
    display: flex;
    justify-content: center;
}

/* ações extra dos cards */
.card-actions form {
    margin: 0;
}

/* modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 460px;
    background: white;
    border-radius: 24px;
    padding: 28px;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .2);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

.modal h2 {
    margin-bottom: 20px;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal label {
    font-size: .85rem;
    font-weight: 700;
}

.modal input,
.modal textarea,
.modal select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    outline: none;
    font-family: inherit;
    transition: .2s ease;
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.08);
}

.modal textarea {
    min-height: 90px;
    resize: vertical;
}

.save-btn {
    margin-top: 8px;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(108, 92, 231, 0.25);
}

@media (max-width: 768px) {
    .modal {
        padding: 22px;
    }
}