/* =========================================================
   TABLE
========================================================= */

.table-card {
    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 15px;

    overflow: hidden;

    box-shadow: var(--shadow-sm);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;

    min-width: 700px;
}

thead {
    background: #f8fafc;
}

th {
    text-align: left;

    padding:
        12px 15px;

    font-size: 8px;

    color: #94a3b8;

    text-transform: uppercase;

    letter-spacing: 0.6px;

    font-weight: 800;

    white-space: nowrap;
}

td {
    padding:
        14px 15px;

    border-top: 1px solid #f1f5f9;

    font-size: 10px;

    vertical-align: middle;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: #fafafa;
}

.content-cell {
    display: flex;

    align-items: center;

    gap: 10px;

    max-width: 300px;
}

.content-type-icon {
    width: 32px;
    height: 32px;

    border-radius: 9px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.content-type-icon.video {
    color: #7c3aed;
    background: #f5f3ff;
}

.content-type-icon.carousel {
    color: #2563eb;
    background: #eff6ff;
}

.content-cell-text {
    min-width: 0;
}

.content-cell-text strong {
    display: block;

    font-size: 10px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-cell-text span {
    display: block;

    color: #94a3b8;

    font-size: 8px;

    margin-top: 3px;
}

.type-badge,
.status-badge {
    display: inline-flex;

    align-items: center;

    border-radius: 6px;

    padding:
        5px 8px;

    font-size: 8px;

    font-weight: 700;

    white-space: nowrap;
}

.type-badge.video {
    background: #f5f3ff;
    color: #7c3aed;
}

.type-badge.carousel {
    background: #eff6ff;
    color: #2563eb;
}

.status-badge.pending {
    background: #fffbeb;
    color: #b45309;
}

.status-badge.processing {
    background: #eff6ff;
    color: #2563eb;
}

.status-badge.published {
    background: #f0fdf4;
    color: #15803d;
}

.status-badge.failed {
    background: #fef2f2;
    color: #dc2626;
}

.action-buttons {
    display: flex;

    align-items: center;

    gap: 5px;
}

.icon-button {
    width: 30px;
    height: 30px;

    border-radius: 8px;

    border: 1px solid var(--border);

    background: #ffffff;

    color: #64748b;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 10px;

    transition: var(--transition);
}

.icon-button.edit {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
}

.icon-button.edit:hover {
    background: #15803d;
    border-color: #15803d;
    color: #ffffff;
}

.icon-button.delete {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.icon-button.delete:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

.icon-button:hover {
    background: #f8fafc;

    color: #111827;

    border-color: #cbd5e1;
}

.empty-state {
    text-align: center;

    padding: 45px 20px;

    color: #94a3b8;
}

.empty-state i {
    font-size: 30px;

    margin-bottom: 12px;

    opacity: 0.6;
}

.empty-state strong {
    display: block;

    color: #475569;

    font-size: 11px;
}

.empty-state span {
    display: block;

    font-size: 9px;

    margin-top: 5px;
}


/* =========================================================
   FORMS
========================================================= */

.form-page-header {
    display: flex;

    align-items: center;

    gap: 15px;

    margin-bottom: 25px;
}

.form-page-icon {
    width: 50px;
    height: 50px;

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 19px;
}

.form-page-icon.video {
    background: #f5f3ff;
    color: #7c3aed;
}

.form-page-icon.carousel {
    background: #eff6ff;
    color: #2563eb;
}

.form-card {
    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 18px;

    padding: 25px;

    max-width: 1000px;

    box-shadow: var(--shadow-sm);
}

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 18px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-card .form-group label,
.modal .form-group label {
    font-size: 10px;
}

.form-card input,
.form-card select,
.form-card textarea,
.modal input,
.modal select,
.modal textarea {
    width: 100%;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: #ffffff;

    color: #111827;

    padding:
        0 12px;

    min-height: 44px;

    font-size: 11px;

    transition: var(--transition);
}

.form-card textarea,
.modal textarea {
    padding: 12px;

    resize: vertical;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    border-color: #94a3b8;

    box-shadow:
        0 0 0 4px rgba(15, 23, 42, 0.04);
}

.form-card small {
    display: block;

    color: #94a3b8;

    font-size: 8px;

    margin-top: 5px;
}

.form-actions {
    display: flex;

    justify-content: flex-end;

    gap: 9px;

    margin-top: 25px;

    padding-top: 20px;

    border-top: 1px solid #f1f5f9;
}


/* =========================================================
   PAGE HEADING
========================================================= */

.page-heading-row {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    margin-bottom: 22px;
}

.heading-actions {
    display: flex;

    gap: 8px;
}

.filter-bar {
    display: flex;

    gap: 6px;

    margin-bottom: 14px;
}

.filter-button {
    border: 1px solid var(--border);

    background: #ffffff;

    color: #64748b;

    border-radius: 8px;

    padding:
        7px 11px;

    font-size: 9px;
    font-weight: 700;

    transition: var(--transition);
}

.filter-button span {
    display: inline-flex;

    min-width: 17px;
    height: 17px;

    align-items: center;
    justify-content: center;

    background: #f1f5f9;

    border-radius: 5px;

    margin-left: 4px;

    font-size: 8px;
}

.filter-button:hover {
    border-color: #cbd5e1;
}

.filter-button.active {
    background: #111827;

    color: #ffffff;

    border-color: #111827;
}

.filter-button.active span {
    background: rgba(255, 255, 255, 0.15);

    color: #ffffff;
}


/* =========================================================
   TIMELINE
========================================================= */

.timeline {
    position: relative;
}

.timeline-empty {
    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 15px;

    padding: 50px 20px;

    text-align: center;

    color: #94a3b8;
}

.timeline-empty i {
    font-size: 30px;

    margin-bottom: 12px;
}

.timeline-item {
    position: relative;

    display: grid;

    grid-template-columns: 110px 1fr;

    gap: 20px;

    margin-bottom: 12px;
}

.timeline-date {
    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 12px;

    height: fit-content;

    text-align: center;
}

.timeline-date strong {
    display: block;

    font-size: 14px;
}

.timeline-date span {
    display: block;

    color: #94a3b8;

    font-size: 8px;

    margin-top: 3px;
}

.timeline-content {
    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 12px;

    padding: 13px 15px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}

.timeline-content strong {
    display: block;

    font-size: 10px;
}

.timeline-content span {
    display: block;

    color: #94a3b8;

    font-size: 8px;

    margin-top: 4px;
}


/* =========================================================
   MODAL
========================================================= */

.modal-backdrop {
    position: fixed;

    inset: 0;

    z-index: 500;

    background: rgba(15, 23, 42, 0.45);

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    backdrop-filter: blur(5px);

    animation:
        modalFade 0.2s ease both;
}

@keyframes modalFade {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    width: 100%;
    max-width: 600px;

    background: #ffffff;

    border-radius: 18px;

    box-shadow:
        0 25px 80px rgba(15, 23, 42, 0.2);

    overflow: hidden;

    animation:
        modalEnter 0.25s ease both;
}

@keyframes modalEnter {

    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-small {
    max-width: 400px;

    padding: 30px;

    text-align: center;
}

.modal-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 20px 22px;

    border-bottom: 1px solid #f1f5f9;
}

.modal-header > div:first-child {
    display: flex;

    align-items: center;

    gap: 11px;
}

.modal-icon {
    width: 38px;
    height: 38px;

    border-radius: 10px;

    background: #f1f5f9;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
}

.modal-header h2 {
    font-size: 14px;
}

.modal-header p {
    font-size: 9px;

    color: #94a3b8;

    margin-top: 3px;
}

.modal-close {
    width: 32px;
    height: 32px;

    border: 0;

    border-radius: 8px;

    background: #f8fafc;

    color: #64748b;
}

.modal-close:hover {
    background: #f1f5f9;
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    padding: 15px 22px;

    border-top: 1px solid #f1f5f9;

    display: flex;

    justify-content: flex-end;

    gap: 8px;
}

.modal-footer.centered {
    justify-content: center;

    padding:
        20px 0 0;
}

.delete-icon {
    width: 55px;
    height: 55px;

    margin: 0 auto 17px;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fef2f2;

    color: #ef4444;

    font-size: 19px;
}

.modal-small h2 {
    font-size: 17px;
}

.modal-small p {
    color: #64748b;

    font-size: 10px;

    line-height: 1.7;

    margin-top: 8px;
}

.modal-small p strong {
    color: #111827;
}

.warning-text {
    color: #ef4444 !important;
}


/* =========================================================
   TOAST
========================================================= */

.toast {
    position: fixed;

    right: 25px;
    bottom: 25px;

    z-index: 1000;

    min-width: 300px;

    max-width: 400px;

    background: #ffffff;

    border: 1px solid var(--border);

    border-radius: 13px;

    padding: 12px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.15);

    display: flex;

    align-items: center;

    gap: 10px;

    transform:
        translateY(120px);

    opacity: 0;

    pointer-events: none;

    transition:
        0.35s ease;
}

.toast.show {
    transform:
        translateY(0);

    opacity: 1;

    pointer-events: auto;
}

.toast-icon {
    width: 34px;
    height: 34px;

    border-radius: 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f0fdf4;

    color: #16a34a;

    font-size: 12px;
}

.toast.error .toast-icon {
    background: #fef2f2;

    color: #ef4444;
}

.toast-content {
    flex: 1;
}

.toast-content strong {
    display: block;

    font-size: 10px;
}

.toast-content span {
    display: block;

    color: #64748b;

    font-size: 9px;

    margin-top: 2px;
}

.toast-close {
    border: 0;

    background: transparent;

    color: #94a3b8;

    font-size: 11px;
}


