/* ═══════════════════════════════════════════════════════════
   SHOPPY — PREMIUM MODERN UI
   custom.css  |  v2.0
   ═══════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────
   0. GOOGLE FONT — Inter (crisp, modern alternative)
   ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ───────────────────────────────────────────────────────────
   1. ROOT — Typography & Base
   ─────────────────────────────────────────────────────────── */
body,
.layout-wrapper,
.layout-container,
.menu-inner,
.navbar,
.card,
.modal,
.offcanvas,
.dropdown-menu,
.table,
.form-control,
.form-label,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body {
    background-attachment: fixed !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01em;
}

/* ───────────────────────────────────────────────────────────
   2. LAYOUT BACKGROUND — Gradient Mesh
   ─────────────────────────────────────────────────────────── */
.layout-wrapper,
.layout-page,
.content-wrapper,
.bg-footer-theme,
.layout-menu-fixed .layout-menu {
    background: transparent !important;
}

/* ───────────────────────────────────────────────────────────
   3. GLASSMORPHISM — Cards, Navbar, Sidebar, Modal, Offcanvas
   ─────────────────────────────────────────────────────────── */
.layout-menu,
.layout-navbar,
.card,
.bg-footer-theme,
.modal-content,
.offcanvas {
    background: rgba(var(--bs-paper-bg-rgb, 255, 255, 255), 0.72) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(128, 128, 128, 0.13) !important;
    box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255,255,255,0.6) inset !important;
}

.layout-menu {
    background: rgba(var(--bs-menu-bg-rgb, 255, 255, 255), 0.72) !important;
}

/* Dark Theme Glass */
[data-bs-theme="dark"] .layout-menu,
[data-bs-theme="dark"] .layout-navbar,
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .bg-footer-theme,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .offcanvas {
    background: rgba(20, 20, 30, 0.68) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35) !important;
}

/* ───────────────────────────────────────────────────────────
   4. CARD — Modern Rounding & Hover Lift
   ─────────────────────────────────────────────────────────── */
.card {
    border-radius: 18px !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}
.card:hover {
    box-shadow: 0 10px 36px 0 rgba(0, 0, 0, 0.10) !important;
}
[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 10px 36px 0 rgba(0, 0, 0, 0.45) !important;
}
.card-header {
    border-bottom: 1px solid rgba(128, 128, 128, 0.12) !important;
    padding: 1.25rem 1.5rem !important;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}
.card-body {
    padding: 1.5rem !important;
}
.card-footer {
    border-top: 1px solid rgba(128, 128, 128, 0.12) !important;
    padding: 1rem 1.5rem !important;
}
.card-footer .ti {
    width: 1.25em;
    height: 1.25em;
}
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
    border-color: rgba(255, 255, 255, 0.07) !important;
}

/* ───────────────────────────────────────────────────────────
   5. BUTTONS — Pill Shape, Smooth Hover & Press
   ─────────────────────────────────────────────────────────── */
.btn {
    border-radius: 10px !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.02em !important;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative;
    overflow: hidden;
}
.btn:active {
    transform: scale(0.96) !important;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
}
.btn-sm {
    border-radius: 8px !important;
    font-size: 0.80rem !important;
}
.btn-lg {
    border-radius: 14px !important;
    font-size: 0.95rem !important;
}

