@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Landing UI Design Tokens --- */
:root {
    --bs-primary: #6b21ff !important;
    --bs-primary-rgb: 107, 33, 255 !important;
    --bs-blue: #6b21ff !important;
    --bs-success: #2ab57d !important;
    --bs-info: #8b5cf6 !important;
    --bs-warning: #ffbf53 !important;
    --bs-danger: #fd625e !important;
    --bs-link-color: #6b21ff !important;
    --bs-link-hover-color: #4c1d95 !important;
    --accent: #6b21ff;
    --accent-light: #8b5cf6;
    --accent-dark: #4c1d95;
    --accent-gradient: linear-gradient(135deg, #6b21ff 0%, #8b5cf6 100%);
    --bg-gradient: radial-gradient(ellipse at 20% 10%, #dde8ff 0%, #f5f0ff 50%, #fff5f0 100%);
}

/* --- Global Typography & Background --- */
body {
    font-family: 'Inter', sans-serif !important;
    background: #e8eeff !important;
    background-image: var(--bg-gradient) !important;
    background-attachment: fixed !important;
    color: #0f172a !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.logo-txt {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

/* --- Layout Components --- */
#page-topbar {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(18px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 2px 20px rgba(100, 120, 200, 0.08) !important;
}

/* --- Sidebar Glassmorphism --- */
.vertical-menu {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-right: 1px solid rgba(107, 33, 255, 0.08) !important;
    box-shadow: 0 10px 40px rgba(107, 33, 255, 0.05) !important;
}

#sidebar-menu ul li a {
    color: #334155 !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    margin: 2px 10px !important;
    transition: all 0.3s ease !important;
}

#sidebar-menu ul li a:hover {
    color: #6b21ff !important;
    background: rgba(107, 33, 255, 0.06) !important;
}

#sidebar-menu ul li a i,
#sidebar-menu ul li a svg {
    color: #64748b !important;
    transition: color 0.3s ease, fill 0.3s ease !important;
}

#sidebar-menu ul li a:hover i,
#sidebar-menu ul li a:hover svg {
    color: #6b21ff !important;
    fill: rgba(107, 33, 255, 0.1) !important;
}

#sidebar-menu ul li.mm-active>a {
    background: var(--accent-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(107, 33, 255, 0.25) !important;
}

#sidebar-menu ul li.mm-active>a i,
#sidebar-menu ul li.mm-active>a svg {
    color: #ffffff !important;
    fill: rgba(255, 255, 255, 0.2) !important;
}

/* --- Collapsed Sidebar (data-sidebar-size="sm") Custom Styling --- */
body[data-sidebar-size=sm] #sidebar-menu ul li>a {
    padding-left: 17px !important;
    padding-right: 17px !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li>a i,
body[data-sidebar-size=sm] #sidebar-menu ul li>a svg {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li:hover>a {
    background: #f4f0ff !important;
    color: #6b21ff !important;
    box-shadow: 0 4px 15px rgba(107, 33, 255, 0.1) !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li:hover>a i,
