:root {
    --color-primary: 79 70 229;
    /* Indigo-600 */
    --color-secondary: 99 102 241;
    /* Indigo-500 */
}

body {
    font-family: 'Outfit', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Hide Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ripple Effect */
.ripple-container {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    animation: ripple 0.6s linear;
    transform: scale(0);
    pointer-events: none;
}

@keyframes ripple {
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Glassmorphism & Utilities */
.glass {
    backdrop-filter: blur(10px);
}

.btn-active {
    background-color: rgb(var(--color-primary));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(var(--color-primary), 0.3);
}

.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark .product-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.product-card:active {
    transform: scale(0.98);
}

/* List View Items */
.list-view-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    transition: all 0.2s;
}

.list-view-item:hover {
    border-color: rgb(var(--color-primary));
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Modal Animation */
@keyframes modalPop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content {
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Scrollbar Inside Content */
.modal-scroll {
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.modal-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
    margin: 0.5rem;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.dark .modal-scroll::-webkit-scrollbar-thumb {
    background: #475569;
}

/* Toast Animation */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

@keyframes slideOutUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.toast-enter {
    animation: slideInDown 0.3s ease-out;
}

.toast-exit {
    animation: slideOutUp 0.3s ease-in;
}

/* Smooth Transitions for Better UX */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

button,
a,
input,
select,
textarea {
    transition: all 0.2s ease-in-out;
}

.category-btn {
    transition: all 0.3s ease-in-out;
}

.category-btn:hover {
    transform: translateY(-2px);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgb(var(--color-primary) / 0.2);
    transition: all 0.2s ease-in-out;
}

/* Custom Scrollbar Class */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #475569;
}

/* Skeleton Loader Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

.dark .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}

/* DataTable Styles */
.table-container {
    overflow-x: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.sortable-header {
    cursor: pointer;
    user-select: none;
}

.sortable-header:hover {
    background-color: rgb(var(--color-primary) / 0.05);
}

/* Pagination */
.pagination-btn {
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: rgb(var(--color-primary) / 0.1);
    color: rgb(var(--color-primary));
}

.pagination-btn.active {
    background-color: rgb(var(--color-primary));
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkbox Styles */
.checkbox-custom {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 0.25rem;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-custom:checked {
    background-color: rgb(var(--color-primary));
    border-color: rgb(var(--color-primary));
}

.dark .checkbox-custom {
    border-color: #475569;
}

/* Dropdown Menu Animation */
@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

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

.dropdown-menu {
    animation: dropdownIn 0.15s ease-out;
}

/* Safe area for mobile bottom sheet */
.pb-safe {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* Hide DataTables sort indicator on checkbox column */
table.dataTable thead th:first-child .dt-column-order {
    display: none !important;
}


/* Fix DataTables header-body alignment with scrollX */
.dt-scroll-head {
    overflow-y: scroll !important;
    overflow-x: hidden;
}

.dt-scroll-head::-webkit-scrollbar {
    width: 17px;
    background: transparent;
}

.dt-scroll-head::-webkit-scrollbar-thumb {
    background: transparent;
}


/* Fix DataTables scrollX alignment - from DataTables forum */
.dt-layout-table>div {
    overflow: auto;
    max-width: 100%;
}

/* DataTables footer row padding */
.dt-container>div.grid:last-child {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}