/* =========================================
   1. VARIABLES & THEME CONFIGURATION
   ========================================= */
:root {
    /* Brand Colors (Pink/Rose Theme based on screenshot) */
    --primary: #e91e63;
    --primary-gradient: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    --secondary: #64748b;
    --success: #2dce89;
    --info: #11cdef;
    --warning: #fb6340;
    --danger: #f5365c;

    /* Backgrounds & Text */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #32325d;
    --text-muted: #8898aa;
    --border-color: rgba(0, 0, 0, 0.05);

    /* Z-Indices (Fixed to prevent blocking) */
    --z-navbar: 1030;
    --z-dropdown: 1040;
    --z-overlay: 1050;
    --z-modal: 1060;
    --z-popover: 1070;
    --z-tooltip: 1080;
    --z-toast: 1090;
}

/* =========================================
   2. GLOBAL TYPOGRAPHY & RESET
   ========================================= */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-body) !important;
    color: var(--text-main);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* =========================================
   CUSTOM SCROLLBAR STYLING
   ========================================= */

/* Webkit Browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #e91e63 0%, #c2185b 100%);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c2185b 0%, #ad1457 100%);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #e91e63 #f1f5f9;
}

/* Chat Messages specific scrollbar - more subtle */
#chatMessages::-webkit-scrollbar {
    width: 6px;
}

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

#chatMessages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

#chatMessages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Contact list scrollbar */
.contact-list::-webkit-scrollbar {
    width: 6px;
}

.contact-list::-webkit-scrollbar-track {
    background: transparent;
}

.contact-list::-webkit-scrollbar-thumb {
    background: rgba(233, 30, 99, 0.3);
    border-radius: 10px;
}

.contact-list::-webkit-scrollbar-thumb:hover {
    background: rgba(233, 30, 99, 0.5);
}

a {
    color: var(--text-main);
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* =========================================
   3. LAYOUT & SIDEBAR
   ========================================= */

/* Sidebar Container */
.navbar-vertical.navbar-expand-md {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    border-right: none !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: var(--z-navbar);
}

/* Sidebar Logo */
.navbar-brand-img {
    max-height: 2.5rem;
}

/* Navigation Links */
.navbar-vertical .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    padding: 0.85rem 1.5rem !important;
    margin: 0.15rem 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.25s ease;
}

.navbar-vertical .navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.navbar-vertical .navbar-nav .nav-link.active {
    color: #fff !important;
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
}

.navbar-vertical .navbar-nav .nav-link i {
    min-width: 2.25rem;
    color: var(--primary);
    vertical-align: middle;
}

.navbar-vertical .navbar-nav .nav-link.active i {
    color: #fff !important;
}

/* Sidebar Heading */
.navbar-vertical .navbar-heading {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 1.75rem 0.5rem !important;
}

/* Sidebar Bottom (User Profile) */
.navbar-vertical .mt-auto {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    margin-top: auto;
}

#userProfileDropdown {
    color: #fff !important;
    border-radius: 0.5rem;
    padding: 0.5rem;
    transition: background 0.2s;
}

#userProfileDropdown:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Fix Blocking Divs - Sidebar Width */
@media (min-width: 768px) {
    .navbar-vertical.navbar-expand-md {
        width: 260px;
        max-width: 260px !important;
    }

    .main-content {
        margin-left: 260px !important;
    }
}

/* =========================================
   4. COMPONENTS
   ========================================= */

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.15s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-primary {
    background: var(--primary-gradient) !important;
    color: #fff;
}

.btn-success {
    background: linear-gradient(87deg, #2dce89 0, #2dcecc 100%) !important;
    color: #fff;
}

.btn-neutral {
    background: #fff;
    color: var(--primary);
    border: 1px solid #e2e8f0;
}

/* Cards */
.card {
    border: none !important;
    border-radius: 1rem !important;
    background: var(--bg-card);
    box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15) !important;
    margin-bottom: 2rem;
    transition: transform 0.2s;
}

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

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.5rem !important;
}