body[data-sidebar-size=sm] #sidebar-menu ul li:hover>a svg {
    color: #6b21ff !important;
    fill: rgba(107, 33, 255, 0.1) !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li:hover>a span {
    color: #6b21ff !important;
    font-weight: 600 !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li.mm-active:hover>a {
    background: var(--accent-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(107, 33, 255, 0.25) !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li.mm-active:hover>a i,
body[data-sidebar-size=sm] #sidebar-menu ul li.mm-active:hover>a svg {
    color: #ffffff !important;
    fill: rgba(255, 255, 255, 0.2) !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li.mm-active:hover>a span {
    color: #ffffff !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li:hover>ul {
    background: #ffffff !important;
    border-radius: 0 0 12px 12px !important;
    border: 1px solid rgba(107, 33, 255, 0.12) !important;
    box-shadow: 0 10px 30px rgba(107, 33, 255, 0.1) !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li:hover>ul a {
    color: #334155 !important;
    background: transparent !important;
    padding: 8px 20px !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li:hover>ul a:hover {
    color: #6b21ff !important;
    background: rgba(107, 33, 255, 0.05) !important;
}

body[data-sidebar-size=sm] #sidebar-menu ul li:hover>ul li.active a {
    color: #6b21ff !important;
    font-weight: 600 !important;
    background: rgba(107, 33, 255, 0.08) !important;
}

.menu-title {
    color: #94a3b8 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.8px !important;
    padding: 12px 20px 8px 20px !important;
}

/* --- Content Cards --- */
.card {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(107, 33, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease !important;
}

.card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(107, 33, 255, 0.2) !important;
    box-shadow: 0 20px 40px rgba(107, 33, 255, 0.1) !important;
}

/* --- Buttons --- */
.btn {
    border-radius: 10px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.btn-primary {
    background: var(--accent-gradient) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(107, 33, 255, 0.2) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--accent-gradient) !important;
    opacity: 0.95 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(107, 33, 255, 0.3) !important;
}

.btn-soft-primary {
    background: rgba(107, 33, 255, 0.1) !important;
    color: #6b21ff !important;
    border: none !important;
}

.btn-soft-primary:hover {
    background: #6b21ff !important;
    color: #ffffff !important;
}

/* --- Tables --- */
.table {
    color: #334155 !important;
}

.table th {
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    color: #64748b !important;
    border-bottom: 2px solid rgba(107, 33, 255, 0.08) !important;
}

.table td {
    vertical-align: middle !important;
}

/* --- Forms & Inputs --- */
.form-control,
.form-select {
    border-radius: 8px !important;
    border: 1.5px solid rgba(107, 33, 255, 0.12) !important;
    padding: 10px 14px !important;
    background-color: rgba(255, 255, 255, 0.6) !important;
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #6b21ff !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(107, 33, 255, 0.15) !important;
}

/* --- Custom Sidebar Alert Giftbox --- */
.sidebar-alert {
    background: linear-gradient(135deg, rgba(107, 33, 255, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%) !important;
    border: 1px dashed rgba(107, 33, 255, 0.2) !important;
}

.alertcard-title {
    color: #6b21ff !important;
    font-weight: 700 !important;
}

/* --- Badges --- */
.badge-soft-primary {
    background-color: rgba(107, 33, 255, 0.1) !important;
    color: #6b21ff !important;
}

.badge-soft-success {
    background-color: rgba(42, 181, 125, 0.1) !important;
    color: #2ab57d !important;
}

/* --- Prevent Cascading Font-Family Overrides on Icon Fonts --- */
.bx,
[class^="bx-"],
[class*=" bx-"] {
    font-family: 'boxicons' !important;
}

.mdi,
[class^="mdi-"],
[class*=" mdi-"] {
    font-family: 'Material Design Icons' !important;
}

.fas,
.far,
.fab,
.fa {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome' !important;
}

/* --- Premium Modal Styling Overrides --- */
.modal-content {
    background: #ffffff !important;
    border: 1px solid rgba(107, 33, 255, 0.15) !important;
    border-radius: 14px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.modal-header {
    border-bottom: 1px solid rgba(107, 33, 255, 0.08) !important;
    padding: 18px 24px !important;
    background: #ffffff !important;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
}

.modal-body {
    padding: 24px !important;
    background: #ffffff !important;
}

.modal-footer {
    border-top: 1px solid rgba(107, 33, 255, 0.08) !important;
    padding: 16px 24px !important;
    background: #ffffff !important;
    border-bottom-left-radius: 14px !important;
    border-bottom-right-radius: 14px !important;
}

/* --- Avatar SVGs sizing (Feather icons) --- */
.avatar-sm svg {
    width: 20px !important;
    height: 20px !important;
}

/* --- Datatable & Responsive Table Buttons Styling --- */
.dt-buttons,
.btn-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    /* Perfect spacing between buttons */
    margin-bottom: 16px !important;
}

/* Style the buttons inside Datatables and Responsive Table toolbars */
.dt-buttons .btn,
.dt-buttons .dt-button,
.btn-toolbar .btn,
.focus-btn-group .btn,
.dropdown-btn-group .btn {
    background-color: rgba(107, 33, 255, 0.06) !important;
    color: #6b21ff !important;
    border: 1px solid rgba(107, 33, 255, 0.15) !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out !important;
    margin: 0 !important;
    /* Reset default margins to let gap control spacing */
}

/* Hover and active states */
.dt-buttons .btn:hover,
.dt-buttons .dt-button:hover,
.btn-toolbar .btn:hover,
.focus-btn-group .btn:hover,
.dropdown-btn-group .btn:hover,
.dt-buttons .btn:focus,
.btn-toolbar .btn:focus {
    background-color: #6b21ff !important;
    color: #ffffff !important;
    border-color: #6b21ff !important;
    box-shadow: 0 4px 12px rgba(107, 33, 255, 0.15) !important;
}

/* Fix dropdown menu for display columns button in responsive table */
.dropdown-btn-group .dropdown-menu {
    border-radius: 10px !important;
    border: 1px solid rgba(107, 33, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    padding: 8px !important;
}

.dropdown-btn-group .dropdown-menu li {
    padding: 4px 8px !important;
}

/* --- Stepper Navigation Wizard --- */
.step-nav-wrapper {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(107, 33, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    margin-bottom: 24px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.step-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 4px !important;
    padding-bottom: 4px !important;
}

/* Hide scrollbars but keep functionality */
.step-nav::-webkit-scrollbar {
    height: 4px;
}

.step-nav::-webkit-scrollbar-thumb {
    background: rgba(107, 33, 255, 0.2);
    border-radius: 4px;
}

.step-nav-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    transition: all 0.25s ease-in-out !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    white-space: nowrap !important;
}

.step-nav-item:hover {
    color: #6b21ff !important;
    background: rgba(107, 33, 255, 0.05) !important;
}

.step-nav-item.active {
    background: var(--accent-gradient) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(107, 33, 255, 0.18) !important;
}

.step-nav-item.disabled {
    opacity: 0.45 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.step-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.08) !important;
    font-size: 11px !important;
    margin-right: 8px !important;
    transition: background 0.2s !important;
}

.step-nav-item.active .step-number {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.step-icon {
    width: 15px !important;
    height: 15px !important;
    margin-right: 6px !important;
}

/* Hide redundant old progress bars in wizard steps */
.loadForm .progress {
    display: none !important;
}

/* --- Mobile Responsive Optimizations --- */
@media (max-width: 991.98px) {

    /* Ensure container spacings are tidy on tablets/mobiles */
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

@media (max-width: 767.98px) {

    /* Stepper wizard navigation optimizations for smaller screens */
    .step-nav-item .step-label {
        display: none !important;
    }

    .step-nav-item {
        padding: 8px 10px !important;
        border-radius: 6px !important;
    }

    .step-number {
        margin-right: 0 !important;
    }

    .step-icon {
        margin-right: 0 !important;
    }

    /* Stack action buttons vertically on mobile to prevent horizontal overflow */
    .dt-buttons,
    .btn-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 6px !important;
    }

    .dt-buttons .btn,
    .dt-buttons .dt-button,
    .btn-toolbar .btn,
    .focus-btn-group .btn,
    .dropdown-btn-group .btn {
        width: 100% !important;
        text-align: center !important;
    }
}

@media (max-width: 575.98px) {

    /* Optimize modal layouts on small screens */
    .modal-dialog {
        margin: 12px !important;
    }

    .modal-content {
        border-radius: 12px !important;
    }

    .modal-body {
        padding: 16px !important;
    }

    .modal-header,
    .modal-footer {
        padding: 12px 16px !important;
    }

    /* Refine dashboard card padding */
    .card-body {
        padding: 16px !important;
    }

    /* Wrap and scale datatables pagination to prevent horizontal clipping */
    .dataTables_paginate {
        display: flex !important;
        justify-content: center !important;
        margin-top: 12px !important;
        width: 100% !important;
    }

    .pagination {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    .pagination .page-item .page-link {
        padding: 6px 10px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
    }
}


#page-topbar .app-search,
#page-topbar .navbar-header > .d-flex:last-child,
.main-content {
    transition: filter 0.35s ease-in-out !important;
}

.vertical-menu:hover~.main-content {
    filter: blur(5px) !important;
    pointer-events: none !important;
}

#layout-wrapper:has(.vertical-menu:hover) #page-topbar .app-search,
#layout-wrapper:has(.vertical-menu:hover) #page-topbar .navbar-header > .d-flex:last-child {
    filter: blur(5px) !important;
    pointer-events: none !important;
}