﻿/* =========================
   ADMIN – CATEGORIES PAGE
========================= */

.admin-category-page {
    max-width: 1400px;
    margin: auto;
    padding: 32px 24px;
}

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

.admin-table th {
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
}

.admin-table td {
    vertical-align: middle;
    font-size: 14px;
}

/* CHILD INDENT */
.child-indent {
    margin-right: 6px;
    color: #c4c4c4;
}

/* =========================
   STATUS BADGES
========================= */

.badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #e6f6ed;
    color: #2e7d32;
}

.badge-secondary {
    background: #f3f4f6;
    color: #6b7280;
}

/* =========================
   ACTION BUTTONS
========================= */

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.update-btn {
    background: #eef2ff;
    color: #4f46e5;
    border: none;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

    .update-btn:hover {
        background: #e0e7ff;
    }

.trash-btn {
    background: #fee2e2;
    color: #b91c1c;
    border: none;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
}

    .trash-btn:hover {
        background: #fecaca;
    }

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

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   MODAL CONTAINER (MODERN)
========================= */

.admin-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 28px 24px;
    width: 440px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 30px 60px rgba(0, 0, 0, 0.18);
    animation: modalFadeIn 0.18s ease-out;
}

    /* MODAL TITLE */
    .admin-modal h4 {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 20px;
    }

        .admin-modal h4::after {
            content: "";
            display: block;
            height: 1px;
            background: #eeeeee;
            margin-top: 12px;
        }

    /* =========================
   FORM ELEMENTS
========================= */

    .admin-modal label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        margin-bottom: 6px;
        color: #374151;
    }

    .admin-modal .form-control {
        width: 100%;
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 14px;
        border: 1px solid #e5e7eb;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .admin-modal .form-control:focus {
            outline: none;
            border-color: #ec4899;
            box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
        }

/* =========================
   CHECKBOX (MODERN)
========================= */

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    accent-color: #ec4899;
}

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

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

    .modal-actions .btn-primary {
        background: #ec4899;
        border: none;
        padding: 10px 18px;
        border-radius: 10px;
        font-weight: 500;
        color: #ffffff;
    }

        .modal-actions .btn-primary:hover {
            background: #db2777;
        }

    .modal-actions .btn-outline {
        padding: 10px 18px;
        border-radius: 10px;
    }

/* =========================
   EMPTY STATE
========================= */

.empty-state {
    text-align: center;
    padding: 60px;
    color: #9ca3af;
}

    .empty-state i {
        font-size: 36px;
        margin-bottom: 12px;
    }

/* =========================
   ANIMATION
========================= */

@keyframes modalFadeIn {
    from {
        transform: translateY(10px) scale(0.98);
        opacity: 0;
    }

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

@media (max-width: 768px) {
    .admin-category-page {
        padding: 16px 12px;
    }

    .action-buttons {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-modal {
        width: calc(100% - 24px);
        padding: 20px 16px;
    }
}