.card-header h3 {
    margin-bottom: 0;
    color: var(--text-main);
    font-weight: 700;
}

.card-body {
    padding: 1.5rem !important;
}

/* Forms */
.form-control {
    border-radius: 0.5rem !important;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    height: calc(2.75rem + 2px);
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1) !important;
}

.input-group-text {
    border-radius: 0.5rem;
    border-color: #e2e8f0;
}

/* Tables */
.table thead th {
    background-color: #f6f9fc !important;
    color: #8898aa !important;
    border-bottom: 1px solid #e9ecef;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.table td {
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

/* Modals & Overlays - Fixing Z-Index Blocking */
.modal-backdrop {
    z-index: var(--z-overlay) !important;
}

.modal {
    z-index: var(--z-modal) !important;
}

.dropdown-menu {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: var(--z-dropdown);
}

/* =========================================
   5. SPECIFIC FIXES & UTILITIES
   ========================================= */

/* Action Button Dropdown Fix */
.dropdown-item i {
    color: var(--text-muted);
}

.dropdown-item:active,
.dropdown-item.active {
    background-color: var(--primary);
    color: #fff;
}

.dropdown-item:active i,
.dropdown-item.active i {
    color: #fff;
}

/* Status Badges */
.badge {
    border-radius: 0.375rem;
    text-transform: uppercase;
    padding: 0.5em 0.7em;
}

/* AI Chat Styling - Clean & Modern */
.theChatHolder {
    height: 100%;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 1rem !important;
    border-bottom-right-radius: 1rem !important;
    border-left: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#chatMessages {
    background-color: #f8f9fa !important;
    border-radius: 1rem;
    padding: 1rem;
}

.message-separator {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.message-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px solid #e0e0e0;
}

.message-separator span {
    background: #f8f9fa;
    padding: 0 1rem;
    color: #888;
    position: relative;
    font-size: 0.85rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header {
        padding-top: 60px !important;
    }

    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .card-body {
        padding: 1rem !important;
    }

    .sidenav-cart {
        z-index: var(--z-modal);
        /* Ensure it doesn't block if hidden */
        display: none;
        /* Hide by default */
    }

    .sidenav-cart.active {
        display: block;
    }
}

/* =========================================
   6. LIBRARY OVERRIDES (SweetAlert, Select2)
   ========================================= */
/* SweetAlert2 Z-Index Fix */
.swal2-container {
    z-index: var(--z-toast) !important;
}

.swal2-popup {
    border-radius: 1rem !important;
}

.swal2-styled.swal2-confirm {
    background-color: var(--primary) !important;
}

/* Select2 Fixes */
.select2-container .select2-selection--single {
    height: 46px !important;
    border-color: #e2e8f0 !important;
    border-radius: 0.5rem !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px !important;
    padding-left: 1rem !important;
}

/* =========================================
   7. ANIMATIONS & 3RD PARTY UTILITIES
   ========================================= */

/* Blob Animations (Status Indicators) */
.blob {
    background: black;
    border-radius: 50%;
    margin: 10px;
    height: 10px;
    width: 10px;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 1);
    transform: scale(1);
    animation: pulse-black 2s infinite;
}

.blob.red {
    background: rgba(255, 82, 82, 1);
    box-shadow: 0 0 0 0 rgba(255, 82, 82, 1);
    animation: pulse-red 2s infinite;
}

.blob.green {
    background: rgba(51, 217, 178, 1);
    box-shadow: 0 0 0 0 rgba(51, 217, 178, 1);
    animation: pulse-green 2s infinite;
}

.blob.orange {
    background: rgba(255, 121, 63, 1);
    box-shadow: 0 0 0 0 rgba(255, 121, 63, 1);
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 82, 82, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
    }
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(51, 217, 178, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(51, 217, 178, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(51, 217, 178, 0);
    }
}

@keyframes pulse-orange {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 121, 63, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 121, 63, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 121, 63, 0);
    }
}

