#loader-wrapper {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    z-index: 999999999;
}


.loader {
    width: 50px;
    aspect-ratio: 1;
    display: grid;
    border: 4px solid #0000;
    border-radius: 50%;
    border-color: #ccc #0000;
    animation: l16 1s infinite linear;
}

.loader::before,
.loader::after {
    content: "";
    grid-area: 1/1;
    margin: 2px;
    border: inherit;
    border-radius: 50%;
}

.loader::before {
    border-color: #f03355 #0000;
    animation: inherit;
    animation-duration: .5s;
    animation-direction: reverse;
}

.loader::after {
    margin: 8px;
}

@keyframes l16 {
    100% {
        transform: rotate(1turn)
    }
}


.dropzone {
    overflow: hidden !important;
}

.dropzone .fallback {
    position: relative;
}

.dropzone .fallback input {
    position: absolute;
    width: 100%;
    height: 200px;
    transform: scale(5);
    z-index: 1;
}

.product-categories .choices__input--cloned {
    display: none !important;
    cursor: pointer;
}

.maxx {
    width: 500px;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.add-feild {
    max-width: 200px;
}

.remove-feild {
    width: 39px;
    height: 39px;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-left: 2%;
    border-radius: 20% !important;
}

.remove-feild:hover {
    background-color: #22282e;
}

.info-box {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    font-size: 10px;
    padding: 2px 2.5px 1px;
    border-radius: 50%;
    border: 1px solid #fff;
}

.notification {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.notification-item {
    width: 85% !important;
    margin-right: 15% !important;
    border-radius: 0 !important;
}

.notification-item-without-crossicon {
    width: 95% !important;
    margin-right: 5% !important;
}

.alert {
    --bs-alert-margin-bottom: 0 !important;
    --bs-alert-border-radius: 0 !important
}

.alert p {
    margin-bottom: 0 !important;
}

.alert .btn-close {
    bottom: 0 !important;
    border: none !important;
    outline: none !important;
}

.alert-dismissible {
    padding-right: 0 !important;
}

.btn-close:focus {
    box-shadow: none !important;
}


.alertNote {
    position: fixed;
    width: 100%;
    height: auto;
    max-width: 400px;
    right: 2%;
    bottom: 4%;
    border-radius: 5px;
    color: var(--bs-dark);
    background-color: var(--bs-light);
    box-shadow: 5px 5px 25px 5px rgba(0, 0, 0, 0.08);
}

.alertNote .alert-body {
    border-left: 5px solid var(--bs-primary);
    background-color: var(--bs-white);
    color: var(--bs-black);
    padding: 10px;
}

.alertNote .btn-close {
    position: absolute;
    top: -4px;
    right: -4px;
    padding: 8px;
}

/* ============ MODERN COLOR THEME ============ */
:root {
  /* Modern Indigo/Purple primary */
  --bs-primary: #7C3AED !important;
  --bs-primary-rgb: 124, 58, 237 !important;
  --bs-primary-text-emphasis: #5B21B6 !important;
  --bs-primary-bg-subtle: rgba(124, 58, 237, 0.1) !important;
  --bs-primary-border-subtle: rgba(124, 58, 237, 0.2) !important;

  /* Secondary teal accent */
  --bs-secondary: #0EA5E9 !important;
  --bs-secondary-rgb: 14, 165, 233 !important;

  /* Success green */
  --bs-success: #10B981 !important;
  --bs-success-rgb: 16, 185, 129 !important;

  /* Soft modern heading color */
  --bs-headings-color: #1E293B !important;

  /* Card shadow */
  --bs-card-box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04) !important;

  /* Modern border radius */
  --bs-card-border-radius: 12px !important;
  --bs-border-radius: 8px !important;
  --bs-border-radius-lg: 12px !important;
  --bs-border-radius-sm: 6px !important;

  /* Sidebar modern */
  --bs-main-nav-bg: #1E293B !important;
  --bs-main-nav-item-color: #94A3B8 !important;
  --bs-main-nav-item-hover-color: #ffffff !important;
  --bs-main-nav-item-hover-bg: rgba(124, 58, 237, 0.15) !important;
  --bs-main-nav-border-color: rgba(255,255,255,0.05) !important;

  /* Topbar */
  --bs-topbar-bg: #ffffff !important;
  --bs-topbar-item-color: #475569 !important;
  --bs-topbar-search-bg: #F1F5F9 !important;

  /* Input modern */
  --bs-input-border-color: #E2E8F0 !important;
  --bs-input-focus-border-color: #7C3AED !important;
}

/* Dark mode overrides */
html[data-bs-theme="dark"]:root {
  --bs-primary-bg-subtle: rgba(124, 58, 237, 0.2) !important;
  --bs-primary-border-subtle: rgba(124, 58, 237, 0.3) !important;
  --bs-headings-color: #F1F5F9 !important;
  --bs-card-box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
  --bs-main-nav-bg: #0F172A !important;
  --bs-main-nav-item-color: #64748B !important;
  --bs-main-nav-item-hover-color: #ffffff !important;
  --bs-main-nav-item-hover-bg: rgba(124, 58, 237, 0.2) !important;
  --bs-topbar-bg: #1E293B !important;
  --bs-topbar-item-color: #94A3B8 !important;
  --bs-topbar-search-bg: #334155 !important;
  --bs-input-border-color: #334155 !important;
  --bs-input-focus-border-color: #7C3AED !important;
}

/* Modern Gradient Buttons */
.btn-primary {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3) !important;
  transition: all 0.3s ease !important;
}
.btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4) !important;
}
.btn-primary:active {
  transform: translateY(0) !important;
}