/* Dynamic primary colour overrides */
.btn-primary,
.btn-primary:active,
.btn-primary:focus {
    --bs-btn-bg: var(--bs-primary) !important;
    --bs-btn-border-color: var(--bs-primary) !important;
    --bs-btn-hover-bg: color-mix(in sRGB, var(--bs-primary) 85%, black) !important;
    --bs-btn-hover-border-color: color-mix(in sRGB, var(--bs-primary) 85%, black) !important;
    --bs-btn-color: var(--bs-primary-contrast, #fff) !important;
    color: var(--bs-primary-contrast, #fff) !important;
}
.btn-outline-primary {
    --bs-btn-color: var(--bs-primary) !important;
    --bs-btn-border-color: var(--bs-primary) !important;
    --bs-btn-hover-bg: var(--bs-primary) !important;
    --bs-btn-hover-border-color: var(--bs-primary) !important;
    height: auto !important;
}
.btn-label-primary {
    color: var(--bs-primary) !important;
    background-color: color-mix(in sRGB, var(--bs-primary) 16%, transparent) !important;
}
.btn-label-primary:hover {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}
.btn-primary span {
    display: flex;
    align-items: center;
}

/* ───────────────────────────────────────────────────────────
   6. FORM CONTROLS — Refined Glass Inputs
   ─────────────────────────────────────────────────────────── */
.form-control,
.form-select,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: rgba(var(--bs-paper-bg-rgb, 255, 255, 255), 0.55) !important;
    border: 1px solid rgba(var(--bs-body-color-rgb, 128, 128, 128), 0.18) !important;
    border-radius: 10px !important;
    color: var(--bs-body-color) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    font-size: 0.875rem !important;
}
.form-control:focus,
.form-select:focus {
    background: rgba(var(--bs-paper-bg-rgb, 255, 255, 255), 0.9) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px color-mix(in sRGB, var(--bs-primary) 18%, transparent) !important;
}
.form-label {
    font-size: 0.825rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.025em !important;
    margin-bottom: 0.4rem !important;
    color: var(--bs-secondary-color, #6c757d) !important;
}

/* Dark Theme Inputs */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background: rgba(0, 0, 0, 0.28) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background: rgba(0, 0, 0, 0.45) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px color-mix(in sRGB, var(--bs-primary) 25%, transparent) !important;
}
[data-bs-theme="dark"] .form-label {
    color: rgba(255,255,255,0.55) !important;
}

/* Select2 validation error */
.select2-container.is-invalid .select2-selection {
    border-color: #ff4c51 !important;
}
.select2-container.is-invalid .select2-selection:focus {
    border-color: #ff4c51 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
.stock-alert-color {
    color: #ff4c51 !important;
}

/* Input group */
.input-group .form-control {
    border-radius: 10px !important;
}
.input-group .form-control:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.input-group .form-control:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
.input-group-text {
    border-radius: 10px !important;
    background: rgba(var(--bs-paper-bg-rgb, 255,255,255), 0.5) !important;
    border: 1px solid rgba(var(--bs-body-color-rgb, 128,128,128), 0.18) !important;
}
[data-bs-theme="dark"] .input-group-text {
    background: rgba(0,0,0,0.28) !important;
    border-color: rgba(255,255,255,0.10) !important;
}

/* ───────────────────────────────────────────────────────────
   7. TABLE — Cleaner, Subtle Striping
   ─────────────────────────────────────────────────────────── */
table.dataTable thead th,
.table thead th,
.table th {
    background: rgba(var(--bs-paper-bg-rgb, 255, 255, 255), 0.35) !important;
    font-size: 0.775rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: var(--bs-secondary-color, #6c757d) !important;
    border-bottom: 1px solid rgba(128,128,128,0.15) !important;
    padding: 0.85rem 1rem !important;
}
[data-bs-theme="dark"] table.dataTable thead th,
[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] .table th {
    background: rgba(255,255,255,0.04) !important;
    color: rgba(255,255,255,0.45) !important;
    border-bottom-color: rgba(255,255,255,0.08) !important;
}
.table td {
    padding: 0.85rem 1rem !important;
    font-size: 0.875rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid rgba(128,128,128,0.08) !important;
}
[data-bs-theme="dark"] .table td {
    border-bottom-color: rgba(255,255,255,0.05) !important;
}
.table-hover > tbody > tr:hover > * {
    background-color: rgba(var(--bs-primary-rgb, 115, 103, 240), 0.05) !important;
    transition: background-color 0.15s ease;
}
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(var(--bs-primary-rgb, 115, 103, 240), 0.10) !important;
}
.datatable-action i {
    font-size: 18px !important;
}
.datatable-action i.delete {
    color: #ff4c51;
}

/* ───────────────────────────────────────────────────────────
   8. BADGES — Rounded Pill
   ─────────────────────────────────────────────────────────── */
.badge {
    border-radius: 8px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    padding: 0.35em 0.72em !important;
}

/* ───────────────────────────────────────────────────────────
   9. DROPDOWN — Sleek, Rounded
   ─────────────────────────────────────────────────────────── */
.dropdown-menu {
    border-radius: 14px !important;
    border: 1px solid rgba(128,128,128,0.13) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    padding: 0.5rem !important;
    animation: dropdownFadeIn 0.18s ease forwards;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}
.dropdown-item {
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    padding: 0.55rem 0.9rem !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background: color-mix(in sRGB, var(--bs-primary) 12%, transparent) !important;
    color: var(--bs-primary) !important;
}
.dropdown-item.active,
.dropdown-item:active {
    background: var(--bs-primary) !important;
    color: #fff !important;
}
.dropdown-divider {
    opacity: 0.12 !important;
    margin: 0.35rem 0 !important;
}
[data-bs-theme="dark"] .dropdown-menu {
    background: rgba(20,20,30,0.88) !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.45) !important;
}

/* ───────────────────────────────────────────────────────────
   10. NAVBAR — Polished Top Bar
   ─────────────────────────────────────────────────────────── */
.layout-navbar {
    border-radius: 14px !important;
    min-height: 64px !important;
    padding: 0 1.5rem !important;
    background: rgba(255, 255, 255, 0.32) !important;
    backdrop-filter: blur(35px) saturate(220%) contrast(115%) brightness(108%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(220%) contrast(115%) brightness(108%) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.04), 0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.layout-navbar:hover {
    background: rgba(255, 255, 255, 0.38) !important;
    box-shadow: 0 15px 45px 0 rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 0 0 1px rgba(var(--bs-primary-rgb, 115, 103, 240), 0.1) !important;
}
[data-bs-theme="dark"] .layout-navbar {
    background: rgba(15, 15, 25, 0.28) !important;
    backdrop-filter: blur(35px) saturate(220%) contrast(120%) brightness(85%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(220%) contrast(120%) brightness(85%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.30), 0 1px 0 rgba(255, 255, 255, 0.06) inset !important;
}
[data-bs-theme="dark"] .layout-navbar:hover {
    background: rgba(15, 15, 25, 0.34) !important;
    box-shadow: 0 15px 45px 0 rgba(0, 0, 0, 0.40), 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 0 0 1px rgba(var(--bs-primary-rgb, 115, 103, 240), 0.15) !important;
}

/* Avatar ring */
.layout-navbar .avatar img {
    border: 2px solid rgba(var(--bs-primary-rgb), 0.35) !important;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.10) !important;
    transition: box-shadow 0.25s ease !important;
}
.layout-navbar .avatar img:hover {
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.25) !important;
}

/* Navbar icon buttons */
.layout-navbar .btn-icon {
    border-radius: 50% !important;
    width: 38px !important;
    height: 38px !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}
.layout-navbar .btn-icon:hover {
    background: rgba(var(--bs-primary-rgb), 0.10) !important;
    transform: scale(1.08) !important;
}

/* ───────────────────────────────────────────────────────────
   11. SIDEBAR — Premium Pill Nav with Animations
   ─────────────────────────────────────────────────────────── */
.layout-menu-fixed .layout-menu {
    border-right: 1px solid rgba(var(--bs-body-color-rgb, 128,128,128), 0.12) !important;
}
[data-bs-theme="dark"] .layout-menu-fixed .layout-menu {
    border-right: 1px solid rgba(255,255,255,0.06) !important;
}

/* Logo area */
.app-brand {
    padding: 1.1rem 1.5rem !important;
    border-bottom: 1px solid rgba(128,128,128,0.10) !important;
}
[data-bs-theme="dark"] .app-brand {
    border-bottom-color: rgba(255,255,255,0.06) !important;
}

/* Menu section headers */
.menu-header {
    margin: 0.75rem 0 0.25rem !important;
    padding: 0 1.5rem !important;
}
.menu-header-text {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    opacity: 0.45 !important;
}

/* Menu item & link */
.layout-menu .menu-link {
    border-radius: 12px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition:
        background-color 0.22s ease,
        color 0.22s ease,
        margin-left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    position: relative;
}

/* Hover: slide right + subtle bg */
.layout-menu .menu-item:not(.active):hover > .menu-link {
    transform: none !important;
    margin-left: 6px !important;
    background-color: rgba(var(--bs-primary-rgb, 115, 103, 240), 0.08) !important;
    color: var(--bs-primary-safe-sidebar, var(--bs-primary)) !important;
}

/* Click press */
.layout-menu .menu-item:active > .menu-link {
    transform: scale(0.97) !important;
    margin-left: 3px !important;
    transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Active state */
.layout-menu .menu-item.active > .menu-link {
    transform: none !important;
    margin-left: 4px !important;
    font-weight: 600 !important;
}

/* The little | in front of active top-level tab */
.layout-menu .menu-inner > .menu-item.active > .menu-link::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    height: 45%;
    width: 3px;
    background-color: currentColor;
    border-radius: 4px;
    opacity: 0.75;
}

/* Icon bounce on hover */
.layout-menu .menu-icon {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.layout-menu .menu-item:hover .menu-icon {
    transform: scale(1.18) rotate(-5deg) !important;
}

/* ───────────────────────────────────────────────────────────
   Unique Sub-menu Styling (Inset Glass Pane)
   ─────────────────────────────────────────────────────────── */
.layout-menu .menu-sub {
    background: rgba(128, 128, 128, 0.04) !important;
    border-radius: 14px;
    margin: 0.35rem 1rem 0.5rem 1rem !important;
    padding: 0.4rem 0 !important;
    border: 1px solid rgba(128, 128, 128, 0.05);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.02);
}
[data-bs-theme="dark"] .layout-menu .menu-sub {
    background: rgba(0, 0, 0, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.15);
}

/* Hide default bullets for a cleaner inset look */
.layout-menu .menu-sub .menu-link::before {
    display: none !important;
}

/* Adjust links inside the inset pane to fit perfectly */
.layout-menu .menu-sub .menu-link {
    padding: 0.5rem 1rem !important;
    margin: 0.15rem 0.6rem !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

/* Distinct active state for inset sub-menu items */
.layout-menu .menu-sub .menu-item.active > .menu-link {
    background: color-mix(in sRGB, var(--bs-primary) 12%, transparent) !important;
    color: var(--bs-primary-safe-sidebar, var(--bs-primary)) !important;
    font-weight: 600 !important;
    margin-left: 0.8rem !important;
    box-shadow: -3px 0 0 var(--bs-primary-safe-sidebar, var(--bs-primary));
}

/* ───────────────────────────────────────────────────────────
   12. BREADCRUMB — Minimal & Clean
   ─────────────────────────────────────────────────────────── */
.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
}
.breadcrumb-item {
    font-size: 0.80rem !important;
    font-weight: 500 !important;
    opacity: 0.7;
}
.breadcrumb-item a {
    color: var(--bs-primary) !important;
    text-decoration: none !important;
    transition: opacity 0.15s ease;
}
.breadcrumb-item a:hover { opacity: 0.75; }
.breadcrumb-item.active { opacity: 0.55; }
.breadcrumb-item + .breadcrumb-item::before {
    font-size: 0.65rem;
    opacity: 0.5;
}

/* ───────────────────────────────────────────────────────────
   13. MODAL — Polished Overlay & Content
   ─────────────────────────────────────────────────────────── */
.modal-content {
    border-radius: 20px !important;
    overflow: hidden !important;
}
.modal-header {
    border-bottom: 1px solid rgba(128,128,128,0.12) !important;
    padding: 1.25rem 1.5rem !important;
}
.modal-footer {
    border-top: 1px solid rgba(128,128,128,0.12) !important;
    padding: 1rem 1.5rem !important;
    gap: 0.5rem !important;
}
.modal-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
}
.modal-backdrop {
    backdrop-filter: blur(4px);
}
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: rgba(255,255,255,0.07) !important;
}
#openingStockForm .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* ───────────────────────────────────────────────────────────
   14. OFFCANVAS — Consistent Glass
   ─────────────────────────────────────────────────────────── */