/* Stripe Elements */
.StripeElement {
    box-sizing: border-box;
    height: 40px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    background-color: white;
    box-shadow: 0 1px 3px 0 #e6ebf1;
    transition: box-shadow 150ms ease;
}

.StripeElement--focus {
    box-shadow: 0 1px 3px 0 #cfd7df;
}

.StripeElement--invalid {
    border-color: #fa755a;
}

.StripeElement--webkit-autofill {
    background-color: #fefde5 !important;
}

/* Lottie Player */
lottie-player {
    margin: 0 auto;
}

/* =========================================
   8. COMPONENT RESTORATION (from Backup)
   ========================================= */

/* CHAT INTERFACE & LAYOUT - CRITICAL FOR WPBOX */
.theChatHolder {
    height: 100%;
}

.inChatImage {
    width: 380px !important;
}

@media (max-width: 768px) {
    .inChatImage {
        width: 200px !important;
    }

    #chatAndTools>.row {
        flex-direction: column;
    }

    .hide-onmobile {
        display: none;
    }

    #chatMessages {
        height: 100%;
    }
}

@media (min-width: 768px) {
    .theChatHolder {
        max-height: 85vh !important;
        min-height: 85vh !important;
    }

    .contact-list {
        max-height: 85vh !important;
        min-height: 85vh !important;
    }
}

#chatList {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(300px, 400px) 1fr;
    padding: 3rem;
    max-height: 84vh;
    align-items: stretch;
}

#chatList>div {
    height: 85vh;
}

#chatList>.row {
    height: calc(100vh - 203px);
}

/* Chat Bubbles & Separators */
#chatMessages .bg-success {
    background-color: #172b4d !important;
}

.message-agent {
    border-bottom-right-radius: 0 !important;
}

.message-contact {
    border-bottom-left-radius: 0;
    color: #344767 !important;
}

.message-separator {
    text-align: center;
    color: rgba(0, 0, 0, 0.5);
    font-size: .81rem;
    position: relative;
    padding: 2rem 0;
}

.message-separator span {
    background-color: #f8f9fa;
    position: relative;
    padding: 0.35rem 1rem;
    z-index: 1;
}

.message-separator:before {
    content: "";
    background-color: rgba(0, 0, 0, 0.2);
    height: 1px;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 0;
}

/* Chat Input & Tools */
#emoji-btn {
    font-size: 1.5rem;
    padding: 0 1rem;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    color: #b1bac1;
    border-top-left-radius: 2rem;
    border-bottom-left-radius: 2rem;
    cursor: pointer;
}

#emoji-btn:hover {
    color: var(--primary);
}

#chatTabsContent input {
    background-color: #f8f9fa;
    border-radius: 2rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    color: #1c1c1c;
}

/* Contact List & Sidebar Apps */
.contact-list {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 1rem !important;
    border-bottom-left-radius: 1rem !important;
    border-right: 1px solid #e9ecef !important;
    box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.05);
}

.contact-list .avatar {
    width: 2.5rem;
    height: 2.5rem;
}

.contact-selected {
    background: linear-gradient(90deg, rgba(233, 30, 99, 0.08) 0%, rgba(248, 250, 252, 1) 100%);
    border-left: 3px solid var(--primary);
    border-radius: 0.5rem;
    margin-left: -0.5rem;
    padding-left: calc(0.5rem + 3px) !important;
}

/* Contact item hover effect */
.contact-list .card-body>div {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
}

.contact-list .card-body>div:hover:not(.contact-selected) {
    background: rgba(0, 0, 0, 0.02);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 8rem;
}

