/**
 * WASU Gateway - Unified Custom & Theme Stylesheet
 * Brand Theme: WhatsApp Elegant Green & High Contrast Dashboard
 */

:root {
    --bs-primary: #00a884;
    --bs-primary-rgb: 0, 168, 132;
    --bs-link-color: #00a884;
    --bs-link-hover-color: #075e54;
}

/* ==========================================================================
   1. Global Base & Card Styles
   ========================================================================== */
body {
    color: #334155;
    background-color: #f1f5f9;
}

.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.card-header {
    color: #0f172a;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: #0f172a;
}

/* ==========================================================================
   2. High-Specificity Utility Text & Background Colors
   ========================================================================== */
.text-primary { color: #00a884 !important; }
.text-success { color: #10b981 !important; }
.text-danger  { color: #ef4444 !important; }
.text-warning { color: #f59e0b !important; }
.text-info    { color: #0891b2 !important; }
.text-dark    { color: #0f172a !important; }
.text-white   { color: #ffffff !important; }
.text-secondary, .text-muted { color: #64748b !important; }

.border-primary { border-color: #00a884 !important; }

/* Primary Button & Outline Overrides */
.btn-primary {
    background-color: #00a884 !important;
    border-color: #00a884 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 168, 132, 0.25);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #008f6f !important;
    border-color: #008f6f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.35);
}
.btn-outline-primary {
    color: #00a884 !important;
    border-color: #00a884 !important;
}
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: #00a884 !important;
    border-color: #00a884 !important;
    color: #ffffff !important;
}

/* Form Inputs Focus Ring */
.form-control:focus, .form-select:focus {
    border-color: #00a884 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 168, 132, 0.2) !important;
}

/* ==========================================================================
   3. Essential Gradient & Background Helpers with Contrast Guarantees
   ========================================================================== */
.bg-gradient-primary {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%) !important;
    color: #ffffff !important;
}
.bg-gradient-primary h1, .bg-gradient-primary h2, .bg-gradient-primary h3, 
.bg-gradient-primary h4, .bg-gradient-primary h5, .bg-gradient-primary h6, 
.bg-gradient-primary p, .bg-gradient-primary small {
    color: #ffffff !important;
}

/* Explicit overrides for nested white cards & badges in gradient banners */
.bg-gradient-primary .bg-white {
    background-color: #ffffff !important;
    color: #1e293b !important;
}
.bg-gradient-primary .bg-white small,
.bg-gradient-primary .bg-white .text-secondary {
    color: #64748b !important;
}
.bg-gradient-primary .bg-white .text-primary,
.bg-gradient-primary .badge.bg-white.text-primary {
    color: #00a884 !important;
}
.bg-gradient-primary .bg-white .text-dark,
.bg-gradient-primary .bg-white span {
    color: #1e293b !important;
}
.bg-gradient-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    color: #ffffff !important;
}
.bg-gradient-danger {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%) !important;
    color: #ffffff !important;
}
.bg-gradient-warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
    color: #ffffff !important;
}
.bg-gradient-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   4. High-Priority Badges & White Component Overrides
   ========================================================================== */
.badge.bg-primary {
    background-color: #00a884 !important;
    color: #ffffff !important;
}
.badge.bg-white,
.badge.bg-white.text-primary,
.bg-white.text-primary,
.card .badge.bg-white,
.card .badge.bg-white.text-primary {
    background-color: #ffffff !important;
    color: #00a884 !important;
}
.badge.bg-white *,
.badge.bg-white.text-primary *,
.badge.bg-white i,
.badge.bg-white span,
.card .badge.bg-white *,
.card .badge.bg-white.text-primary * {
    color: #00a884 !important;
}
.badge.bg-white.text-success, .badge.bg-white.text-success *, .card .badge.bg-white.text-success * { color: #10b981 !important; }
.badge.bg-white.text-danger,  .badge.bg-white.text-danger *,  .card .badge.bg-white.text-danger *  { color: #ef4444 !important; }
.badge.bg-white.text-warning, .badge.bg-white.text-warning *, .card .badge.bg-white.text-warning * { color: #d97706 !important; }
.badge.bg-white.text-info,    .badge.bg-white.text-info *,    .card .badge.bg-white.text-info *    { color: #0891b2 !important; }
.badge.bg-white.text-dark,    .badge.bg-white.text-dark *,    .card .badge.bg-white.text-dark *    { color: #0f172a !important; }

/* Buttons with White Background */
.btn-white,
.btn-white.text-primary,
.card .btn-white {
    background-color: #ffffff !important;
    color: #00a884 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.btn-white *,
.btn-white.text-primary *,
.card .btn-white * {
    color: #00a884 !important;
}
.btn-white:hover {
    background-color: #f8fafc !important;
    color: #075e54 !important;
}
.btn-white:hover * {
    color: #075e54 !important;
}

/* Widgets Icon Palette Helpers */
.widgets-icons {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    font-size: 22px;
    border-radius: 12px;
}
.bg-light-primary { background-color: rgba(0, 168, 132, 0.1) !important; color: #00a884 !important; }
.bg-light-success { background-color: rgba(16, 185, 129, 0.1) !important; color: #10b981 !important; }
.bg-light-danger  { background-color: rgba(239, 68, 68, 0.1) !important; color: #ef4444 !important; }
.bg-light-warning { background-color: rgba(245, 158, 11, 0.1) !important; color: #d97706 !important; }
.bg-light-info    { background-color: rgba(6, 182, 212, 0.1) !important; color: #0891b2 !important; }
.bg-light-purple  { background-color: rgba(147, 51, 234, 0.1) !important; color: #9333ea !important; }

/* ==========================================================================
   5. Sidebar Navigation & Metismenu Hover States
   ========================================================================== */
.sidebar-wrapper .metismenu a:hover,
.sidebar-wrapper .metismenu a:focus,
.sidebar-wrapper .metismenu a:active,
.sidebar-wrapper .metismenu .mm-active > a,
.sidebar-wrapper .metismenu a.active,
.sidebar-wrapper .metismenu li:hover > a,
.sidebar-wrapper .metismenu ul a:hover,
.sidebar-wrapper .metismenu ul .mm-active > a,
html.light-theme .sidebar-wrapper .metismenu a:hover,
html.light-theme .sidebar-wrapper .metismenu a:focus,
html.light-theme .sidebar-wrapper .metismenu a:active,
html.light-theme .sidebar-wrapper .metismenu .mm-active > a,
html.light-theme .sidebar-wrapper .metismenu a.active,
html.light-theme .sidebar-wrapper .metismenu li:hover > a,
html.light-theme .sidebar-wrapper .metismenu ul a:hover,
html.light-theme .sidebar-wrapper .metismenu ul .mm-active > a {
    color: #00a884 !important;
    background-color: rgba(0, 168, 132, 0.08) !important;
    border-left: 4px solid #00a884 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.sidebar-wrapper .metismenu a:hover .parent-icon,
.sidebar-wrapper .metismenu a:focus .parent-icon,
.sidebar-wrapper .metismenu a:active .parent-icon,
.sidebar-wrapper .metismenu .mm-active > a .parent-icon,
.sidebar-wrapper .metismenu a.active .parent-icon,
.sidebar-wrapper .metismenu li:hover > a .parent-icon,
.sidebar-wrapper .metismenu a:hover i,
.sidebar-wrapper .metismenu .mm-active > a i,
.sidebar-wrapper .metismenu a.active i,
html.light-theme .sidebar-wrapper .metismenu a:hover .parent-icon,
html.light-theme .sidebar-wrapper .metismenu .mm-active > a .parent-icon,
html.light-theme .sidebar-wrapper .metismenu a.active .parent-icon,
html.light-theme .sidebar-wrapper .metismenu a:hover i,
html.light-theme .sidebar-wrapper .metismenu .mm-active > a i,
html.light-theme .sidebar-wrapper .metismenu a.active i {
    color: #00a884 !important;
}

.sidebar-wrapper .metismenu .has-arrow:after,
.sidebar-wrapper .metismenu a:hover.has-arrow:after,
.sidebar-wrapper .metismenu .mm-active > a.has-arrow:after,
html.light-theme .sidebar-wrapper .metismenu .has-arrow:after,
html.light-theme .sidebar-wrapper .metismenu a:hover.has-arrow:after,
html.light-theme .sidebar-wrapper .metismenu .mm-active > a.has-arrow:after {
    border-color: #00a884 !important;
}

/* ==========================================================================
   5. Sidebar & Topbar Stacking, Responsive & Navigation Styles
   ========================================================================== */

/* Base Header & Sidebar Stacking Context */
.top-header .navbar {
    z-index: 1000 !important;
}

.sidebar-wrapper {
    z-index: 1000 !important;
}

.sidebar-wrapper .sidebar-header {
    z-index: 10 !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #ffffff !important;
}

html.dark-theme .sidebar-wrapper .sidebar-header {
    background-color: #182235 !important;
}

.sidebar-wrapper .metismenu {
    margin-top: 0 !important;
    padding: 10px 12px 25px 12px !important;
}

.sidebar-wrapper .metismenu li.menu-label:first-child,
.sidebar-wrapper .metismenu li:first-child {
    margin-top: 0 !important;
    padding-top: 5px !important;
}

/* Desktop Mode (>= 1200px): Hide Mobile Toggles completely */
@media screen and (min-width: 1200px) {
    .mobile-toggle-icon,
    .sidebar-wrapper .sidebar-header .toggle-icon {
        display: none !important;
    }
}

/* Mobile & Tablet Mode (< 1200px): Style and Show Toggles */
@media screen and (max-width: 1199.98px) {
    .mobile-toggle-icon {
        width: 38px !important;
        height: 38px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
        background-color: rgba(0, 168, 132, 0.1) !important;
        color: #00a884 !important;
        cursor: pointer !important;
        font-size: 22px !important;
        transition: all 0.2s ease !important;
        flex-shrink: 0 !important;
    }

    .mobile-toggle-icon:hover {
        background-color: #00a884 !important;
        color: #ffffff !important;
    }

    .sidebar-wrapper .sidebar-header .toggle-icon {
        font-size: 18px !important;
        width: 34px !important;
        height: 34px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 8px !important;
        background-color: rgba(0, 168, 132, 0.1) !important;
        color: #00a884 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    .sidebar-wrapper .sidebar-header .toggle-icon:hover {
        background-color: #00a884 !important;
        color: #ffffff !important;
    }
}

/* Mobile & Tablet Sidebar Navigation (< 1199px) */
@media screen and (max-width: 1198.98px) {
    .sidebar-wrapper {
        left: -300px !important;
        transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
        box-shadow: none;
    }
    
    .top-header .navbar {
        left: 0 !important;
    }
    
    .page-content {
        margin-left: 0 !important;
    }

    .wrapper.toggled .sidebar-wrapper {
        left: 0 !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2) !important;
        z-index: 1045 !important;
    }

    .wrapper .overlay {
        display: none;
    }

    .wrapper.toggled .overlay {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(15, 23, 42, 0.5) !important;
        backdrop-filter: blur(2px) !important;
        z-index: 1040 !important;
        cursor: pointer !important;
    }
}

/* Ensure sidebar is always pinned & open on desktop (>= 1199px) */
@media screen and (min-width: 1199px) {
    .sidebar-wrapper {
        left: 0 !important;
        width: 260px !important;
        position: fixed !important;
    }
    .top-header .navbar {
        left: 260px !important;
    }
    .page-content {
        margin-left: 260px !important;
    }
    .wrapper.toggled .sidebar-wrapper {
        left: 0 !important;
        width: 260px !important;
    }
    .wrapper.toggled .top-header .navbar {
        left: 260px !important;
    }
    .wrapper.toggled .page-content {
        margin-left: 260px !important;
    }
    .wrapper.toggled .sidebar-wrapper .sidebar-header .logo-text,
    .wrapper.toggled .sidebar-wrapper .metismenu .menu-title,
    .wrapper.toggled .sidebar-wrapper .metismenu li.menu-label {
        display: block !important;
    }
    .sidebar-wrapper .sidebar-header .toggle-icon {
        display: none !important;
    }
    .overlay {
        display: none !important;
    }
}

.sidebar-wa-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
    color: #ffffff !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: none !important;
}

/* ==========================================================================
   6. Topbar, Avatar & Refresh Animation (Pace Loader)
   ========================================================================== */
.pace .pace-progress {
    background: #00a884 !important;
    position: fixed;
    z-index: 2000;
    top: 0;
    right: 100%;
    width: 100%;
    height: 3px;
}
.pace .pace-progress-inner {
    box-shadow: 0 0 10px #25d366, 0 0 5px #00a884 !important;
}
.pace .pace-activity {
    display: none !important;
}

.header-refresh-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 168, 132, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.header-refresh-badge:hover {
    background: rgba(0, 168, 132, 0.16);
}
.header-refresh-badge i {
    color: #00a884 !important;
}
.spin-once {
    animation: rotate-once 0.75s cubic-bezier(0.4, 0, 0.2, 1) 1 forwards;
}
@keyframes rotate-once {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.user-initial-avatar {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.user-initial-avatar-sm {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    font-size: 13px !important;
}

/* ==========================================================================
   7. Radius & UI Helper Utilities
   ========================================================================== */
.radius-8  { border-radius: 8px !important; }
.radius-10 { border-radius: 10px !important; }
.radius-12 { border-radius: 12px !important; }
.radius-16 { border-radius: 16px !important; }

.btn-modern {
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

/* ==========================================================================
   8. Authentication & Wizard Shared Layouts (Login, 2FA, Setup)
   ========================================================================== */
.authentication-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.login-card {
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 900px;
    width: 100%;
}

.totp-input, .token-input {
    letter-spacing: 0.5rem;
    font-size: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* Setup Wizard */
.setup-container {
    max-width: 780px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    margin: 0 auto 8px;
    transition: all 0.3s ease;
}
.step-active .step-circle {
    background-color: #00a884;
    color: #fff;
    box-shadow: 0 0.5rem 1rem rgba(0, 168, 132, 0.25);
}
.step-done .step-circle {
    background-color: #128c7e;
    color: #fff;
}
.step-pending .step-circle {
    background-color: #e9ecef;
    color: #6c757d;
}
.step-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   9. Dark Theme Overrides for Maximum Contrast
   ========================================================================== */
html.dark-theme body {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}
html.dark-theme .card {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html.dark-theme h1, html.dark-theme h2, html.dark-theme h3, 
html.dark-theme h4, html.dark-theme h5, html.dark-theme h6,
html.dark-theme .text-dark {
    color: #f8fafc !important;
}
html.dark-theme .text-secondary, html.dark-theme .text-muted {
    color: #94a3b8 !important;
}
html.dark-theme .card-header {
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html.dark-theme .top-header .navbar {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html.dark-theme .sidebar-wrapper,
html.dark-theme .sidebar-wrapper .sidebar-header {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html.dark-theme .sidebar-wrapper .metismenu a {
    color: #cbd5e1 !important;
}
html.dark-theme .sidebar-wrapper .metismenu a:hover,
html.dark-theme .sidebar-wrapper .metismenu .mm-active > a,
html.dark-theme .sidebar-wrapper .metismenu a.active {
    color: #25d366 !important;
    background-color: rgba(37, 211, 102, 0.12) !important;
}
html.dark-theme .sidebar-wrapper .metismenu a:hover .parent-icon,
html.dark-theme .sidebar-wrapper .metismenu .mm-active > a .parent-icon,
html.dark-theme .sidebar-wrapper .metismenu a.active .parent-icon {
    color: #25d366 !important;
}
html.dark-theme .sidebar-wrapper .metismenu .mm-active > a {
    border-left: 4px solid #25d366 !important;
}
html.dark-theme .table {
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html.dark-theme .table th {
    color: #94a3b8 !important;
}
html.dark-theme .form-control,
html.dark-theme .form-select {
    background-color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}
html.dark-theme .modal-content {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}
html.dark-theme .modal-header,
html.dark-theme .modal-footer {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   10. Sizing, Typography & Layout Helpers
   ========================================================================== */
.fs-8  { font-size: 8px !important; }
.fs-10 { font-size: 10px !important; }
.fs-11 { font-size: 11px !important; }
.fs-12 { font-size: 12px !important; }
.fs-13 { font-size: 13px !important; }
.fs-14 { font-size: 14px !important; }

.icon-box-60 { width: 60px !important; height: 60px !important; font-size: 28px !important; }
.icon-box-64 { width: 64px !important; height: 64px !important; font-size: 32px !important; }
.icon-box-70 { width: 70px !important; height: 70px !important; font-size: 32px !important; }
.icon-box-80 { width: 80px !important; height: 80px !important; font-size: 36px !important; }

.qr-preview-img { width: 180px !important; height: 180px !important; }
.max-w-450 { max-width: 450px !important; width: 100% !important; }
.max-w-460 { max-width: 460px !important; width: 100% !important; }
.max-w-480 { max-width: 480px !important; width: 100% !important; }
.max-w-650 { max-width: 650px !important; width: 100% !important; }
.max-w-200 { max-width: 200px !important; }
.max-w-250 { max-width: 250px !important; }

/* ==========================================================================
   11. Breadcrumbs & Page Header Styling
   ========================================================================== */
a {
    color: #00a884;
}
a:hover {
    color: #075e54;
}

.breadcrumb-item a,
.breadcrumb-item a i,
.breadcrumb-item a .bx,
.breadcrumb-item a .bi,
.page-breadcrumb .breadcrumb-item a,
.page-breadcrumb .breadcrumb-item a i,
.page-breadcrumb .breadcrumb-item a .bx,
.page-breadcrumb .breadcrumb-item a .bi {
    color: #00a884 !important;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover,
.breadcrumb-item a:hover i,
.breadcrumb-item a:hover .bx,
.breadcrumb-item a:hover .bi,
.page-breadcrumb .breadcrumb-item a:hover,
.page-breadcrumb .breadcrumb-item a:hover i,
.page-breadcrumb .breadcrumb-item a:hover .bx,
.page-breadcrumb .breadcrumb-item a:hover .bi {
    color: #075e54 !important;
}

.page-breadcrumb .breadcrumb-title {
    color: #0f172a;
    font-weight: 600;
}

html.dark-theme a {
    color: #25d366;
}
html.dark-theme a:hover {
    color: #00a884;
}

html.dark-theme .page-breadcrumb .breadcrumb-title {
    color: #f8fafc !important;
}

html.dark-theme .breadcrumb-item a,
html.dark-theme .breadcrumb-item a i,
html.dark-theme .breadcrumb-item a .bx,
html.dark-theme .breadcrumb-item a .bi,
html.dark-theme .page-breadcrumb .breadcrumb-item a,
html.dark-theme .page-breadcrumb .breadcrumb-item a i,
html.dark-theme .page-breadcrumb .breadcrumb-item a .bx,
html.dark-theme .page-breadcrumb .breadcrumb-item a .bi {
    color: #25d366 !important;
}

html.dark-theme .breadcrumb-item a:hover,
html.dark-theme .breadcrumb-item a:hover i,
html.dark-theme .page-breadcrumb .breadcrumb-item a:hover,
html.dark-theme .page-breadcrumb .breadcrumb-item a:hover i {
    color: #00a884 !important;
}

/* ==========================================================================
   12. Highest Z-Index Stacking for Topbar & User Profile Dropdown
   ========================================================================== */
.top-header {
    z-index: 1000 !important;
    position: relative;
}

.top-header .navbar {
    z-index: 1000 !important;
}

.dropdown-user-setting,
.top-header .navbar .dropdown-user-setting {
    z-index: 1010 !important;
    position: relative;
}

.dropdown-user-setting .dropdown-menu,
.top-header .navbar .dropdown-user-setting .dropdown-menu,
.dropdown-menu.dropdown-menu-end {
    z-index: 1020 !important;
    position: absolute !important;
}

/* ==========================================================================
   13. SweetAlert2 Theme Styling (WhatsApp Brand Green Palette)
   ========================================================================== */
.swal2-popup {
    border-radius: 16px !important;
    font-family: inherit !important;
    padding: 1.75rem !important;
}

.swal2-styled.swal2-confirm {
    background-color: #00a884 !important;
    border-color: #00a884 !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.6rem !important;
    font-size: 0.95rem !important;
    box-shadow: 0 2px 8px rgba(0, 168, 132, 0.3) !important;
}

.swal2-styled.swal2-confirm:hover,
.swal2-styled.swal2-confirm:focus,
.swal2-styled.swal2-confirm:active {
    background-color: #008f6f !important;
    border-color: #008f6f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 168, 132, 0.4) !important;
}

.swal2-styled.swal2-cancel {
    background-color: #64748b !important;
    border-color: #64748b !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.6rem !important;
    font-size: 0.95rem !important;
}

.swal2-styled.swal2-cancel:hover {
    background-color: #475569 !important;
    border-color: #475569 !important;
}

.swal2-icon.swal2-success {
    border-color: #00a884 !important;
    color: #00a884 !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #00a884 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border: .25em solid rgba(0, 168, 132, 0.25) !important;
}

/* ==========================================================================
   14. Eliminate Any Remaining Purple Theme Elements
   ========================================================================== */
.text-purple {
    color: #00a884 !important;
}

.bg-purple, .bg-light-purple {
    background-color: rgba(0, 168, 132, 0.12) !important;
    color: #00a884 !important;
}

/* ==========================================================================
   15. Responsive & Mobile Layout Enhancements (Devices & Modals)
   ========================================================================== */
.device-item .btn-sm {
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
}

.device-item .btn-action-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    padding: 0 !important;
    font-size: 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
}

@media (max-width: 767.98px) {
    .device-item .card-body {
        padding: 1rem !important;
    }
    
    .device-item .widgets-icons {
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
    }
    
    .device-item h5 {
        font-size: 0.98rem !important;
    }
    
    .device-item .badge {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.55rem !important;
    }

    .device-item .btn-sm {
        height: 34px !important;
        padding: 0.35rem 0.6rem !important;
        font-size: 0.82rem !important;
    }

    .device-item .btn-action-icon {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        padding: 0 !important;
        font-size: 0.95rem !important;
    }

    .qr-container {
        width: 230px !important;
        height: 230px !important;
    }
    
    .qr-container img {
        width: 200px !important;
        height: 200px !important;
    }

    .page-breadcrumb .breadcrumb-title {
        font-size: 1.15rem !important;
        border-right: none !important;
        padding-right: 0 !important;
    }
}

/* ==========================================================================
   14. Back To Top Button (WhatsApp Green Primary Theme)
   ========================================================================== */
.back-to-top {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 42px !important;
    height: 42px !important;
    line-height: 42px !important;
    text-align: center !important;
    font-size: 24px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #00a884 0%, #008f6f 100%) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 14px rgba(0, 168, 132, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: none;
    z-index: 99 !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.back-to-top i {
    line-height: 42px !important;
    font-size: 24px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    color: #ffffff !important;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #06cf9c 0%, #00a884 100%) !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(0, 168, 132, 0.55) !important;
}

.back-to-top:active {
    transform: translateY(0) scale(0.95) !important;
}