.offcanvas {
    border-radius: 0 !important;
}
.offcanvas-header {
    border-bottom: 1px solid rgba(128,128,128,0.12) !important;
    padding: 1.25rem 1.5rem !important;
}
[data-bs-theme="dark"] .offcanvas-header {
    border-bottom-color: rgba(255,255,255,0.07) !important;
}

/* ───────────────────────────────────────────────────────────
   15. ALERTS & TOASTS
   ─────────────────────────────────────────────────────────── */
.alert {
    border-radius: 12px !important;
    border: 1px solid rgba(128,128,128,0.15) !important;
    font-size: 0.875rem !important;
    backdrop-filter: blur(10px) !important;
}

/* ───────────────────────────────────────────────────────────
   16. USER PROFILE CARDS
   ─────────────────────────────────────────────────────────── */
.user-profile .icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    border: 1px solid transparent;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.user-profile:hover .icon {
    border: 1px dashed;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.user-profile .title {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--bs-card-title-color);
    transition: color 0.2s ease;
}
.user-profile .icon i {
    width: 20px;
    height: 20px;
}
.user-profile .purple {
    background-color: rgba(139, 92, 246, 0.10);
    color: #8b5cf6;
}
.user-profile .success {
    background-color: rgba(83, 166, 83, 0.12);
    color: #53A653;
}
.user-profile .blue {
    background-color: rgba(1, 161, 185, 0.10);
    color: #01A1B9;
}
.user-profile .danger {
    background-color: rgba(220, 53, 69, 0.10);
    color: #DC3545;
}
.purple-wrap:hover .title  { color: #8b5cf6; }
.success-wrap:hover .title { color: #53A653; }
.blue-wrap:hover .title    { color: #01A1B9; }
.danger-wrap:hover .title  { color: #DC3545; }

/* ───────────────────────────────────────────────────────────
   17. MISCELLANEOUS UTILITIES
   ─────────────────────────────────────────────────────────── */
.h-40 { height: 40px; }
.site-logo-sidebar img {
    max-height: 55px;
    max-width: 200px;
}
#itemForm h5.card-tile {
    border-bottom: 1px dashed rgba(128,128,128,0.3);
    padding-bottom: 15px;
    font-size: 0.95rem;
    font-weight: 600;
}
.add-plus-btn { margin-top: 23px; }
.set-opening-stock {
    display: flex;
    align-items: center;
    height: 30px;
    gap: 4px;
}
.set-opening-stock i { font-size: 14px; }

/* Colour overrides */
.bg-primary   { background-color: var(--bs-primary) !important; }
.text-primary  { color: var(--bs-primary) !important; }
.bg-label-primary {
    background-color: color-mix(in sRGB, var(--bs-primary) 16%, transparent) !important;
    color: var(--bs-primary) !important;
}

/* ───────────────────────────────────────────────────────────
   18. SCROLLBAR — Custom Thin Scrollbar
   ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(128,128,128,0.28);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(128,128,128,0.45);
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
}

/* ───────────────────────────────────────────────────────────
   19. LOGIN / AUTH PAGE — Premium Glassmorphism
   ─────────────────────────────────────────────────────────── */
.authentication-wrapper {
    background:
        linear-gradient(135deg,
            color-mix(in sRGB, var(--bs-primary) 14%, transparent),
            color-mix(in sRGB, var(--bs-primary) 4%, transparent)),
        radial-gradient(circle at 78% 18%,
            color-mix(in sRGB, var(--bs-primary) 18%, transparent) 0%,
            transparent 42%),
        radial-gradient(circle at 18% 82%,
            color-mix(in sRGB, var(--bs-primary) 12%, transparent) 0%,
            transparent 52%) !important;
    min-height: 100vh;
    position: relative;
}
.authentication-wrapper .card {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 24px !important;
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
    animation: cardEntrance 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}
[data-bs-theme="dark"] .authentication-wrapper .card {
    background: rgba(22, 22, 35, 0.58) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* ───────────────────────────────────────────────────────────
   20. HIDE INSTALL APP BUTTON ON SMALL SCREENS
   ─────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    #installApp { display: none !important; }
}

/* ───────────────────────────────────────────────────────────
   21. MOBILE RESPONSIVENESS ENHANCEMENTS
   ─────────────────────────────────────────────────────────── */

/* Tighter card padding on mobile */
@media (max-width: 575.98px) {
    .card-body  { padding: 1.1rem !important; }
    .card-header { padding: 0.9rem 1.1rem !important; }
    .card-footer { padding: 0.75rem 1.1rem !important; }
    .modal-header { padding: 1rem 1.1rem !important; }
    .modal-footer { padding: 0.75rem 1.1rem !important; }
    .offcanvas-header { padding: 1rem 1.1rem !important; }
    .table td, .table th { padding: 0.65rem 0.75rem !important; }
    .btn { font-size: 0.80rem !important; }
    .layout-navbar { padding: 0 0.75rem !important; }
}

/* Slightly larger touch targets on tablet */
@media (max-width: 767.98px) {
    .btn { min-height: 38px; }
    .form-control, .form-select { min-height: 40px !important; }
    .layout-menu .menu-link { padding: 0.7rem 1rem !important; }
}

/* Full-width modals on very small screens */
@media (max-width: 480px) {
    .modal-dialog { margin: 0.5rem !important; }
    .modal-content { border-radius: 16px !important; }
    .dropdown-menu { min-width: 180px !important; }
}

/* ───────────────────────────────────────────────────────────
   22. PAGE TRANSITION FADE — Smooth page loads
   ─────────────────────────────────────────────────────────── */
.content-wrapper > .container-xxl,
.content-wrapper > .container-fluid {
    animation: pageFadeIn 0.3s ease forwards;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* ───────────────────────────────────────────────────────────
   23. LOADING SKELETON (global utility)
   ─────────────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
        rgba(128,128,128,0.08) 25%,
        rgba(128,128,128,0.18) 50%,
        rgba(128,128,128,0.08) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ───────────────────────────────────────────────────────────
   24. FOOTER — Lightweight
   ─────────────────────────────────────────────────────────── */
.content-footer {
    border-top: 1px solid rgba(128,128,128,0.10) !important;
    font-size: 0.80rem !important;
    padding: 0.75rem 0 !important;
}
[data-bs-theme="dark"] .content-footer {
    border-top-color: rgba(255,255,255,0.06) !important;
}
.footer-link {
    color: var(--bs-primary) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: opacity 0.15s ease;
}
.footer-link:hover { opacity: 0.75; }

/* ───────────────────────────────────────────────────────────
   25. AUTOCOMPLETE SEARCH BAR POPUP — Spotlight Glassmorphic Style
   ─────────────────────────────────────────────────────────── */
.aa-DetachedOverlay {
    background: rgba(10, 10, 15, 0.45) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
}

.aa-DetachedOverlay .aa-DetachedContainer {
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.82) !important;
    backdrop-filter: blur(30px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.20), 0 1px 0 rgba(255,255,255,0.7) inset !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding-top: 10px !important;
}

[data-bs-theme="dark"] .aa-DetachedOverlay .aa-DetachedContainer {
    background: rgba(20, 20, 30, 0.80) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255,255,255,0.05) inset !important;
}

.aa-DetachedOverlay .aa-Form {
    border: none !important;
    background: rgba(var(--bs-primary-rgb, 115, 103, 240), 0.06) !important;
    border-radius: 50px !important;
    padding: 6px 14px !important;
    box-shadow: 0 0 0 1px rgba(var(--bs-primary-rgb, 115, 103, 240), 0.12) !important;
    margin: 10px 16px !important;
    transition: box-shadow 0.2s ease !important;
}

.aa-DetachedOverlay .aa-Form:focus-within {
    box-shadow: 0 0 0 2px var(--bs-primary) !important;
}

.aa-DetachedOverlay .search-control {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important;
    background: transparent !important;
}

.aa-DetachedOverlay .aa-Item {
    border-radius: 12px !important;
    margin: 4px 16px !important;
    padding: 8px 12px !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
}

.aa-DetachedOverlay .aa-Item:hover, 
.aa-DetachedOverlay .aa-Item[aria-selected=true] {
    background: rgba(var(--bs-primary-rgb, 115, 103, 240), 0.08) !important;
    border: 1px solid rgba(var(--bs-primary-rgb, 115, 103, 240), 0.10) !important;
    transform: translateX(4px);
}

.aa-DetachedOverlay .aa-Item a {
    color: var(--bs-heading-color, #2f2b3d) !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.aa-DetachedOverlay .aa-Item:hover a i,
.aa-DetachedOverlay .aa-Item[aria-selected=true] a i {
    color: var(--bs-primary) !important;
    transform: scale(1.15);
}

.aa-DetachedOverlay .aa-Item a i {
    transition: transform 0.2s ease, color 0.2s ease !important;
    font-size: 1.15rem !important;
}

.aa-DetachedOverlay .search-headings {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: var(--bs-primary) !important;
    margin: 8px 24px 6px 24px !important;
    opacity: 0.85 !important;
}

.aa-DetachedOverlay .aa-SourceHeader {
    border: none !important;
    padding: 0 !important;
}

/* ───────────────────────────────────────────────────────────
   AUTHENTICATION & LOGIN PAGES DARK MODE
   ─────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .authentication-wrapper.authentication-basic {
    background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .authentication-wrapper .card {
    background: var(--bs-card-bg) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .authentication-wrapper .form-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

[data-bs-theme="dark"] .authentication-wrapper a {
    color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .authentication-wrapper h4,
[data-bs-theme="dark"] .authentication-wrapper p {
    color: var(--bs-heading-color) !important;
}

/* Ensure input placeholder contrast for dark theme globally */
[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .form-select::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}

[data-bs-theme="dark"] .form-control {
    color: #e2e8f0 !important;
}

/* Glassmorphism Toastr Customization */
#toast-container > div {
    background-color: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    color: var(--bs-heading-color, #1e293b) !important;
    opacity: 1 !important;
    padding: 15px 15px 15px 50px !important;
    word-break: break-word !important;
    word-wrap: break-word !important;
    max-width: 400px !important; /* Ensure it stays responsive */
}

/* Dark mode toastr */
[data-bs-theme="dark"] #toast-container > div {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Toast Message */
.toast-message {
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    word-break: break-word !important;
    word-wrap: break-word !important;
    white-space: pre-wrap !important;
    line-height: 1.5 !important;
}

/* Color Accents */
#toast-container > .toast-success {
    border-left: 4px solid #28c76f !important;
}
#toast-container > .toast-error {
    border-left: 4px solid #ea5455 !important;
}
#toast-container > .toast-warning {
    border-left: 4px solid #ff9f43 !important;
}
#toast-container > .toast-info {
    border-left: 4px solid #00cfe8 !important;
}