.sideBarApps,
.sideBarApps .card {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.sideBarContent {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 300px;
    z-index: var(--z-dropdown);
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
}

/* TIMELINE (Order History) */
.timeline {
    position: relative;
}

.timeline:before {
    position: absolute;
    top: 0;
    left: 1rem;
    height: 100%;
    content: '';
    border-right: 2px solid #e9ecef;
}

.timeline-block {
    position: relative;
    margin: 2em 0;
}

.timeline-block:after {
    display: table;
    clear: both;
    content: '';
}

.timeline-step {
    font-size: 1rem;
    font-weight: 600;
    position: absolute;
    z-index: 1;
    left: 0;
    display: inline-flex;
    width: 33px;
    height: 33px;
    transform: translateX(-50%);
    text-align: center;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e9ecef;
}

.timeline-content {
    position: relative;
    top: -6px;
    margin-left: 60px;
    padding-top: .5rem;
}

@media (min-width: 992px) {
    .timeline:before {
        left: 50%;
        margin-left: -2px;
    }

    .timeline-step {
        left: 50%;
    }

    .timeline-content {
        width: 38%;
    }

    .timeline-block:nth-child(even) .timeline-content {
        float: right;
    }
}

/* STRIP (Items/Products Grid) */
.strip {
    position: relative;
    margin-bottom: 30px;
}

.strip figure {
    margin-bottom: 5px;
    overflow: hidden;
    position: relative;
    height: 200px;
    background-color: #ededed;
    border-radius: 0.5rem;
}

.strip figure img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    z-index: 1;
    transition: all 0.3s ease-in-out;
}

.strip figure:hover img {
    transform: translate(-50%, -50%) scale(1.1);
}

.strip figure .item_title {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 65px 15px 10px 15px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 2;
}

.strip figure .item_title h3 {
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
    color: #fff;
}

/* MAPS */
#map_location,
#map_area {
    height: 500px !important;
    width: 100% !important;
    border-radius: 1rem;
    overflow: hidden;
}

#address_map,

/* =========================================
   9. EXTENDED DASHBOARD COMPONENTS (Restored)
   ========================================= */

/* Modern Glassmorphism Cards */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.5rem 1.75rem !important;
}

.card-header h3,
.card-header .h3 {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem 1.75rem !important;
}

/* Equal Height Stat Cards */
.card-stats {
    min-height: 140px;
    display: flex;
    flex-direction: column;
}

.card-stats .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Cards Row Equal Height */
.row>[class*="col-"] {
    display: flex;
}

.row>[class*="col-"]>.card {
    width: 100%;
}

/* Modern Stat Cards */
.card .text-uppercase {
    color: #94a3b8 !important;
    font-weight: 600;
    letter-spacing: 0.12em;
    font-size: 0.68rem !important;
}

.card h2,
.card .h2 {
    font-weight: 700 !important;
    color: #1e293b;
    font-size: 2rem !important;
}

/* Premium Icon Backgrounds */
.icon-shape {
    border-radius: 0.875rem !important;
    width: 52px !important;
    height: 52px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.icon-shape.bg-gradient-primary,
.icon-shape.bg-primary {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.35);
}

.icon-shape.bg-gradient-success,
.icon-shape.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.icon-shape.bg-gradient-info,
.icon-shape.bg-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

.icon-shape.bg-gradient-warning,
.icon-shape.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.icon-shape.bg-gradient-danger,
.icon-shape.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

/* Premium Card Hover Effect */
.card-stats:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

.card-stats:hover .icon-shape {
    transform: scale(1.08);
}

/* Dashboard Welcome Section */
.header-body h1,
.header-body .h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

/* Force Sidebar Icons to Pink */
/* Sidebar Icons - White */
.navbar-vertical .navbar-nav .nav-link i {
    color: #ffffff !important;
    font-size: 1.1rem;
    min-width: 2.25rem;
}

.navbar-vertical .navbar-nav .nav-link.active i {
    color: #ffffff !important;
}

/* Action Buttons Row */
.btn-outline-primary {
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
    background: transparent !important;
    border-radius: 0.75rem !important;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
}

.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.3);
}