.btn-outline-primary {
  color: #7C3AED !important;
  border-color: #7C3AED !important;
}
.btn-outline-primary:hover {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* Modern Cards */
.card {
  border: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04) !important;
  border-radius: 12px !important;
  transition: box-shadow 0.2s ease !important;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04) !important;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid #E2E8F0 !important;
  padding: 1rem 1.25rem !important;
  border-radius: 12px 12px 0 0 !important;
}
.card-title {
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

/* Modern Topbar */
.topbar {
  background: var(--bs-topbar-bg) !important;
  border-bottom: 1px solid #E2E8F0 !important;
  backdrop-filter: blur(10px) !important;
}

/* Modern Sidebar */
.main-nav {
  background: var(--bs-main-nav-bg) !important;
}
.nav-link {
  border-radius: 8px !important;
  margin: 2px 12px !important;
  transition: all 0.2s ease !important;
}
.nav-link:hover {
  background: var(--bs-main-nav-item-hover-bg) !important;
}
.sub-nav-link {
  border-radius: 6px !important;
  margin: 1px 8px !important;
}
.sub-nav-link:hover {
  background: rgba(124, 58, 237, 0.1) !important;
  color: #7C3AED !important;
}

/* Modern Inputs */
.form-control, .form-select {
  border-radius: 8px !important;
  border: 1.5px solid #E2E8F0 !important;
  padding: 0.6rem 0.9rem !important;
  transition: all 0.2s ease !important;
}
.form-control:focus, .form-select:focus {
  border-color: #7C3AED !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1) !important;
}

/* Modern Table */
.table {
  border-radius: 10px !important;
  overflow: hidden !important;
}
.table thead th {
  background: #F8FAFC !important;
  color: #475569 !important;
  font-weight: 600 !important;
  border-bottom: 2px solid #E2E8F0 !important;
}

/* Modern Badge */
.badge {
  border-radius: 6px !important;
  padding: 0.35em 0.65em !important;
  font-weight: 500 !important;
}

/* Modern Pagination */
.page-link {
  border-radius: 8px !important;
  margin: 0 2px !important;
  border: none !important;
  color: #475569 !important;
}
.page-item.active .page-link {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%) !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3) !important;
}

/* Navbar brand / logo area */
.topbar-button {
  border-radius: 8px !important;
}

/* Notification dropdown */
.dropdown-menu {
  border: none !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12) !important;
  border-radius: 12px !important;
}
.dropdown-item {
  border-radius: 6px !important;
  margin: 2px 6px !important;
  padding: 0.5rem 1rem !important;
}
.dropdown-item:hover {
  background: rgba(124, 58, 237, 0.08) !important;
  color: #7C3AED !important;
}

/* Modern Progress */
.progress {
  border-radius: 10px !important;
  background: #F1F5F9 !important;
}

/* Alert custom */
.alert {
  border-radius: 10px !important;
  border: none !important;
}

/* Modal */
.modal-content {
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15) !important;
}

/* ============ MOBILE OPTIMIZATIONS ============ */

/* Auto-scroll all Grid.js tables on small screens */
div[id^="table-"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    /* Reduce topbar height on mobile */
    :root {
        --bs-topbar-height: 60px;
    }

    /* Bigger touch targets for action buttons */
    .btn-sm {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.85rem !important;
    }

    /* Increase tap area for icon buttons */
    .btn-icon {
        width: 44px !important;
        height: 44px !important;
    }

    /* Make Grid.js rows easier to tap */
    .gridjs-tbody .gridjs-tr {
        min-height: 48px;
    }

    /* Fix maxx width on mobile */
    .maxx {
        width: 200px;
        max-width: 200px;
    }

    /* Card padding reduction on mobile */
    .card-body {
        padding: 0.8rem;
    }

    /* Form elements mobile-friendly */
    .form-control, .form-select {
        font-size: 16px !important;
    }

    /* Full width dropdowns */
    .dropdown-menu {
        min-width: 100%;
    }

    /* Fix auth page */
    .col-lg-4.py-lg-4-3 {
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    :root {
        --bs-topbar-height: 55px;
    }

    .card-body {
        padding: 0.5rem;
    }

    .maxx {
        width: 140px;
        max-width: 140px;
    }

    table.gridjs-table {
        font-size: 12px;
    }
}