/* Adjust close button */
.toast-close-button {
    color: inherit !important;
    opacity: 0.6 !important;
    text-shadow: none !important;
    right: -0.1em !important;
    top: -0.1em !important;
}
.toast-close-button:hover {
    opacity: 1 !important;
}

/* Template Customizer Override - Fully Rounded Color Picker Swatches */
#template-customizer .template-customizer-colors-options .custom-option,
#template-customizer .template-customizer-colors-options .custom-option .custom-option-body,
#template-customizer .template-customizer-colors-options .custom-option .custom-option-content,
#template-customizer .template-customizer-colors-options .custom-option .custom-option-content .pcr-button,
#template-customizer .template-customizer-colors-options .custom-option .custom-option-content .pcr-button::before,
#template-customizer .template-customizer-colors-options .custom-option .custom-option-content .pcr-button::after {
    border-radius: 50% !important;
}

/* ───────────────────────────────────────────────────────────
   GLOBAL UI COMPACTION (Forms & Inputs)
   ─────────────────────────────────────────────────────────── */
/* Make form cards tighter */
.container-p-y form .card-body {
    padding: 1.25rem !important; /* Reduced from default 1.5rem or 2rem */
}

/* Reduce standard input heights slightly for a denser feel */
.form-control, .form-select, .select2-selection {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    min-height: 36px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}
/* Ensure Select2 dropdowns always appear above everything else (fixes issue where it goes under tables) */
.select2-container--open, .select2-dropdown {
    z-index: 99999 !important;
}
.select2-container--default .select2-dropdown {
    background-color: #fff !important;
    border: 1px solid rgba(var(--bs-secondary-rgb), 0.2) !important;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

/* Fix stacking context for report filters so dropdowns and datepickers don't hide behind the data table */
#filterSection, .filter-section {
    position: relative !important;
    z-index: 1050 !important;
}