/* Modern Form Inputs - Stylish */
.form-control {
    border: 2px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
    padding: 0.85rem 1.25rem !important;
    font-size: 0.95rem;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.form-control:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.12), 0 4px 12px rgba(233, 30, 99, 0.15) !important;
    background: #fff;
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Stylish Select/Dropdown */
select.form-control,
.custom-select,
.form-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e91e63'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1.25rem !important;
    padding-right: 3rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
    cursor: pointer;
}

select.form-control:hover,
.custom-select:hover,
.form-select:hover {
    border-color: var(--primary) !important;
}

/* Textarea Style */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Input Group Styling */
.input-group .form-control {
    border-radius: 0.75rem !important;
}

.input-group-text {
    background: var(--primary-gradient) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 0.75rem !important;
    padding: 0.85rem 1rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.orders-filters {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* =========================================
   10. RESTORED DEEP STYLES (Sidebar, Cart, Images, Nav)
   ========================================= */

/* --- Mobile Navigation & Cart Overlay --- */
.sidenav-cart {
    height: 100%;
    width: 100%;
    position: fixed;
    z-index: 1050;
    /* Normalized from 9999 */
    top: 0;
    right: 0;
    background-color: #fff;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
}

.sidenav-cart-open {
    display: block;
}

.sidenav-cart-close {
    display: none;
}

.sidenav-cart a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.sidenav-cart a:hover {
    color: #f1f1f1;
}

.sidenav-cart .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

@media (min-width: 576px) {
    .sidenav-cart {
        max-width: 430px;
    }
}

@media (min-width: 768px) {
    .sidenav-cart {
        max-width: 430px;
    }
}

@media (min-width: 992px) {
    .sidenav-cart {
        max-width: 430px;
    }
}

@media (min-width: 1200px) {
    .sidenav-cart {
        max-width: 430px;
    }
}

/* --- Minicart Content --- */
.minicart-content .minicart-heading>h4 {
    margin-bottom: 0;
    padding-bottom: 25px;
}

.minicart-content .minicart-list {
    max-height: 310px;
    position: relative;
    overflow: auto;
}

.minicart-content .minicart-list>li {
    padding-bottom: 30px;
}

.minicart-content .minicart-list>li:last-child {
    padding-bottom: 0;
}

.minicart-content .minicart-list>li.minicart-product {
    display: flex;
}

.minicart-content .minicart-list>li.minicart-product .product-item_img {
    flex-basis: 70px;
    max-width: 70px;
}

.minicart-content .minicart-list>li.minicart-product .product-item_content {
    flex-basis: calc(100% - 70px);
    max-width: calc(100% - 70px);
    padding-left: 20px;
    padding-right: 10px;
}

/* --- Strip/Image Cards (Landing/Dashboard) --- */
.strip {
    position: relative;
    margin-bottom: 30px;
}

.strip figure {
    margin-bottom: 5px;
    overflow: hidden;
    position: relative;
    height: 200px;
    background-color: #ededed;
}

.strip figure img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 100%;
    z-index: 1;
    transition: all 0.3s ease-in-out;
}

.strip figure:hover img {
    transform: translate(-50%, -50%) scale(1.1);
}

.strip figure a.strip_info {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    height: 100%;
    width: 100%;
    z-index: 5;
    display: block;
}

.strip figure a.strip_info>small {
    position: absolute;
    background-color: black;
    left: 15px;
    top: 15px;
    text-transform: uppercase;
    color: #fff;
    font-weight: 600;
    border-radius: 3px;
    padding: 6px 8px 4px 8px;
    line-height: 1;
    font-size: 0.6875rem;
}

.city_title {
    position: absolute;
    bottom: 0px;
    left: 0px;
    margin: 16px;
    font-size: 1.5rem;
    opacity: 100%;
    transition: opacity 0.8s;
    z-index: 1;
    color: white;
}

.city_letter {
    position: absolute;
    bottom: 0px;
    display: block;
    left: 0px;
    margin-left: -16px;
    margin-bottom: -90px;
    font-size: 14rem;
    font-weight: 700;
    font-family: sans-serif;
    opacity: 0%;
    text-transform: uppercase;
    transition: opacity 0.8s;
    z-index: 1;
    color: rgba(255, 255, 255, 0.2);
}

.strip figure:hover .city_letter {
    opacity: 70%;
}

.strip figure:hover .city_title {
    opacity: 50%;
}

.ribbon {
    color: #fff;
    display: inline-block;
    font-size: 0.75rem;
    line-height: 1;
    position: absolute;
    top: 12px;
    right: 15px;
    padding: 7px 8px 4px 8px;
    font-weight: 600;
    min-width: 40px;
    z-index: 9;
}

.ribbon.off {
    background-color: #ff3300;
}

/* --- Mobile Responsiveness & Tables --- */
@media only screen and (max-width: 768px) {
    .card-status-history-driver {
        display: none;
    }

    .orders-filters {
        display: none;
    }

    .table-web {
        display: none;
    }
}

@media screen and (max-width: 520px) {
    li.page-item {
        display: none;
    }

    .page-item:first-child,
    .page-item:last-child,
    .page-item.active {
        display: block;
    }
}

/* --- Search & Maps Overlay Corrected --- */
.pac-container {
    background-color: #FFF;
    z-index: 1070;
    /* Fixed: was 100001 */
    position: fixed;
    float: left;
}

.modal {
    z-index: 1060;
    /* Fixed: was 100001 */
}

.modal-backdrop {
    z-index: 1050;
    /* Fixed: was 100000 */
}

.sticky {
    position: sticky;
    top: 88px;
    z-index: 1020;
}

/* --- Misc Components --- */
.nav-item-category {
    padding-bottom: 10px;
    padding-top: 8px;
}

.tabbable .nav-pills {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
}

.tabbable .nav-pills .nav-link {
    white-space: nowrap;
}

.testimonialCard {
    width: 90%;
}

.allergen {
    display: inline-flex;
    font-size: calc(0.875rem - 2px);
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 6px;
    background: #eee;
    color: #00bc8b;
    border-radius: 4px;
}

.itemsSearch .select2-container .select2-selection--single {
    height: 50px;
    line-height: 50px;
    border-radius: 25px;
    padding: 0 30px;
    background-color: #fafafa;
    border: 1px solid #eeeeee;
}

/* --- Fix Side Menu Icons & Avatars --- */
.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure Side Menu Items Don't Collapse Weirdly */
#ssidenav-main .navbar-nav .nav-link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   SIDEBAR CUSTOMIZATION (.custom-sidebar)
   ========================================= */

/* Icons - Force All White in Sidebar */
.custom-sidebar i {
    color: #ffffff !important;
    font-size: 1.1rem;
    min-width: 2.25rem;
}

.custom-sidebar .nav-link.active i {
    color: #ffffff !important;
    opacity: 1;
}

/* Sidebar Left Padding - Reduce to 2px */
.custom-sidebar.navbar-vertical {
    padding-left: 2px !important;
}

.custom-sidebar .navbar-nav {
    padding-left: 2px !important;
}

/* Premium Scrollbar for Sidebar */
.custom-sidebar::-webkit-scrollbar {
    width: 6px;
}

.custom-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.custom-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.custom-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c2185b 0%, #ad1457 100%);
    width: 8px;
}

/* Sidebar Width - 280px for Better Balance */
@media (min-width: 768px) {
    .custom-sidebar.navbar-vertical.navbar-expand-md {
        max-width: 280px;
    }

    .custom-sidebar.navbar-vertical.navbar-expand-md.fixed-left+.main-content {
        margin-left: 280px;
    }
}

/* Text Ellipsis for Long Names in Dropdowns */
.custom-sidebar .dropdown-toggle,
.custom-sidebar .dropdown-toggle span,
.custom-sidebar .dropdown-item,
.custom-sidebar h6,
.custom-sidebar p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Organization Switcher Button Text */
.custom-sidebar .dropdown-toggle .flex-grow-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User Profile Name & Email */
.custom-sidebar .avatar+.flex-grow-1 h6,
.custom-sidebar .avatar+.flex-grow-1 p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

/* Dropdown Menu Background - Match Dark Sidebar */
.custom-sidebar .dropdown-menu {
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}

.custom-sidebar .dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s ease !important;
}

.custom-sidebar .dropdown-item:hover {
    background: rgba(233, 30, 99, 0.15) !important;
    color: #ffffff !important;
}

.custom-sidebar .dropdown-header {
    color: rgba(255, 255, 255, 0.5) !important;
}

.custom-sidebar .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Perfect Icon Alignment in Stat Cards */
.icon-shape {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.icon-shape i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Force Sidebar Footer Dropdown to Open Upwards */
.custom-sidebar .mt-auto .dropdown-menu,
.custom-sidebar .dropdown-menu-up {
    top: auto !important;
    bottom: 100% !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
}

/* Ensure dropup arrow points correctly */
.custom-sidebar .mt-auto .dropdown-toggle i.ni-bold-up {
    transform: rotate(180deg);
}

/* =========================================
   11. MOBILE MENU FIXES (White bg issue)
   ========================================= */
@media (max-width: 768px) {

    /* Force mobile collapsible menu to use Dark Theme like Desktop */
    .navbar-vertical .navbar-collapse {
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
        /* Ensure it covers properly */
    }

    /* Fix Collapse Header (Brand & Close Button) */
    .navbar-collapse .navbar-collapse-header {
        background: transparent !important;
        /* Remove default white bg */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 1rem;
    }

    /* Close Button (X) - Make White */
    .navbar-collapse .navbar-toggler,
    .navbar-collapse .navbar-toggler span {
        color: #ffffff !important;
        background-color: #ffffff !important;
    }

    /* Navbar Toggler Icon (Hamburger) Color */
    .navbar-light .navbar-toggler-icon {
        background-image: url('data:image/svg+xml;charset=utf8,%3Csvg viewBox=\'0 0 30 30\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath stroke=\'rgba(255, 255, 255, 0.95)\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-miterlimit=\'10\' d=\'M4 7h22M4 15h22M4 23h22\'/%3E%3C/svg%3E') !important;
    }

    /* Ensure Links are White */
    .navbar-vertical .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.95) !important;
    }

    /* Fix Logo in Mobile Menu (Optional, ensure contrast) */
    .navbar-collapse .collapse-brand img {
        filter: brightness(0) invert(1);
        /* Force White Logo if needed */
    }
}