/* ───────────────────────────────────────────────────────────
   GLOBAL DATATABLE COMPACTION & FIXES
   ─────────────────────────────────────────────────────────── */
/* Prevent awkward text wrapping in Datatable Headers (crucial for Report pages) */
.card-datatable table th,
.table-responsive table th {
    white-space: nowrap !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem !important;
    background-color: rgba(var(--bs-secondary-rgb), 0.05) !important;
}

/* Prevent text wrapping in standard datatable cells to keep rows strictly aligned */
.card-datatable table td,
.table-responsive table td {
    white-space: nowrap;
    vertical-align: middle;
    padding: 0.75rem 1.25rem !important;
}

/* ───────────────────────────────────────────────────────────
   POS SCREEN MOBILE RESPONSIVENESS OVERRIDES (< 992px)
   ─────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    /* Header layout cleanup */
    .pos-header {
        padding: 0.5rem 0.75rem !important;
        gap: 6px !important;
    }
    .pos-header-left, .pos-header-right {
        gap: 6px !important;
    }
    .pos-header .btn, .pos-header-icon.btn {
        padding: 0.35rem 0.6rem !important;
        font-size: 0.85rem !important;
        min-width: 34px !important;
        height: 34px !important;
    }
    .pos-header-search-wrapper, .dashboard-btn span {
        display: none !important;
    }

    /* Main container and content stacking */
    .pos-container {
        height: 100vh !important;
        overflow: hidden !important;
    }
    .pos-main-content {
        padding: 8px !important;
        gap: 8px !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        height: calc(100vh - 120px) !important;
    }

    /* Panels full width on mobile */
    .pos-cart-panel {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    }
    .pos-products-panel {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Toggle visibility between Cart and Products panels */
    .pos-main-content .pos-cart-panel:not(.show) {
        display: none !important;
    }
    .pos-main-content .pos-cart-panel.show {
        display: flex !important;
        height: 100% !important;
    }

    /* Header search and category layout */
    .pos-products-header {
        padding: 0.6rem 0.8rem !important;
        margin-bottom: 8px !important;
        border-radius: 12px !important;
        flex-wrap: wrap !important;
    }
    .pos-products-header .layout-type {
        min-width: 120px !important;
    }
    .pos-products-content {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .pos-category-panel {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-height: 50px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }
    .pos-category-header {
        display: none !important;
    }
    .pos-category-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        padding: 2px !important;
        white-space: nowrap !important;
    }
    .pos-category-item {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
    }

    /* Products grid */
    .pos-products-grid {
        padding: 8px !important;
        border-radius: 12px !important;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 8px !important;
    }

    /* Cart footer summary & actions */
    .pos-cart-summary {
        padding: 0.6rem 1rem !important;
    }
    .pos-total-amount {
        padding: 0.8rem 1rem !important;
    }
    .pos-total-label {
        font-size: 1rem !important;
    }
    .pos-total-value {
        font-size: 1.4rem !important;
    }
    .pos-footer-actions {
        padding: 0.5rem 0.8rem !important;
        gap: 6px !important;
    }
    .pos-footer-actions .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }
}