/* =========================================
   CHAT PAGE - HAMBURGER SIDEBAR (Collapsed by default)
   ========================================= */

/* When on chat page, collapse sidebar */
body.chat-page .navbar-vertical.navbar-expand-md {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 1100;
    transition: left 0.3s ease-in-out;
}

body.chat-page .navbar-vertical.navbar-expand-md.sidebar-open {
    left: 0;
}

/* Overlay when sidebar is open */
body.chat-page .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

body.chat-page .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main content area expands to full width on chat page */
body.chat-page .main-content {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Hamburger toggle button for chat page */
.chat-hamburger-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1090;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
    transition: all 0.3s ease;
}

.chat-hamburger-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.5);
}

.chat-hamburger-toggle svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Close button inside sidebar for chat page */
.sidebar-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.sidebar-close-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Hide default navbar toggler on chat page when our custom one is present */
body.chat-page .navbar-toggler {
    display: none !important;
}

/* Adjust chat list positioning when sidebar is collapsed */
body.chat-page #chatList {
    padding: 1.5rem;
    padding-left: 5rem;
    /* Space for hamburger button */
    max-width: 100%;
    margin: 0 auto;
}

/* Center the chat content better */
body.chat-page .container-fluid {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header adjustment for chat page */
body.chat-page .header {
    padding-top: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body.chat-page #chatList {
        padding: 1rem;
        padding-left: 4rem;
    }

    .chat-hamburger-toggle {
        width: 40px;
        height: 40px;
        top: 0.5rem;
        left: 0.5rem;
    }
}