/* ============================================
   SMM PANEL MODERN THEME - LIGHT & DARK MODE
   ============================================ */

/* ===========================================
   TABLE OF CONTENTS
   ===========================================
   1. CSS VARIABLES & THEME SETUP (Lines 10-150)
   2. BASE/RESET STYLES (Lines 152-190)
   3. TYPOGRAPHY (Lines 192-210)
   4. LAYOUT - NAVBAR (Lines 212-540)
   5. LAYOUT - CARDS & PANELS (Lines 542-640)
   6. COMPONENTS - BUTTONS (Lines 642-1040)
   7. COMPONENTS - FORMS (Lines 1042-1180)
   8. COMPONENTS - TABLES (Lines 1182-1210)
   9. COMPONENTS - ALERTS (Lines 1212-1240)
   10. COMPONENTS - DROPDOWNS (Lines 1242-1310)
   11. COMPONENTS - BADGES & LABELS (Lines 1312-1450)
   12. COMPONENTS - MODALS (Lines 1452-1490)
   13. COMPONENTS - SERVICE CARDS (Lines 1492-1590)
   14. COMPONENTS - STATS CARDS (Lines 1592-1650)
   15. COMPONENTS - NAV TABS & PILLS (Lines 1652-1710)
   16. THIRD-PARTY - SELECT2 OVERRIDES (Lines 1712-1780)
   17. UTILITIES & HELPERS (Lines 1782-1890)
   18. ANIMATIONS & TRANSITIONS (Lines 1892-1950)
   19. DARK THEME OVERRIDES (Lines 1952-2050)
   20. RESPONSIVE/MEDIA QUERIES (Lines 2052-2080)
   21. RTL SUPPORT (Lines 2082-2110)
   =========================================== */

/* ============================================
   1. CSS VARIABLES & THEME SETUP
   ============================================ */

:root {
    /* Brand Colors - New Palette */
    --primary: #1E9E74;
    --primary-dark: #188660;
    --primary-light: #29B885;
    --primary-rgb: 30, 158, 116;
    
    --secondary: #29B885;
    --secondary-dark: #22A571;
    --secondary-light: #3ED2A0;
    --secondary-rgb: 41, 184, 133;
    
    --accent: #1E9E74;
    --accent-dark: #188660;
    --accent-light: #29B885;
    --accent-rgb: 30, 158, 116;
    
    --turquoise: #29B885;
    --turquoise-dark: #1E9E74;
    --turquoise-light: #3ED2A0;
    --turquoise-rgb: 41, 184, 133;
    
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* Light Theme Colors - Glassmorphism */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 1);
    --bg-hover: rgba(248, 250, 252, 0.9);
    --bg-active: rgba(226, 232, 240, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-dark: rgba(248, 250, 252, 0.8);
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: #cbd5e1;
    
    --shadow-sm: 0 2px 8px 0 rgba(30, 158, 116, 0.08);
    --shadow-md: 0 4px 12px -1px rgba(30, 158, 116, 0.12), 0 2px 6px -2px rgba(41, 184, 133, 0.08);
    --shadow-lg: 0 10px 25px -3px rgba(30, 158, 116, 0.15), 0 4px 10px -4px rgba(41, 184, 133, 0.1);
    --shadow-xl: 0 20px 35px -5px rgba(30, 158, 116, 0.2), 0 8px 15px -6px rgba(41, 184, 133, 0.15);
    --shadow-glass: 0 8px 32px 0 rgba(30, 158, 116, 0.25);
    
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 100%);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-blur: blur(10px);
    
    /* Badge colors */
    --badge-slow: linear-gradient(145deg, #d1d5db, #e5e7eb);
    --badge-danger: linear-gradient(135deg, #ff6b6b, #ee5353);
    --badge-danger-hover: linear-gradient(135deg, #ff8787, #ff6b6b);
    
    /* Button gradients */
    --btn-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --btn-success-hover: linear-gradient(135deg, #059669 0%, #047857 100%);
    --btn-danger: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    
    /* Gradients - Modern 2025 */
    --gradient-primary: linear-gradient(145deg, #1E9E74 0%, #29B885 50%, #1E9E74 100%);
    --gradient-secondary: linear-gradient(135deg, #29B885 0%, #3ED2A0 100%);
    --gradient-hero: linear-gradient(135deg, #1E9E74 0%, #29B885 35%, #3ED2A0 70%, #29B885 100%);
    --gradient-mesh: radial-gradient(at 40% 20%, #29B885 0px, transparent 50%),
                     radial-gradient(at 80% 0%, #3ED2A0 0px, transparent 50%),
                     radial-gradient(at 10% 50%, #1E9E74 0px, transparent 50%),
                     radial-gradient(at 80% 80%, #29B885 0px, transparent 50%),
                     radial-gradient(at 0% 100%, #3ED2A0 0px, transparent 50%);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    /* Dark backgrounds - Palette gris neutre uniforme */
    --bg-primary: #0f1114;
    --bg-secondary: #1a1d23;
    --bg-tertiary: #252830;
    --bg-card: #1a1d23; /* Made fully opaque for dropdown fix */
    --bg-hover: rgba(37, 40, 48, 0.9);
    --bg-active: rgba(48, 51, 60, 0.9);
    --bg-glass: rgba(26, 29, 35, 0.6);
    --bg-glass-dark: rgba(15, 17, 20, 0.8);
    
    --text-primary: #e8edf5;
    --text-secondary: #b8c5d6;
    --text-tertiary: #8896a8;
    --text-inverse: #0a0e1a;
    
    --border-color: rgba(138, 150, 168, 0.2);
    --border-light: rgba(184, 197, 214, 0.2);
    --border-dark: rgba(20, 25, 37, 0.3);
    
    /* ===== PALETTE VERTE COHÉRENTE POUR DARK MODE ===== */
    /* Basée sur HSL(160°, saturation variable, luminosité progressive) */
    
    /* Échelle de verts harmonieux */
    --green-900: #0a1f18;  /* Plus sombre - backgrounds profonds */
    --green-800: #0d2a20;  /* Très sombre - sidebar end */
    --green-700: #10362a;  /* Sombre - sidebar start */
    --green-600: #144335;  /* Moyennement sombre - navbar */
    --green-500: #185040;  /* Moyen - couleur principale */
    --green-400: #1d5e4c;  /* Moyen clair - hover states */
    --green-300: #226d58;  /* Clair - accents */
    --green-200: #287c65;  /* Plus clair - highlights */
    --green-100: #2e8b72;  /* Très clair - special effects */
    
    /* Application aux variables fonctionnelles */
    --primary-dark-mode: var(--green-500);        /* #185040 - Principal */
    --primary-dark-mode-hover: var(--green-400);  /* #1d5e4c - Hover */
    --primary-dark-mode-light: var(--green-300);  /* #226d58 - Accents */
    
    /* Gradients utilisant la palette cohérente */
    --gradient-primary-dark: linear-gradient(135deg, var(--green-500) 0%, var(--green-400) 100%);
    --gradient-primary-dark-hover: linear-gradient(135deg, var(--green-400) 0%, var(--green-300) 100%);
    
    /* Sidebar - Utilise les tons 700-800 */
    --bg-sidebar-start: var(--green-700);  /* #10362a */
    --bg-sidebar-end: var(--green-800);    /* #0d2a20 */
    --gradient-sidebar: linear-gradient(180deg, var(--bg-sidebar-start) 0%, var(--bg-sidebar-end) 100%);
    
    /* Navbar - Utilise les tons 600-500 */
    --navbar-dark-start: var(--green-600);    /* #144335 */
    --navbar-dark-middle: var(--green-500);   /* #185040 */
    --gradient-navbar-dark: linear-gradient(145deg, var(--navbar-dark-start) 0%, var(--navbar-dark-middle) 50%, var(--navbar-dark-start) 100%);
    
    /* Dark theme shadows with color tint */
    --shadow-sm: 0 2px 8px 0 rgba(30, 158, 116, 0.1);
    --shadow-md: 0 4px 12px -1px rgba(30, 158, 116, 0.15);
    --shadow-lg: 0 10px 25px -3px rgba(30, 158, 116, 0.2);
    --shadow-xl: 0 20px 35px -5px rgba(41, 184, 133, 0.25);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    
    --glass-bg: linear-gradient(135deg, rgba(20, 25, 37, 0.6) 0%, rgba(30, 37, 48, 0.3) 100%);
    --glass-border: rgba(138, 150, 168, 0.18);
    --glass-blur: blur(12px);
}

/* ============================================
   2. BASE/RESET STYLES
   ============================================ */

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    transition: background-color 0.2s ease, color 0.2s ease;
    /*overflow-x: hidden;
    position: relative;*/
    margin: 0;
    padding: 0;
}

/* Remove default focus outlines */
/**:focus {
    outline: none !important;
}*/

/* Add subtle animation to panels on load */
.panel, .well, .row {
    /*animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;*/
}

.panel:nth-child(2) { animation-delay: 0.1s; }
.panel:nth-child(3) { animation-delay: 0.2s; }
.panel:nth-child(4) { animation-delay: 0.3s; }

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 0;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

a:focus {
    color: var(--primary-dark);
    text-decoration: none !important;
    border-radius: 4px;
}

a:active {
    color: var(--primary-dark);
    text-decoration: none !important;
}

/* ============================================
   4. LAYOUT - NAVBAR
   ============================================ */

/* Main Navbar Styles */
.navbar {
    background: var(--gradient-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(30, 158, 116, 0.15), 
                0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000; /* Added for proper dropdown stacking */
    /*overflow: visible;*/
    /*backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);*/
    /*min-height: 60px;
    align-items: center;*/
}

/* Transition wave at navbar bottom */
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.6) 25%, 
        rgba(62, 210, 160, 0.8) 50%, 
        rgba(255, 255, 255, 0.6) 75%, 
        transparent 100%);
    /*animation: wave-slide 3s linear infinite;*/
}

/* Shine effect */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    /*animation: shine 8s infinite;*/
}

/* Dark mode navbar */
[data-theme="dark"] .navbar {
    background: var(--gradient-navbar-dark);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4),
                0 2px 15px rgba(30, 158, 116, 0.1);
    /*backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);*/
}

/* Navbar Header */
/*.navbar-header {
    min-height: 60px;
    display: flex;
    align-items: center;
}*/

/* Navbar Brand */
.navbar-brand {
    /*font-size: 1.1rem;*/
    font-weight: 600;
    color: white !important;
    /*height: 60px;*/
    padding: 1px 50px 1px 30px;
    /*display: flex;
    align-items: center;*/
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.navbar-brand img {
    height: 35px;
    filter: brightness(0) invert(1);
}

/* Navbar Navigation */
.navbar-nav {
    /*display: flex;
    align-items: center;*/
    /*height: 60px;
    margin: 0;*/
}

.navbar-default .navbar-nav > li {
    /*display: flex;*/
    /*align-items: center;*/
    /*height: 100%;*/
    /*position: relative;*/
    transition: all 0.3s ease;
}

.navbar-default .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    /*padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;*/
    transition: color 0.3s ease, text-shadow 0.3s ease;
    /*position: relative;*/
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hover effect on li - exclude theme toggle and balance dropdown */
.navbar-default .navbar-nav > li:not(.theme-toggle-wrapper):not(.dropdown-currencies)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.navbar-default .navbar-nav > li:not(.theme-toggle-wrapper):not(.dropdown-currencies):hover::before {
    opacity: 1;
}

.navbar-default .navbar-nav > li:not(.theme-toggle-wrapper):not(.dropdown-currencies):hover > a {
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* No hover effects for theme toggle and balance dropdown */
.navbar-default .navbar-nav > li.theme-toggle-wrapper::before,
.navbar-default .navbar-nav > li.dropdown-currencies::before,
.navbar-default .navbar-nav > li.dropdown.dropdown-currencies::before {
    display: none !important;
    opacity: 0 !important;
    content: none !important;
}

.navbar-default .navbar-nav > li.theme-toggle-wrapper:hover,
.navbar-default .navbar-nav > li.dropdown-currencies:hover,
.navbar-default .navbar-nav > li.dropdown.dropdown-currencies:hover {
    background: transparent !important;
}

.navbar-default .navbar-nav > li.theme-toggle-wrapper:hover::before,
.navbar-default .navbar-nav > li.dropdown-currencies:hover::before,
.navbar-default .navbar-nav > li.dropdown.dropdown-currencies:hover::before {
    opacity: 0 !important;
    display: none !important;
    content: none !important;
}

/* Navbar link hover and focus states - Fix black text issue */
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    color: var(--text-inverse) !important;
    background-color: rgba(30, 158, 116, 0.08) !important;
    text-shadow: 0 0 10px rgba(30, 158, 116, 0.3);
}

/* Active/current page link */
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
    color: var(--primary) !important;
    background-color: rgba(30, 158, 116, 0.12) !important;
    font-weight: 600;
}

/* Dropdown menu items */
.navbar-default .navbar-nav .dropdown-menu > li > a {
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

.navbar-default .navbar-nav .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .dropdown-menu > li > a:focus {
    color: var(--primary) !important;
    background-color: rgba(30, 158, 116, 0.08) !important;
}

/* Dropdown menu active item */
.navbar-default .navbar-nav .dropdown-menu > .active > a,
.navbar-default .navbar-nav .dropdown-menu > .active > a:hover,
.navbar-default .navbar-nav .dropdown-menu > .active > a:focus {
    color: var(--text-inverse) !important;
    background-color: var(--primary) !important;
}

/* Also prevent hover on the balance dropdown link */
.navbar-default .navbar-nav > li.dropdown-currencies > a:hover,
.navbar-default .navbar-nav > li.dropdown-currencies > a:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Ensure no background change on dropdown currencies */
.navbar-default .navbar-nav > li.dropdown.dropdown-currencies {
    background: transparent !important;
}

.navbar-default .navbar-nav > li.dropdown.dropdown-currencies:hover {
    background: transparent !important;
    background-color: transparent !important;
}

/* Fix dropdown-currencies z-index issue with sidebar */
.dropdown-currencies {
    position: static; /* Remove relative positioning to allow fixed positioning of child */
}

/* Use fixed positioning to escape sidebar overflow */
.sidebar-balance .dropdown-currencies .dropdown-menu {
    position: fixed !important;
    z-index: 10002; /* Ensure dropdown menu is above everything */
    /* Will need JavaScript to position correctly */
}

/* Open dropdown menu items */
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 8px;
}

/* Dark theme open dropdown */
[data-theme="dark"] .navbar-default .navbar-nav > .open > a,
[data-theme="dark"] .navbar-default .navbar-nav > .open > a:hover,
[data-theme="dark"] .navbar-default .navbar-nav > .open > a:focus {
    background: rgba(255, 255, 255, 0.05) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Active menu item */
.navbar-default .navbar-nav > li.active {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
    background-color: transparent !important;
    color: white !important;
    position: relative;
}

/* Active indicator */
.navbar-default .navbar-nav > li.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0%;
    right: 0%;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 -2px 10px rgba(41, 184, 133, 0.4);
    transition: all 0.3s ease;
    /*animation: glow-pulse 2s ease-in-out infinite;*/
    z-index: 1;
}

.navbar-default .navbar-nav > li.active:hover::after {
    /*left: 5%;
    right: 5%;*/
}

/* Navbar toggle button */
.navbar-default .navbar-toggle {
    border-color: rgba(255, 255, 255, 0.3);
    margin:13px;
}

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-default .navbar-toggle .icon-bar {
    background-color: white;
}

/* Dropdown improvements */
.navbar-nav .dropdown-menu {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Balance Badge in navbar */
.navbar .badge {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-inverse);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 14px;
    vertical-align: middle;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.25);
    position: relative;
    /*animation: subtle-pulse 3s ease-in-out infinite;*/
    font-size: 13px;
    letter-spacing: 0.3px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(30, 158, 116, 0.2);
}

.theme-toggle .toggle-icon {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.theme-toggle .toggle-icon.active {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle .toggle-icon:not(.active) {
    opacity: 0.4;
}

/* Theme toggle wrapper in navbar */
.navbar .theme-toggle-wrapper {
    /* Inherits li styles */
}

/*.navbar .theme-toggle-wrapper > a {
    padding: 0 15px !important;
    display: flex !important;
    align-items: center;
    height: 100%;
}*/

.navbar .theme-toggle-wrapper > a:hover,
.navbar .theme-toggle-wrapper > a:focus {
    background: transparent !important;
    text-decoration: none;
}

.navbar .theme-toggle-wrapper .theme-toggle {
    margin: 0;
    display: inline-flex;
    vertical-align: middle;
}

/* Dark mode theme toggle */
[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-toggle .toggle-icon {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .theme-toggle .toggle-icon.active {
    background: var(--primary);
    color: white;
}

/* ============================================
   5. LAYOUT - CARDS & PANELS
   ============================================ */

.panel {
    background: var(--bg-glass);
    /*backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);*/
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-glass);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-mesh);
    opacity: 0.03;
    pointer-events: none;
}

.panel:hover {
    /*box-shadow: var(--shadow-lg);*/
    /*transform: translateY(-2px);*/
}

.panel-default {
    border-color: var(--border-color);
}

.panel-default > .panel-heading {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.panel-heading {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.1) 0%, rgba(41, 184, 133, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 20px;
    border-radius: 16px 16px 0 0;
    font-weight: 500;
    /*backdrop-filter: blur(5px);*/
}

.panel-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.panel-body {
    padding: 15px;
}

.well {
    background: var(--bg-card);
    /*backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);*/
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: all 0.3s ease;
    /*position: relative;*/
    overflow:auto;
    width:100%;
}



/* ============================================
   6. COMPONENTS - BUTTONS
   ============================================ */

/* Base button styles */
.btn {
    border-radius: 12px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    transform: translateY(0);
    /*backdrop-filter: blur(5px);*/
    box-shadow: 0 2px 8px rgba(30, 158, 116, 0.2);
    overflow: hidden;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none !important;
    outline-offset: 0 !important;
}

/* Subtle wave effect on hover */
/*.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}*/

/*.btn:hover::after {
    width: 300%;
    height: 300%;
}*/

.btn:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    border-color: var(--primary-light);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 158, 116, 0.3);
    transform: translateY(-1px);
}

.btn:focus {
    /*box-shadow: 0 0 0 3px rgba(30, 158, 116, 0.2);*/
}

.btn:active {
    transform: translateY(0);
    /*box-shadow: 0 2px 8px rgba(30, 158, 116, 0.15);*/
}

/* Button variants */
.btn-primary,
.btn-primary:link,
.btn-primary:visited {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    /*border-color: #29B885;*/
    /*box-shadow: 0 6px 20px rgba(30, 158, 116, 0.25);*/
}

.btn-primary:focus {
    /*box-shadow: 0 0 0 3px rgba(30, 158, 116, 0.2);*/
}

.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
    background: var(--gradient-primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: white !important;
    transform: translateY(0);
    /*box-shadow: 0 2px 8px rgba(30, 158, 116, 0.15);*/
}

.btn-primary:active:hover,
.btn-primary.active:hover,
.open > .dropdown-toggle.btn-primary:hover {
    background: linear-gradient(135deg, #188660 0%, #22A571 100%) !important;
    border-color: #188660 !important;
    color: white !important;
}

.btn-primary:active:focus,
.btn-primary.active:focus,
.open > .dropdown-toggle.btn-primary:focus {
    background: linear-gradient(135deg, #188660 0%, #22A571 100%) !important;
    border-color: #188660 !important;
    /*box-shadow: 0 0 0 3px rgba(30, 158, 116, 0.2);*/
}

/* Button default styles */
.btn-default {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-default:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-default:focus,
.btn-default.focus {
    background: var(--bg-primary) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    /*outline: none;*/
    /*box-shadow: 0 0 0 3px rgba(30, 158, 116, 0.15);*/
}

.btn-default:active,
.btn-default.active {
    background: var(--bg-tertiary) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: scale(0.98);
}

.btn-success {
    background: var(--btn-success);
    border-color: var(--success);
}

.btn-success:hover {
    background: var(--btn-success-hover);
    border-color: #059669;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
}

.btn-danger {
    background: var(--btn-danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    border-color: #DC2626;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
}

.btn-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-color: #F59E0B;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
    border-color: #D97706;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25);
}

.btn-info {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border-color: #3B82F6;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    border-color: #2563EB;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

/* Button sizes */
.btn-lg {
    padding: 12px 24px;
    font-size: 1.125rem;
    border-radius: 14px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: 8px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Remove text decoration on button links */
a.btn:hover,
a.btn:focus {
    text-decoration: none !important;
}

/* ============================================
   7. COMPONENTS - FORMS
   ============================================ */
.form-control{
    min-height:46px;
}
.form-control,
textarea.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
select.form-control {
    background: var(--bg-glass);
    /*backdrop-filter: blur(5px);*/
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    /*padding: 10px 14px;
    height: auto;*/
    transition: all 0.3s ease;
    /*font-size: 14px;*/
}

.form-control:focus:not([readonly]),
textarea.form-control:focus:not([readonly]),
input:focus:not([readonly]),
select.form-control:focus:not([readonly]) {
    /*background: var(--bg-primary);*/
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    outline: none;
    position: relative;
    /*background-image: linear-gradient(var(--bg-primary), var(--bg-primary)),
                      linear-gradient(135deg, #1E9E74 0%, #29B885 50%, #3ED2A0 100%);*/
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 25px rgba(41, 184, 133, 0.15);
    /*transform: translateY(-1px);*/
}

/* Readonly inputs - no focus effects */
.form-control[readonly],
textarea.form-control[readonly],
input[readonly],
select.form-control[readonly] {
    cursor: default;
    background-color: var(--bg-tertiary);
    opacity: 0.8;
}

.form-control[readonly]:focus,
textarea.form-control[readonly]:focus,
input[readonly]:focus,
select.form-control[readonly]:focus {
    border-color: var(--border-color);
    box-shadow: none;
    transform: none;
}

.form-control::placeholder,
textarea::placeholder,
input::placeholder {
    color: var(--text-tertiary);
}

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

/* Checkboxes and Radio Buttons */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    margin:0 3px 0 0;
    vertical-align: middle;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Dark theme checkbox and radio styling */
[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] input[type="radio"] {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

/* Webkit browsers checkbox styling for dark theme */
[data-theme="dark"] input[type="checkbox"]:not(:checked) {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    width: 18px;
    height: 18px;
    position: relative;
    cursor: pointer;
}

[data-theme="dark"] input[type="checkbox"]:checked {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 4px;
    width: 18px;
    height: 18px;
    position: relative;
}

[data-theme="dark"] input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Radio button dark theme styling */
[data-theme="dark"] input[type="radio"]:not(:checked) {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    position: relative;
    cursor: pointer;
}

[data-theme="dark"] input[type="radio"]:checked {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    position: relative;
}

[data-theme="dark"] input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: white;
}

/* Labels */
label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 6px;
    display: inline-block;
}

/* Custom Select */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231E9E74'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    min-height: 46px;
    cursor: pointer;
}

/* Style the dropdown options (limited browser support) */
select.form-control option {
    background-color: var(--text-inverse);
    color: var(--text-primary);
    padding: 10px;
}

select.form-control option:hover,
select.form-control option:focus,
select.form-control option:checked {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

/* Disabled option */
select.form-control option:disabled {
    color: var(--text-tertiary);
    background-color: var(--bg-disabled);
}

/* Input groups */
.input-group {
    /*position: relative;
    display: flex;
    width: 100%;*/
}

.input-group-addon {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px 0 0 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 0 8px 8px 0;
}


/* ============================================
   8. COMPONENTS - TABLES
   ============================================ */

.table {
    background: var(--bg-card);
    /*border-radius: 12px;*/
    /*border: 1px solid var(--border-light);*/
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /*margin-bottom:0;*/
}

/* Full width header background */
.table > thead > tr {
    background: var(--bg-secondary);
}

[data-theme="dark"] .table > thead > tr {
    background: var(--bg-secondary);
}

/* Override Bootstrap default table borders */
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
    /*border-top: 1px solid var(--border-light);*/
    border-color:var(--border-light);
}

/* Remove top border from first row */
.table > thead:first-child > tr:first-child > th,
.table > thead:first-child > tr:first-child > td {
    /*border-top: 0;*/
}

.table > thead > tr > th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    border:1px solid var(--border-light);
    padding: 16px 12px;
    text-align: left;
    position: relative;
    white-space: nowrap;
}

.table > thead > tr > th:first-child {
    /*padding-left: 20px;*/
}

.table > thead > tr > th:last-child {
    /*padding-right: 20px;*/
}

/* Subtle line accent on hover */
.table > thead > tr > th::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.table > thead > tr > th:hover::after {
    transform: scaleX(1);
}

/* Subtle separator between header columns */
.table > thead > tr > th:not(:last-child) {
    /*border-right: 1px solid rgba(0, 0, 0, 0.05);*/
}

[data-theme="dark"] .table > thead > tr > th:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.table > tbody > tr > td {
    color: var(--text-secondary);
    padding: 1rem;
    border-color:var(--border-light);
    /*border-top: 1px solid var(--border-light);*/
}

.table > tbody > tr:hover {
    background: var(--bg-hover);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background: var(--bg-secondary);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table avec lignes doubles (for orders, subscriptions, etc.) */
.table-double-row {
    /*border-collapse: separate;*/
    border-spacing: 0;
    /*border: 1px solid var(--border-light);*/
    background: var(--bg-card);
    border-radius: 12px;
    margin: 0;
}

/* Container pour tables avec style flottant */
.well.well-float {
    background: transparent;
    /*border: none;*/
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 0;
    border-radius: 12px;
    margin-bottom: 20px;
}

.table-double-row thead tr th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    padding: 10px 8px;
    /*border-bottom: 1px solid var(--border-color);
    border-top: none;
    border-left:none;
    border-right:none;*/
    border:1px solid var(--border-light);
    position: relative;
    text-align: left;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Lignes doubles groupées */
.table-double-row tbody tr.item-row-top {
    background: var(--bg-card);
    border: none;
    transition: background-color 0.2s ease;
}

.table-double-row tbody tr.item-row-bottom {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}

.table-double-row tbody tr.item-row-bottom:last-child {
    border-bottom: none;
}

/* Alternance de couleur */
.table-double-row tbody tr.item-row-top:nth-child(4n+1),
.table-double-row tbody tr.item-row-bottom:nth-child(4n+2) {
    background: rgba(30, 158, 116, 0.02);
}

/* Hover effect */
.table-double-row tbody tr.hover {
    background: var(--bg-hover) !important;
}

.table-double-row tbody tr.item-row-top td,
.table-double-row tbody tr.item-row-bottom td {
    vertical-align: middle;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: left;
}

.table-double-row tbody tr.item-row-top .item-title-cell,
.table-double-row tbody tr.item-row-top .item-status-cell{
    padding: 10px 10px 5 10px;
}
.table-double-row tbody tr.item-row-bottom td {
    padding: 5 10px 10px 10px;
}

/* Cellules spécifiques */
.item-id-cell {
    vertical-align: middle !important;
    font-weight: 600;
}

.item-title-cell {
    font-size: 14px;
    color: var(--text-primary);
    padding: 1rem;
}

.item-title-cell a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.item-title-cell a:hover {
    color: var(--primary);
    text-decoration: none;
}


.item-link-cell {
    font-size: 12px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.item-link-cell a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.item-link-cell a:hover {
    color: var(--primary-dark, #168c66);
    text-decoration: underline;
}

.item-value-cell {
    font-size: 13px;
    color: var(--text-primary);
    text-align: center;
}

.item-status-cell {
    text-align: center;
    vertical-align: middle !important;
}

.item-date-cell {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.item-actions-cell {
    text-align: center;
    vertical-align: middle !important;
}

.item-actions-cell .btn {
    margin: 2px;
    padding: 4px 10px;
    font-size: 12px;
}

/* Icône de copie */
.copy-icon {
    font-size: 18px;
    margin-right: 10px;
    cursor: pointer;
    vertical-align: middle;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    display: inline-block;
}

.copy-icon:hover {
    color: var(--primary);
}

.copy-icon.selected {
    color: var(--primary);
}

.item-id-value {
    display: inline-block;
    font-size: 14px;
    color: var(--text-primary);
    vertical-align: middle;
}

/* Badge de statut */
.status-badge {
    min-width: 120px;
    text-align: center;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Notification de copie */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 10000;
    font-size: 14px;
}

/* Dark theme pour tables */
[data-theme="dark"] .table > thead > tr > th {
    /*background: var(--bg-secondary);*/
    /*border-bottom: 2px solid var(--border-light);*/
    color: var(--text-primary);
}

[data-theme="dark"] .table > thead > tr > th:hover::after {
    background: var(--primary-color);
}

/* Dark theme pour tables doubles */
[data-theme="dark"] .well.well-float {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .table-double-row tbody tr.item-row-top,
[data-theme="dark"] .table-double-row tbody tr.item-row-bottom {
    background: var(--bg-card);
}

[data-theme="dark"] .table-double-row tbody tr.item-row-top:nth-child(4n+1),
[data-theme="dark"] .table-double-row tbody tr.item-row-bottom:nth-child(4n+2) {
    background: rgba(30, 158, 116, 0.05);
}

[data-theme="dark"] .table-double-row {
    background: var(--bg-card);
    border-color: var(--border-light);
}

[data-theme="dark"] .table-double-row thead tr th {
    /*background: var(--bg-secondary);*/
    /*border-bottom: 2px solid var(--border-light);*/
    color: var(--text-primary);
}

[data-theme="dark"] .table-double-row tbody tr.item-row-bottom {
    border-bottom: 1px solid var(--border-light);
}

[data-theme="dark"] .table-double-row tbody tr.hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* ============================================
   9. COMPONENTS - ALERTS
   ============================================ */

.alert {
    border-radius: 12px;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: #059669;
    border-left: 4px solid #10B981;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    color: #DC2626;
    border-left: 4px solid #EF4444;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    color: #D97706;
    border-left: 4px solid #F59E0B;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    color: #2563EB;
    border-left: 4px solid #3B82F6;
}

.alert .close {
    color: inherit;
    opacity: 0.5;
}

.alert .close:hover {
    opacity: 0.8;
}

/* ============================================
   10. COMPONENTS - DROPDOWNS
   ============================================ */

.dropdown-menu {
    position: absolute;
    z-index: 10000; /* Higher than sidebar mobile z-index (9999) */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0;
    /*margin-top: 0.5rem;
    min-width: 200px;*/
}

.dropdown-menu > li {
    position: relative;
    transition: all 0.2s ease;
    /*border-radius: 8px;*/
    /*margin: 2px 0;*/
}

.dropdown-menu > li > a {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: transparent;
    transition: all 0.2s ease;
    display: block;
    text-decoration: none;
}

.dropdown-menu > li:hover {
    background: var(--bg-hover);
}

.dropdown-menu > li:hover > a {
    background: transparent !important;
    color: var(--primary);
}

/* ============================================
   UNIFORMIZED DROPDOWN STYLES
   ============================================ */

/* ============================================
   UNIFIED DROPDOWN STYLES - BOOTSTRAP
   ============================================ */

/* Selected state - green with border */
.dropdown-menu > li.active {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.15) 0%, rgba(41, 184, 133, 0.15) 100%) !important;
    position: relative;
}

.dropdown-menu > li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
}

.dropdown-menu > li.active > a {
    background: transparent !important;
    color: var(--primary) !important;
    font-weight: 700;
}

/* Hover state - subtle green */
.dropdown-menu > li:not(.active):hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%) !important;
}

.dropdown-menu > li:not(.active):hover > a {
    background: transparent !important;
    color: var(--primary) !important;
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    overflow: hidden;
    background-color: var(--border-color);
}

/* ============================================
   11. COMPONENTS - BADGES & LABELS
   ============================================ */

.badge, .label {
    border-radius: 6px;
}

.badge-primary, .label-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-success, .label-success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.badge-warning, .label-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

.badge-danger, .label-danger {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

/* Ticket reply badge */
.ticket-new-badge {
    margin-left: 8px;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ticket-new-badge i {
    font-size: 10px;
}

/* Metric Badges for Service Metrics */
.metric-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    color: white;
    vertical-align: middle;
}

.metric-badge i {
    margin-right: 2px;
    font-size: 9px;
}

/* Speed color codes - Harmonized with theme */
.metric-badge.speed-excellent {
    background: var(--gradient-primary);
}

.metric-badge.speed-good {
    background: linear-gradient(145deg, #4DB393, #5AC4A3);
}

.metric-badge.speed-average {
    background: linear-gradient(145deg, #8DD1BB, #9ADAC6);
}

.metric-badge.speed-slow {
    background: var(--badge-slow);
}

/* Start time color codes - Harmonized with theme */
.metric-badge.time-excellent {
    background: var(--gradient-primary);
}

.metric-badge.time-good {
    background: linear-gradient(145deg, #4DB393, #5AC4A3);
}

.metric-badge.time-average {
    background: linear-gradient(145deg, #8DD1BB, #9ADAC6);
}

.metric-badge.time-slow {
    background: var(--badge-slow);
}

/* Reliability color codes - Harmonized with theme */
.metric-badge.reliability-excellent {
    background: var(--gradient-primary);
}

.metric-badge.reliability-good {
    background: linear-gradient(145deg, #4DB393, #5AC4A3);
}

.metric-badge.reliability-average {
    background: linear-gradient(145deg, #8DD1BB, #9ADAC6);
}

.metric-badge.reliability-slow {
    background: var(--badge-slow);
}

/* Popularity color codes - Harmonized with theme */
.metric-badge.popularity-hot {
    background: var(--gradient-primary);
}

.metric-badge.popularity-standard {
    background: linear-gradient(145deg, #8DD1BB, #9ADAC6);
}

.metric-badge.popularity-low {
    background: var(--badge-slow);
}

.metric-badge.popularity-new {
    background: var(--gradient-secondary);
}

/* Fallback for undefined color codes */
.metric-badge:not([class*="-excellent"]):not([class*="-good"]):not([class*="-average"]):not([class*="-slow"]):not([class*="popularity-"]) {
    background: linear-gradient(145deg, #6B7280, #4B5563);
}

/* ============================================
   12. COMPONENTS - MODALS
   ============================================ */

.modal-content {
    background: var(--bg-card);
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
    color: var(--text-secondary);
}

.modal-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 16px 16px;
    padding: 1rem 1.5rem;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ============================================
   13. COMPONENTS - SERVICE CARDS
   ============================================ */

.service-card {
    background: var(--bg-glass);
    /*backdrop-filter: blur(10px);*/
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* Animated icon on hover */
.service-card .fa,
.service-card .fas,
.service-card .far {
    transition: all 0.3s ease;
}

.service-card:hover .fa,
.service-card:hover .fas,
.service-card:hover .far {
    transform: rotate(10deg) scale(1.1);
    color: var(--primary);
}

/* Gradient glow effect */
.service-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(41, 184, 133, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(41, 184, 133, 0.3);
}

.service-card:hover::before {
    transform: translate(-50%, -50%) scale(1.5);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.service-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================
   14. COMPONENTS - STATS CARDS
   ============================================ */

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.stat-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(30, 158, 116, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-change {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* Input Group Button Styling */
.input-group-btn:last-child > .btn, 
.input-group-btn:last-child > .btn-group {
    padding: 12px 12px;
    transform: none;
    border: 1px solid var(--border-color);
    box-shadow: none;
    z-index:3;
}

/* ============================================
   15. ORDER STATUS STYLES
   ============================================ */

/* Base status badge style */
.order-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status: Pending, Processing & Paused - Bleu */
.status-pending,
.status-processing,
.status-paused {
    background-color: rgba(25, 118, 210, 0.08);
    color: #1565C0;
    border: 1px solid rgba(25, 118, 210, 0.2);
}

/* Status: In Progress & Active - Jaune */
.status-in-progress,
.status-inprogress,
.status-active {
    background-color: rgba(255, 193, 7, 0.08);
    color: #F57C00;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* Status: Completed & Expired - Vert */
.status-completed,
.status-expired {
    background-color: rgba(76, 175, 80, 0.08);
    color: #2E7D32;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

/* Status: Canceled, Error & Rejected - Rouge */
.status-canceled,
.status-error,
.status-rejected {
    background-color: rgba(244, 67, 54, 0.08);
    color: #C62828;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* Status: Partial - Orange */
.status-partial {
    background-color: rgba(255, 152, 0, 0.08);
    color: #EF6C00;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

/* Dark theme status colors - Intensité uniforme */
[data-theme="dark"] .status-pending,
[data-theme="dark"] .status-processing,
[data-theme="dark"] .status-paused {
    background-color: rgba(33, 150, 243, 0.15);
    color: #64B5F6;
    border-color: rgba(33, 150, 243, 0.3);
}

[data-theme="dark"] .status-in-progress,
[data-theme="dark"] .status-inprogress,
[data-theme="dark"] .status-active {
    background-color: rgba(255, 193, 7, 0.15);
    color: #FFB300;
    border-color: rgba(255, 193, 7, 0.3);
}

[data-theme="dark"] .status-completed,
[data-theme="dark"] .status-expired {
    background-color: rgba(76, 175, 80, 0.15);
    color: #81C784;
    border-color: rgba(76, 175, 80, 0.3);
}

[data-theme="dark"] .status-canceled,
[data-theme="dark"] .status-error,
[data-theme="dark"] .status-rejected {
    background-color: rgba(244, 67, 54, 0.15);
    color: #EF5350;
    border-color: rgba(244, 67, 54, 0.3);
}

[data-theme="dark"] .status-partial {
    background-color: rgba(255, 152, 0, 0.15);
    color: #FFB74D;
    border-color: rgba(255, 152, 0, 0.3);
}

/* ============================================
   16. COMPONENTS - NAV TABS & PILLS
   ============================================ */

.nav-tabs {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.nav-tabs > li > a {
    color: var(--text-secondary);
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 10px 16px;
    margin-right: 4px;
    transition: all 0.2s ease;
}

.nav-tabs > li > a:hover {
    background: var(--bg-hover);
    border-color: transparent;
    color: var(--primary);
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    color: var(--primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-bottom-color: var(--bg-card);
}

.nav-pills > li > a {
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 8px 16px;
    margin: 2px;
    transition: all 0.2s ease;
}

.nav-pills > li > a:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
    border-color: rgba(66, 153, 225, 0.3);
    transform: translateY(-1px);
}

/* Dark theme specific hover adjustments */
[data-theme="dark"] .nav-pills > li > a:hover {
    /*background: rgba(66, 153, 225, 0.1);
    border-color: rgba(66, 153, 225, 0.4);*/
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.tab-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: none;
    padding: 20px;
    border-radius: 0 0 8px 8px;
}

/* ============================================
   16. THIRD-PARTY - SELECT2 OVERRIDES
   ============================================ */

/* Select2 container */
.select2-container--default .select2-selection--single {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    height: auto;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

/* Select2 focus state - show box-shadow when dropdown is open */
.select2-container--open .select2-selection--single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 25px rgba(41, 184, 133, 0.15) !important;
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.05) 0%, rgba(41, 184, 133, 0.05) 100%) !important;
}

/* Remove bottom border when dropdown is open below */
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Add top border radius to dropdown when connected */
.select2-container--default.select2-container--open.select2-container--below .select2-dropdown {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    /*margin-top: -1px;*/
}

/* Add green border-top to open dropdown */
.select2-container--open .select2-dropdown--below {
    border-top: 1px solid var(--primary) !important;
}

/* Select2 hover state */
.select2-container--default .select2-selection--single:hover {
    border-color: var(--primary);
}

/* Remove box-shadow when dropdown is closed */
.select2-container:not(.select2-container--open) .select2-selection--single {
    box-shadow: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary);
    padding: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 10px;
}

/* Select2 dropdown */
.select2-dropdown {
    background-color: var(--text-inverse) !important; /* Fully opaque white */
    background: var(--bg-primary) !important;
    border: 1px solid var(--primary);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 1 !important;
}

/* Add visual separator between input field and dropdown list */
.select2-dropdown .select2-search--dropdown {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.select2-results {
    background: var(--bg-primary) !important;
    border-bottom-left-radius:8px;
    border-bottom-right-radius:8px;
}

/* Select2 results options container */
.select2-container--default .select2-results > .select2-results__options {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    overflow: hidden;
}

.select2-search--dropdown {
    background-color: var(--text-inverse) !important; /* Fully opaque */
}

.select2-search--dropdown .select2-search__field {
    background-color: var(--text-inverse) !important; /* Fully opaque white */
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
}

.select2-results__option {
    padding: 8px 12px;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* ============================================
   UNIFIED DROPDOWN STYLES - SELECT2
   ============================================ */

/* Base state - all options */
.select2-results__option {
    position: relative;
    transition: background-color 0.2s ease;
}

/* Hover/Highlighted state - subtle green */
.select2-results__option--highlighted:not(.is-selected) {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%) !important;
    color: var(--primary) !important;
}

/* Selected state - green background with border */
.select2-results__option.is-selected,
.select2-results__option--highlighted.is-selected {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.15) 0%, rgba(41, 184, 133, 0.15) 100%) !important;
    color: var(--primary) !important;
    font-weight: 700;
}

.select2-results__option.is-selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
}

/* Hide disabled options in Select2 */
.select2-results__option[aria-disabled="true"],
.select2-results__option.select2-results__option--disabled,
.select2-container--default .select2-results__option[aria-disabled="true"],
.select2-results__option[aria-disabled="true"][aria-selected="false"],
.select2-results__option:not([aria-selected="true"])[aria-disabled="true"],
.select2-results__option[data-select2-hidden="true"],
.select2-results__option.select2-results__option--hidden {
    display: none !important;
}

/* Hide options in native select */
select option[hidden],
select option:disabled[hidden],
select option[disabled][hidden],
select option[data-hidden="true"],
option.hidden-category {
    display: none !important;
}

/* Service metrics badges container */
.service-metrics-badges {
    display: inline-flex !important;
    gap: 6px;
    align-items: center;
}

/* Hidden category class */
.hidden-category {
    display: none !important;
}

/* Fix search icon z-index */
.search-dropdown .input-wrapper .input-wrapper__prepend,
.search-dropdown .input-wrapper .input-wrapper__append {
    z-index: 1;
    position: relative;
}

/* ============================================
   17. UTILITIES & HELPERS
   ============================================ */

/* Text utilities */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-tertiary) !important; }

/* Background utilities */
.bg-primary-gradient { background: var(--gradient-primary) !important; }
.bg-secondary-gradient { background: var(--gradient-secondary) !important; }

/* Border radius utilities */
.rounded { border-radius: 12px !important; }
.rounded-lg { border-radius: 16px !important; }
.rounded-full { border-radius: 50% !important; }

/* Shadow utilities */
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }
.shadow-none { box-shadow: none !important; }

/* Spacing utilities */
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }

.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 2rem !important; }

/* Display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

/* Flexbox utilities */
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }

/* Position utilities */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }

/* Overflow utilities */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }

/* Cursor utilities */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }

/* ============================================
   18. ANIMATIONS & TRANSITIONS
   ============================================ */

/* Smooth transitions for interactive elements */
a, button, .btn, .panel, .well, .service-card {
    transition: all 0.2s ease;
}

/* Slide in animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wave slide animation */
@keyframes wave-slide {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Shine animation */
@keyframes shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* Glow pulse animation */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 -2px 10px rgba(41, 184, 133, 0.4);
    }
    50% {
        box-shadow: 0 -2px 15px rgba(30, 158, 116, 0.5);
    }
}

/* Subtle pulse animation */
@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(34, 197, 94, 0.25);
    }
    50% {
        box-shadow: 0 2px 12px rgba(62, 210, 160, 0.4);
    }
}

/* Breathe animation */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Rotation animation */
@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

/* Notification dot */
.notification-dot {
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -2px;
    animation: breathe 2s ease-in-out infinite;
}

/* Floating Action Button */
.btn-floating {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-floating:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   19. DARK THEME OVERRIDES
   ============================================ */

/* Forms in dark mode */
[data-theme="dark"] .form-control,
[data-theme="dark"] textarea.form-control,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="datetime-local"] {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] select.form-control {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2329B885'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
}

/* Dark theme select options */
[data-theme="dark"] select.form-control option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Dark theme metric badges - same green hue with different intensities */
/* Excellent stays vibrant - 100% intensity */
[data-theme="dark"] .metric-badge.speed-excellent,
[data-theme="dark"] .metric-badge.time-excellent,
[data-theme="dark"] .metric-badge.reliability-excellent,
[data-theme="dark"] .metric-badge.popularity-hot {
    /* Keep original gradient - most visible */
}

/* Good - same green at 60% intensity */
[data-theme="dark"] .metric-badge.speed-good,
[data-theme="dark"] .metric-badge.time-good,
[data-theme="dark"] .metric-badge.reliability-good {
    background: linear-gradient(145deg, #186049, #1f6e54);
}

/* Average - same green at 30% intensity */
[data-theme="dark"] .metric-badge.speed-average,
[data-theme="dark"] .metric-badge.time-average,
[data-theme="dark"] .metric-badge.reliability-average,
[data-theme="dark"] .metric-badge.popularity-standard {
    background: linear-gradient(145deg, #0f3f30, #144937);
}

/* Slow - subtle dark grey */
[data-theme="dark"] .metric-badge.speed-slow,
[data-theme="dark"] .metric-badge.time-slow,
[data-theme="dark"] .metric-badge.reliability-slow,
[data-theme="dark"] .metric-badge.popularity-low {
    background: linear-gradient(145deg, #3f4451, #4a5061);
}

[data-theme="dark"] select.form-control option:hover,
[data-theme="dark"] select.form-control option:focus,
[data-theme="dark"] select.form-control option:checked {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

[data-theme="dark"] select.form-control option:disabled {
    color: var(--text-tertiary);
    background-color: #0d0f12;
}

[data-theme="dark"] .form-control:focus:not([readonly]),
[data-theme="dark"] textarea.form-control:focus:not([readonly]),
[data-theme="dark"] input:focus:not([readonly]),
[data-theme="dark"] select.form-control:focus:not([readonly]) {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 178, 125, 0.25);
}

/* Dark mode readonly inputs */
[data-theme="dark"] .form-control[readonly],
[data-theme="dark"] textarea.form-control[readonly],
[data-theme="dark"] input[readonly],
[data-theme="dark"] select.form-control[readonly] {
    background-color: var(--bg-tertiary);
    opacity: 0.7;
}

/* Fix service description text in dark mode */
[data-theme="dark"] .border-rounded,
[data-theme="dark"] .border-solid.border-rounded {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .form-control[readonly]:focus,
[data-theme="dark"] textarea.form-control[readonly]:focus,
[data-theme="dark"] input[readonly]:focus,
[data-theme="dark"] select.form-control[readonly]:focus {
    border-color: var(--border-color);
    box-shadow: none;
}

/* Select2 in dark mode */
[data-theme="dark"] .select2-container--default .select2-selection--single {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary);
}

[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-tertiary);
}

[data-theme="dark"] .select2-dropdown {
    background-color: var(--bg-secondary) !important; /* Fully opaque dark background */
    background: var(--bg-secondary) !important;
    /*border-color: var(--border-color);*/
    opacity: 1 !important;
}

[data-theme="dark"] .select2-search--dropdown {
    background-color: var(--bg-secondary) !important; /* Fully opaque dark */
}

[data-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color: var(--bg-tertiary) !important; /* Fully opaque dark field */
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .select2-results {
    background-color: var(--bg-secondary) !important; /* Fully opaque dark */
    background: var(--bg-secondary) !important;
    color: var(--text-primary);
}

[data-theme="dark"] .select2-results__option {
    color: var(--text-primary);
}

/* ============================================
   DARK THEME - UNIFIED DROPDOWN STYLES
   ============================================ */

/* Bootstrap selected state */
[data-theme="dark"] .dropdown-menu > li.active {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.20) 0%, rgba(41, 184, 133, 0.20) 100%) !important;
    color: var(--primary) !important;
    font-weight: 500;
}

/* Bootstrap hover state */
[data-theme="dark"] .dropdown-menu > li:not(.active):hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.12) 0%, rgba(41, 184, 133, 0.12) 100%) !important;
    color: var(--primary) !important;
}

/* Select2 hover state */
[data-theme="dark"] .select2-results__option--highlighted:not(.is-selected) {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.12) 0%, rgba(41, 184, 133, 0.12) 100%) !important;
    color: var(--primary) !important;
}

/* Select2 selected state */
[data-theme="dark"] .select2-results__option.is-selected,
[data-theme="dark"] .select2-results__option--highlighted.is-selected {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.20) 0%, rgba(41, 184, 133, 0.20) 100%) !important;
    color: var(--primary) !important;
    font-weight: 500;
}

/* Dropdowns in dark mode */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-secondary);
    /*border-color: var(--border-color);*/
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

/* Remove conflicting hover for dropdown items */
[data-theme="dark"] .dropdown-item:hover {
    background-color: transparent !important;
}

/* Search in dark mode */
[data-theme="dark"] .searchbar,
[data-theme="dark"] .search-container,
[data-theme="dark"] .search-box {
    background-color: var(--bg-tertiary);
}

[data-theme="dark"] .searchbar input,
[data-theme="dark"] .search-container input,
[data-theme="dark"] .search-box input {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* Scrollbar in dark mode */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

/* ============================================
   21. TICKET MESSAGES STYLES
   ============================================ */

/* Ticket message container */
.ticket-message-block {
    margin-bottom: 20px;
    position: relative;
}

/* Ticket message bubble */
.ticket-message {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

/* Message content */
.ticket-message .message {
    color: var(--text-primary);
    line-height: 1.6;
    word-wrap: break-word;
}

/* File attachments */
.ticket-message a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ticket-message a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* User messages (right side) */
.ticket-message-right .ticket-message {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%);
    border-color: rgba(30, 158, 116, 0.2);
    margin-left: auto;
}


/* Support messages (left side) */
.ticket-message-left .ticket-message {
    background: var(--bg-secondary);
    margin-right: auto;
}


/* Message info (author and time) */
.ticket-message-block .info {
    margin-top: 8px;
    padding: 0 5px;
}

.ticket-message-block .info strong {
    color: var(--text-primary);
    font-weight: 600;
}

.ticket-message-block .info small {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* Ticket title */
.titcket-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

/* Dark theme adjustments */
[data-theme="dark"] .ticket-message {
    background: #252830;
    border-color: var(--border-color);
}

[data-theme="dark"] .ticket-message-right .ticket-message {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.15) 0%, rgba(41, 184, 133, 0.15) 100%);
    border-color: rgba(30, 158, 116, 0.3);
}



[data-theme="dark"] .ticket-message-left .ticket-message {
    background: var(--bg-secondary);
}


[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ============================================
   22. VIP PROGRESS WIDGET
   ============================================ */

.vip-progress-widget {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.vip-progress-widget:hover {
    box-shadow: var(--shadow-lg);
    /*transform: translateY(-2px);*/
}

.vip-widget-header {
    background: var(--gradient-primary);
    padding: 20px;
    text-align: center;
    position: relative;
}

.vip-crown-icon {
    font-size: 32px;
    color: white;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.vip-widget-header h4 {
    color: white;
    margin: 0;
    font-weight: 700;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vip-widget-body {
    padding: 25px 20px;
}

/* Progress Section */
.vip-progress-info {
    margin-bottom: 25px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.spent-amount {
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}

.goal-amount {
    color: var(--text-tertiary);
    font-size: 14px;
}

.progress-bar-container {
    margin-bottom: 15px;
}

.vip-progress-bar {
    background: var(--bg-secondary);
    height: 24px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.vip-progress-fill {
    background: var(--gradient-secondary);
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    padding-left: 5px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 50px; /* Augmenté pour accommoder le texte */
}


@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 1;
    position: relative;
    white-space: nowrap; /* Empêche le retour à la ligne */
    margin: 0 2px; /* Petite marge pour éviter le chevauchement */
}

.vip-remaining {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

.vip-remaining strong {
    color: var(--primary);
    font-weight: 700;
}

/* VIP Achieved State */
.vip-achieved {
    text-align: center;
    /*padding: 20px 0;*/
   /* margin-bottom: 25px;*/
}

.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(30, 158, 116, 0.3);
    margin-bottom: 15px;
}

.vip-badge i {
    font-size: 20px;
}


.vip-congrats {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 20px 0;
    font-weight: 500;
}

/* VIP Benefits List - When VIP is achieved */
.vip-benefits-list {
    margin-top: 20px;
    text-align: left;
}

.vip-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.05) 0%, rgba(41, 184, 133, 0.05) 100%);
    border: 1px solid rgba(30, 158, 116, 0.15);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.vip-benefit-item:hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.1) 0%, rgba(41, 184, 133, 0.1) 100%);
    transform: translateX(3px);
    border-color: rgba(30, 158, 116, 0.3);
}

.vip-benefit-item.clickable {
    cursor: pointer;
}

.vip-benefit-item.clickable:hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.15) 0%, rgba(41, 184, 133, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(30, 158, 116, 0.2);
}

.benefit-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.benefit-content {
    flex: 1;
}

.benefit-content h6 {
    margin: 0 0 4px 0;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.benefit-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.4;
}

/* Benefits List */
.vip-benefits {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

.vip-benefits h5 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vip-benefits h5 i {
    color: var(--primary);
    font-size: 16px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-light);
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list li.locked {
    color: var(--text-tertiary);
    opacity: 0.7;
}

.benefits-list li.locked i {
    color: var(--text-tertiary);
    font-size: 14px;
}

.benefits-list li:hover {
    padding-left: 5px;
}

/* CTA Section */
.vip-cta {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%);
    border-radius: 12px;
    border: 1px solid rgba(30, 158, 116, 0.2);
}

.cta-text {
    color: var(--text-primary);
    font-size: 13px;
    margin: 0;
    text-align: center;
    font-weight: 500;
}

/* Dark Theme Adjustments */
[data-theme="dark"] .vip-progress-widget {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .vip-widget-header {
    background: var(--gradient-primary-dark);
}

[data-theme="dark"] .vip-progress-bar {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .vip-progress-fill {
    background: var(--gradient-primary-dark);
}

[data-theme="dark"] .vip-badge {
    background: var(--gradient-primary-dark);
}

[data-theme="dark"] .vip-benefit-item {
    background: linear-gradient(135deg, rgba(24, 80, 64, 0.08) 0%, rgba(34, 109, 88, 0.08) 100%);
    border-color: rgba(24, 80, 64, 0.2);
}

[data-theme="dark"] .vip-benefit-item:hover {
    background: linear-gradient(135deg, rgba(24, 80, 64, 0.15) 0%, rgba(34, 109, 88, 0.15) 100%);
    border-color: rgba(24, 80, 64, 0.4);
}

[data-theme="dark"] .vip-widget-body {
    background: var(--bg-secondary);
}

[data-theme="dark"] .vip-progress-info .spent-amount {
    color: var(--primary-color);
}

[data-theme="dark"] .vip-progress-info .goal-amount {
    color: var(--text-secondary);
}

[data-theme="dark"] .vip-remaining strong {
    color: var(--primary-color);
}

[data-theme="dark"] .vip-benefits h5 {
    color: var(--text-primary);
}

[data-theme="dark"] .benefits-list li.locked {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .vip-cta {
    background: linear-gradient(135deg, rgba(24, 80, 64, 0.08) 0%, rgba(34, 109, 88, 0.08) 100%);
    border-color: rgba(24, 80, 64, 0.2);
}

[data-theme="dark"] .vip-cta .cta-text {
    color: var(--text-primary);
}

[data-theme="dark"] .vip-benefit-item.clickable:hover {
    background: linear-gradient(135deg, rgba(24, 80, 64, 0.2) 0%, rgba(34, 109, 88, 0.2) 100%);
    box-shadow: 0 4px 12px rgba(24, 80, 64, 0.3);
}

[data-theme="dark"] .benefit-icon {
    background: var(--gradient-primary-dark);
}

[data-theme="dark"] .benefit-content h6 {
    color: var(--primary-dark-mode-light);
}

[data-theme="dark"] .benefit-content p {
    color: var(--text-secondary);
}

[data-theme="dark"] .vip-cta {
    background: linear-gradient(135deg, rgba(24, 80, 64, 0.08) 0%, rgba(34, 109, 88, 0.08) 100%);
    border-color: rgba(24, 80, 64, 0.2);
}

[data-theme="dark"] .vip-cta .cta-text {
    color: var(--text-primary);
}

[data-theme="dark"] .vip-crown-icon {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .vip-congrats {
    color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .col-lg-9 { width: 100%; }
    .col-lg-3 { width: 100%; margin-top: 20px; }
    .vip-progress-widget { position: relative; top: 0; }
}

@media (max-width: 768px) {
    .vip-widget-header { padding: 15px; }
    .vip-crown-icon { font-size: 24px; }
    .vip-widget-header h4 { font-size: 18px; }
    .vip-widget-body { padding: 20px 15px; }
}

/* ============================================
   23. SERVICE GUIDELINES
   ============================================ */

.service-guidelines-container {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.guidelines-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.05) 0%, rgba(41, 184, 133, 0.05) 100%);
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.guidelines-header:hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%);
}

.guidelines-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guidelines-title i {
    font-size: 20px;
    color: var(--primary);
}

.guidelines-title span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.guidelines-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-text {
    font-size: 13px;
    color: var(--text-tertiary);
}

.toggle-icon {
    font-size: 14px;
    color: var(--text-tertiary);
    transition: transform 0.3s ease;
}

.guidelines-header.active .toggle-icon {
    transform: rotate(180deg);
}

.guidelines-header.active .toggle-text {
    content: "Click to hide";
}

.guidelines-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
}

.guidelines-content.show {
    max-height: 1500px;
    border-top: 1px solid var(--border-color);
    cursor:default;
}

.guideline-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.guideline-item:last-child {
    border-bottom: none;
}

.guideline-item:hover {
    background: var(--bg-hover);
}

.guideline-item:hover .guideline-icon {
    box-shadow: 0 4px 12px rgba(30, 158, 116, 0.15);
}

.guideline-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.1) 0%, rgba(41, 184, 133, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.guideline-icon i {
    font-size: 18px;
    color: var(--primary);
}

.guideline-text {
    flex: 1;
}

.guideline-text h5 {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.guideline-text p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

/* Uniform styling for all guideline icons - consistent color scheme */
.guideline-item .guideline-icon {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.1) 0%, rgba(41, 184, 133, 0.1) 100%);
    border: 1px solid rgba(30, 158, 116, 0.15);
}

.guideline-item .guideline-icon i {
    color: var(--primary);
}

/* Dark theme adjustments */
[data-theme="dark"] .service-guidelines-container {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .guidelines-header {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%);
}

[data-theme="dark"] .guidelines-header:hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.12) 0%, rgba(41, 184, 133, 0.12) 100%);
}

[data-theme="dark"] .guidelines-content {
    background: var(--bg-card);
}

[data-theme="dark"] .guideline-item:hover {
    background: rgba(30, 158, 116, 0.05);
}

/* Dark theme - adjust icon backgrounds for better visibility */
[data-theme="dark"] .guideline-item .guideline-icon {
    filter: brightness(1.1);
}

[data-theme="dark"] .guideline-item:hover .guideline-icon {
    box-shadow: 0 4px 12px rgba(30, 158, 116, 0.25);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .guideline-item {
        gap: 15px;
        padding: 15px;
    }
    
    .guideline-icon {
        width: 35px;
        height: 35px;
    }
    
    .guideline-icon i {
        font-size: 16px;
    }
    
    .guideline-text h5 {
        font-size: 14px;
    }
    
    .guideline-text p {
        font-size: 12px;
    }
}

/* ============================================
   24. ORDER TYPE SWITCHER
   ============================================ */

.order-type-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
}

.order-mode {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-tertiary);
    border: 1px solid transparent;
}

.order-mode i {
    font-size: 12px;
}

/* Active state */
.order-mode.active {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.1) 0%, rgba(41, 184, 133, 0.1) 100%);
    color: var(--primary);
    border-color: rgba(30, 158, 116, 0.2);
    font-weight: 500;
    cursor: default;
}

/* Hover state for non-active */
a.order-mode:hover {
    background: rgba(30, 158, 116, 0.05);
    color: var(--primary);
    text-decoration: none;
    border-color: rgba(30, 158, 116, 0.1);
}

/* Dark theme */
[data-theme="dark"] .order-mode.active {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.15) 0%, rgba(41, 184, 133, 0.15) 100%);
    border-color: rgba(30, 158, 116, 0.3);
}

[data-theme="dark"] a.order-mode:hover {
    background: rgba(30, 158, 116, 0.1);
    border-color: rgba(30, 158, 116, 0.2);
}

/* ============================================
   25. NEWS WIDGET
   ============================================ */

/* News Date Styling */
.news-date {
    display: inline-block;
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

[data-theme="dark"] .news-date {
    color: #adb5bd;
    background: var(--green-800);
}

/* Style pour le widget de news */
.news-widget .news-date {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.news-widget:hover .news-date {
    opacity: 1;
}

.news-widget {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.news-widget:hover {
    box-shadow: var(--shadow-lg);
}

.news-widget-header {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.05) 0%, rgba(41, 184, 133, 0.05) 100%);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.news-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-title i {
    font-size: 20px;
    color: var(--primary);
}

.news-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.news-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%);
    color: var(--primary);
    border-color: rgba(30, 158, 116, 0.3);
}

.news-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.news-nav-btn i {
    font-size: 10px;
}

.news-counter {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.news-widget-body {
    padding: 20px;
}

.news-container {
    position: relative;
    min-height: 100px;
}

/* News items structure */
.news-item {
    display: none;
    
}

.news-item.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-item-date {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-item-date i {
    font-size: 10px;
}

.news-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.news-item-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.news-item-content ul,
.news-item-content ol {
    padding-left: 20px;
    margin: 10px 0;
}

.news-item-content li {
    margin: 5px 0;
}

.news-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
}

.news-badge.new {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.news-badge.update {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.news-badge.important {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Dark theme adjustments */
[data-theme="dark"] .news-widget {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .news-widget-header {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%);
}

[data-theme="dark"] .news-nav-btn {
    background: #252830;
}

[data-theme="dark"] .news-nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.12) 0%, rgba(41, 184, 133, 0.12) 100%);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .news-widget {
        margin-top: 15px;
    }
    
    .news-widget-header {
        padding: 15px;
    }
    
    .news-widget-body {
        padding: 15px;
    }
}

/* ============================================
   20. RESPONSIVE/MEDIA QUERIES
   ============================================ */

@media (max-width: 768px) {
    /* Mobile navbar */
    .navbar-nav {
        /*background: var(--bg-card);*/
        border-radius: 12px;
        /*margin-top: 1rem;
        padding: 0.5rem;*/
    }
    
    .navbar-default .navbar-nav > li {
        /*height: auto;*/
    }
    
    .navbar-default .navbar-nav > li > a {
        padding: 10px 15px;
        height: auto;
    }

    .navbar-collapsed-before .navbar-header{
        /*width:100% !important;*/
    }
    
    /* Mobile theme toggle */
    .theme-toggle {
        margin: 1rem auto;
        display: flex;
        width: fit-content;
    }
    
    .navbar-nav .theme-toggle-wrapper {
        padding: 8px 15px;
    }
    
    .navbar-nav .theme-toggle-wrapper .theme-toggle {
        margin: 0;
        width: auto;
        display: inline-flex;
    }
    
    /* Mobile buttons */
    .btn-floating {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }
    
    /* Mobile panels */
    .panel {
        margin-bottom: 15px;
    }
    
    /* Mobile forms */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ============================================
   26. FAQ STYLES
   ============================================ */

.faq-container {
    margin: 0 auto;
}

/* FAQ Categories Navigation */
.faq-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.faq-category-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-category-btn i {
    font-size: 16px;
}

.faq-category-btn:hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.05) 0%, rgba(41, 184, 133, 0.05) 100%);
    color: var(--primary);
    border-color: rgba(30, 158, 116, 0.3);
}

.faq-category-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* FAQ Sections */
.faq-section {
    display: none;
}

.faq-section.active {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    animation: fadeIn 0.3s ease;
}

/* Section title spans full width */
.faq-section.active .faq-section-title {
    width: 100%;
    flex: 0 0 100%;
}

.faq-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.faq-section-title i {
    color: var(--primary);
}

/* FAQ Items */
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    flex: 0 0 calc(50% - 10px); /* 50% moins la moitié du gap */
    align-self: flex-start; /* Très important : empêche l'étirement vertical */
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
}

.faq-question:hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.03) 0%, rgba(41, 184, 133, 0.03) 100%);
}

.faq-question span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    flex: 1;
    padding-right: 15px;
}

.faq-question i {
    color: var(--text-tertiary);
    font-size: 12px;
    transition: transform 0.2s ease;
}

.faq-item.active .faq-question {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.05) 0%, rgba(41, 184, 133, 0.05) 100%);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
    padding: 20px 20px 5px 20px;
}

.faq-item.active .faq-answer {
    max-height: 2000px; /* Grande valeur pour permettre l'expansion complète */
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer p,
.faq-answer ul,
.faq-answer ol {
    padding: 0 0 15px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.faq-answer ul,
.faq-answer ol {
    padding-left: 20px;
}

.faq-answer li {
    margin-bottom: 8px;
}

.faq-answer strong {
    color: var(--text-primary);
    font-weight: 600;
}

.faq-answer pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin: 0 0 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
}

/* Dark theme adjustments */
[data-theme="dark"] .faq-category-btn {
    background: var(--bg-secondary);
}

[data-theme="dark"] .faq-category-btn:hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%);
}

[data-theme="dark"] .faq-category-btn.active {
    background: linear-gradient(135deg, #188660 0%, #22A571 100%);
}

[data-theme="dark"] .faq-item {
    background: var(--bg-secondary);
}

[data-theme="dark"] .faq-question:hover {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.05) 0%, rgba(41, 184, 133, 0.05) 100%);
}

[data-theme="dark"] .faq-item.active .faq-question {
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.08) 0%, rgba(41, 184, 133, 0.08) 100%);
}

[data-theme="dark"] .faq-answer pre {
    background: #252830;
}

/* Tablet responsive */
@media (max-width: 992px) {
    .faq-item {
        flex: 0 0 100%; /* Pleine largeur sur tablette */
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .faq-categories {
        gap: 8px;
    }
    
    .faq-category-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .faq-category-btn i {
        font-size: 14px;
    }
    
    .faq-section-title {
        font-size: 20px;
    }
    
    .faq-question {
        padding: 15px;
    }
    
    .faq-question span {
        font-size: 14px;
    }
    
    .faq-answer p,
    .faq-answer ul,
    .faq-answer ol {
        padding: 0 15px 12px 15px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .btn {
        /*padding: 8px 16px;
        font-size: 0.9rem;*/
    }
    
    .panel-body {
        padding: 12px;
    }
}

/* ============================================
   21. RTL SUPPORT
   ============================================ */

.rtl-navbar {
    direction: rtl;
}

.rtl-navbar .navbar-brand {
    padding-right: 0;
    padding-left: 20px;
}

.rtl-navbar .navbar-nav {
    float: right;
}

.rtl-form {
    direction: rtl;
    text-align: right;
}

.rtl-form .form-control {
    direction: rtl;
    text-align: right;
}

.rtl-alert {
    direction: rtl;
    text-align: right;
}

.rtl-content {
    direction: rtl;
    text-align: right;
}

/* RTL dark mode support */
[data-theme="dark"] .rtl-navbar,
[data-theme="dark"] .rtl-form,
[data-theme="dark"] .rtl-alert,
[data-theme="dark"] .rtl-content {
    direction: rtl;
}

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

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-dark) var(--bg-secondary);
}

/* ============================================
   CODE BLOCKS & PRE TAGS
   ============================================ */

pre {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
}

code {
    background-color: var(--bg-tertiary);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    color: inherit;
}

/* Dark theme for pre and code */
[data-theme="dark"] pre {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color);
}

[data-theme="dark"] code {
    background-color: var(--bg-tertiary);
    color: #3ED2A0;
}

[data-theme="dark"] pre code {
    background-color: transparent;
    color: var(--text-primary);
}

/* ============================================
   PAGINATION STYLES
   ============================================ */

/*.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 8px;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}*/

.pagination > li {
    display: inline-block;
}

.pagination > li > a,
.pagination > li > span {
    position: relative;
    display: block;
    padding: 8px 14px;
    margin: 0;
    line-height: 1.42857143;
    color: var(--text-secondary);
    text-decoration: none;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
}

.pagination > li > a:hover,
.pagination > li > a:focus {
    color: var(--primary);
    background-color: var(--bg-hover);
    border-color: var(--primary);
    /*transform: translateY(-2px);*/
    box-shadow: 0 4px 12px rgba(30, 158, 116, 0.15);
}

.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > a:focus,
.pagination > .active > span,
.pagination > .active > span:hover,
.pagination > .active > span:focus {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: var(--primary);
    cursor: default;
    box-shadow: 0 4px 12px rgba(30, 158, 116, 0.2);
}

.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
    color: var(--text-tertiary);
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
}

/* First and Last page links */
.pagination > li:first-child > a,
.pagination > li:first-child > span {
    border-radius: 10px;
}

.pagination > li:last-child > a,
.pagination > li:last-child > span {
    border-radius: 10px;
}

/* Pagination sizes */
.pagination-lg > li > a,
.pagination-lg > li > span {
    padding: 10px 16px;
    font-size: 16px;
}

.pagination-sm > li > a,
.pagination-sm > li > span {
    padding: 5px 10px;
    font-size: 12px;
}

/* Dark theme pagination */
[data-theme="dark"] .pagination > li > a,
[data-theme="dark"] .pagination > li > span {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .pagination > li > a:hover,
[data-theme="dark"] .pagination > li > a:focus {
    background-color: var(--bg-hover);
    color: var(--primary);
    border-color: var(--primary);
}

[data-theme="dark"] .pagination > .active > a,
[data-theme="dark"] .pagination > .active > a:hover,
[data-theme="dark"] .pagination > .active > a:focus,
[data-theme="dark"] .pagination > .active > span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

[data-theme="dark"] .pagination > .disabled > span,
[data-theme="dark"] .pagination > .disabled > a {
    background-color: var(--bg-tertiary);
    opacity: 0.4;
}

/* ============================================
   21. COOKIE CONSENT POPUP
   ============================================ */

.cookie-consent-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 900px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    padding: 0;
    overflow: hidden;
}

.cookie-consent-content {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cookie-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.cookie-text {
    flex: 1;
    padding-right: 16px;
}

.cookie-text h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.cookie-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-text a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    align-items: center;
    margin-top: 16px;
}

.cookie-consent-popup .btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
}

/* Dark theme adjustments */
[data-theme="dark"] .cookie-consent-popup {
    background: rgba(26, 29, 35, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile responsive */
@media (max-width: 576px) {
    .cookie-consent-popup {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .cookie-icon {
        margin: 0 auto;
    }
    
    .cookie-text {
        padding-right: 0;
    }
    
    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-consent-popup .btn {
        width: 100%;
    }
}

/* Animation */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-consent-popup.show {
    animation: slideUpFade 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ============================================
   28. WHATSAPP FLOATING BUTTON (INTEGRATED)
   ============================================ */
.whatsapp-button {
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    animation: pulse-wave 3s ease-in-out infinite; /* Ralenti l'animation pour plus de fluidité */
    pointer-events: none;
    z-index: -1;
}

.whatsapp-button::after {
    content: 'Chat with us!';
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--bg-secondary);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.whatsapp-button:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 75px;
}


@keyframes pulse-wave {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-button:active {
    transform: scale(0.95);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .whatsapp-button::after {
        display: none; /* Hide tooltip on mobile */
    }
}

/* Dark theme adjustments */
[data-theme="dark"] .whatsapp-button::after {
    background: #2a2d33;
}

/* ============================================
   27. STICKY FOOTER LAYOUT
   ============================================ */
/* Make body a flex container for sticky footer */
body.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Main content takes remaining space */
.main-content {
    flex: 1 0 auto;
    padding-bottom: 40px; /* Give some breathing room */
}

/* ============================================
   28. MINIMAL LEGAL FOOTER
   ============================================ */
.legal-footer {
    flex-shrink: 0; /* Prevent footer from shrinking */
    margin-top: auto; /* Push footer to bottom */
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    text-align: center;
}

.footer-links {
    margin-bottom: 5px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-separator {
    color: var(--text-tertiary);
    margin: 0 12px;
    font-size: 12px;
    opacity: 0.5;
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: 13px;
    opacity: 0.7;
}

/* Dark theme adjustments */
[data-theme="dark"] .legal-footer {
    /*background: #0f1114;
    border-top-color: rgba(255, 255, 255, 0.08);*/
}

[data-theme="dark"] .footer-link {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .footer-link:hover {
    color: var(--primary);
}

[data-theme="dark"] .footer-copyright {
    color: rgba(255, 255, 255, 0.4);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .legal-footer {
        margin-top: 40px;
        padding: 20px 0;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-separator {
        display: none;
    }
}

/* ============================================
   29. LEGAL DOCUMENTS (TERMS & PRIVACY)
   ============================================ */

.legal-title {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.legal-updated {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.legal-content {
    color: var(--text-primary);
    line-height: 1.8;
}

.legal-intro {
    margin-bottom: 20px;
    font-size: 15px;
}

.legal-divider {
    margin: 30px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.legal-section {
    margin-bottom: 35px;
}

.legal-section h2 {
    color: var(--primary);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 0;
}

.legal-section h3 {
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.legal-section ul {
    margin: 15px 0;
    padding-left: 25px;
}

.legal-section li {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.legal-section .sub-list {
    margin-top: 10px;
    margin-bottom: 10px;
    list-style-type: circle;
}

.legal-section .contact-list {
    list-style: none;
    padding-left: 0;
}

.legal-section .contact-list li {
    margin-bottom: 8px;
}

.legal-section .text-warning {
    color: #fb923c;
    margin-top: 15px;
}

.disclaimer-box {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 6px;
}

.disclaimer-box p {
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.6;
}

.disclaimer-box p:last-child {
    margin-bottom: 0;
}

/* Dark theme */
[data-theme="dark"] .legal-document {
    background: var(--bg-secondary);
}

[data-theme="dark"] .disclaimer-box {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .legal-section .text-warning {
    color: #fbbf24;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .legal-document {
        padding: 25px 20px;
        margin: 20px 0 40px 0;
    }
    
    .legal-title {
        font-size: 26px;
    }
    
    .legal-section h2 {
        font-size: 19px;
    }
    
    .legal-section h3 {
        font-size: 16px;
    }
}

/* ============================================
   30. GEOLOCATION RESTRICTION TOOLTIP
   ============================================ */
.geo-restriction-tooltip .tooltip-inner {
    background: var(--badge-danger);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(238, 83, 83, 0.3);
    max-width: 250px;
}

.geo-restriction-tooltip .tooltip-arrow::before {
    border-top-color: #ff6b6b !important;
    border-bottom-color: #ff6b6b !important;
}

.geo-restriction-tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #ff6b6b !important;
}

.geo-restriction-tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #ff6b6b !important;
}

.geo-restriction-tooltip.bs-tooltip-left .tooltip-arrow::before {
    border-left-color: #ff6b6b !important;
}

.geo-restriction-tooltip.bs-tooltip-right .tooltip-arrow::before {
    border-right-color: #ff6b6b !important;
}

/* Hover effect for restricted links */
a[href*="addfunds"][style*="not-allowed"]:hover {
    opacity: 0.6 !important;
    text-decoration: none !important;
}

/* Dark theme support */
html[data-theme="dark"] .geo-restriction-tooltip .tooltip-inner {
    background: var(--badge-danger-hover);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* ============================================
   31. MOBILE METRICS STACKING
   ============================================ */
@media (max-width: 1000px) {
    .service-metrics-badges-selected{
        display: none;
    }
    /* Stack metrics vertically in dropdown options */
    .select2-results__option .service-metrics-badges {
        display: block !important;
        float: none !important;
        margin-left: 0 !important;
        margin-top: 6px !important;
        /*width: 100% !important;*/
        clear: both !important;
    }
    
    /* Stack metric badges vertically */
    .select2-results__option .metric-badge {
        display: block !important;
        margin-right: 4px !important;
        margin-bottom: 4px !important;
        padding: 3px 8px !important;
        font-size: 11px !important;
    }
    
    .select2-results__option .metric-badge i {
        margin-right: 4px !important;
        font-size: 10px !important;
    }
    
    /* Adjust option padding for stacked layout */
    .select2-results__option {
        padding: 10px 12px !important;
        line-height: 1.4 !important;
        position: relative !important;
    }
    
    /* Service text takes full width on mobile */
    .select2-results__option .select2-results__option-text {
        display: block !important;
        width: 100% !important;
        margin-bottom: 4px !important;
    }
    
    /* Highlighted state */
    .select2-results__option--highlighted {
        background-color: var(--bg-hover) !important;
    }
    
    /* Hide metrics in selected value to save space */
    .select2-selection__rendered .service-metrics-badges-selected {
        display: none !important;
    }
    
    /* Ensure proper text wrapping */
    .select2-results__option {
        white-space: normal !important;
        word-wrap: break-word !important;
    }
}

/* Desktop keeps horizontal layout */
@media (min-width: 1000px) {
    .select2-results__option .service-metrics-badges {
        display: inline-flex !important;
        flex-direction: row !important;
        gap: 6px !important;
    }
}

/* ============================================
   32. OLD AGENT RATING SYSTEM - REMOVED
   (Replaced with new integrated rating prompt below)
   ============================================ */

/* Section 32: Agent Rating Integration in Reply Form */
.textarea-wrapper {
    position: relative;
}

.rating-prompt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 250, 252, 0.92);
    border-radius: 4px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.rating-prompt-box {
    text-align: center;
    padding: 18px 24px;
    background: var(--bg-card, white);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.rating-prompt-header {
    color: var(--text-primary, #333);
    font-size: 14px;
    margin-bottom: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.rating-prompt-header i {
    margin-right: 6px;
    color: var(--primary, #1e9e74);
    font-size: 13px;
}

.agent-name-prompt {
    font-weight: 600;
    color: var(--primary, #1e9e74);
}

.rating-stars-container {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.star-rating {
    font-size: 28px;
    color: #d1d5db;
    cursor: pointer;
    user-select: none;
}

.star-rating:hover {
    color: #ffc107;
    transform: scale(1.15) translateY(-2px);
}

.star-rating.filled {
    color: #ffc107;
    animation: starBounce 0.3s ease;
}

@keyframes starBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Dark theme support for rating prompt */
[data-theme="dark"] .rating-prompt-overlay {
    background: rgba(20, 25, 37, 0.92);
}

[data-theme="dark"] .rating-prompt-box {
    background: var(--bg-secondary, #1e2530);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-primary, #fff);
}

[data-theme="dark"] .rating-prompt-header {
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] .star-rating {
    color: #4b5563;
}

[data-theme="dark"] .star-rating:hover,
[data-theme="dark"] .star-rating.filled {
    color: #ffc107;
}

/* Mobile responsiveness for rating prompt */
@media (max-width: 768px) {
    .rating-prompt-box {
        padding: 15px 20px;
    }
    
    .rating-prompt-header {
        font-size: 13px;
    }
    
    .star-rating {
        font-size: 24px;
    }
    
    .rating-stars-container {
        gap: 6px;
    }
}

/* ============================================
   42. PAYMENT METHOD BLOCKS - ADD FUNDS PAGE
   ============================================ */

.payment-methods-blocks {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.payment-method-block {
    flex: 1;
    min-width: 150px;
    min-height: 120px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method-block:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 158, 116, 0.15);
}

.payment-method-block.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(30, 158, 116, 0.05) 0%, rgba(41, 184, 133, 0.05) 100%);
}

.payment-method-block .payment-radio {
    display: none;
}

.payment-method-block .payment-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.payment-method-block .payment-label i {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 10px;
}

.payment-method-block.active .payment-label i {
    color: var(--primary);
}

.payment-method-block .payment-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.payment-method-block .payment-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    opacity: 0.8;
}

/* Dark mode support for payment blocks */
[data-theme="dark"] .payment-method-block {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .payment-method-block:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
    box-shadow: 0 4px 12px rgba(30, 158, 116, 0.2);
}

[data-theme="dark"] .payment-method-block.active {
    background: var(--bg-secondary);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 178, 125, 0.25);
}

[data-theme="dark"] .payment-method-block .payment-name {
    color: var(--text-primary);
}

[data-theme="dark"] .payment-method-block .payment-desc {
    color: var(--text-secondary);
}

/* Mobile responsive for payment blocks */
@media (max-width: 768px) {
    .payment-methods-blocks {
        flex-direction: column;
    }
    
    .payment-method-block {
        width: 100%;
    }
}

/* Force vertical FAQ layout in right column */
.col-lg-5 .faq-container {
    display: block !important;
}

.col-lg-5 .faq-section {
    display: block !important;
    gap: 0 !important;
}

.col-lg-5 .faq-item {
    display: block !important;
    width: 100% !important;
    flex: none !important;
    margin-bottom: 15px !important;
}

.col-lg-5 .faq-item:last-child {
    margin-bottom: 0 !important;
}

.col-lg-5 .faq-categories {
    display: none !important;
}

/* ============================================
   43. VERTICAL SIDEBAR LAYOUT
   ============================================ */

/* Sidebar Layout Structure */
body.sidebar-layout {
    margin: 0;
    padding: 0;
    padding-top: 60px; /* Height of top header */
}

/* Add spacing to main content */
.main-content {
    padding-top: 20px;
}

/* Top Header */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 100vw;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    display: block; /* Visible on all screen sizes */
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    margin-right: 15px;
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
}

.sidebar-toggle:focus {
    background: var(--bg-secondary);
}

/* Rotate hamburger icon when sidebar is collapsed (desktop only) */
@media (min-width: 769px) {
    body.sidebar-collapsed .sidebar-toggle i {
        transform: rotate(90deg);
        transition: transform 0.3s ease;
    }
}

/* On mobile, rotate when sidebar is open */
@media (max-width: 768px) {
    body.sidebar-open .sidebar-toggle i {
        transform: rotate(90deg);
        transition: transform 0.3s ease;
    }
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 20px;
}

.header-logo img {
    height: 40px;
    width: auto;
}

/* Logo switching for dark/light theme */
[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

/* Hide old theme toggle button if exists */
#theme-toggle-btn {
    display: none !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
}

[data-theme="light"] .dark-icon {
    display: block;
}

[data-theme="light"] .light-icon {
    display: none;
}

[data-theme="dark"] .dark-icon {
    display: none;
}

[data-theme="dark"] .light-icon {
    display: block;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.header-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
}

.notifications-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger-color, #dc3545);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
}

.user-menu {
    position: relative;
}

/* Style the dropdown menu but let Bootstrap control visibility */
.user-menu .dropdown-menu {
    /* Bootstrap controls display - we only style appearance */
    min-width: 180px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin-top: 10px;
}

.user-menu .dropdown-menu li {
    list-style: none;
}

.user-menu .dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.user-menu .dropdown-menu a:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.user-menu .dropdown-menu .divider {
    height: 1px;
    margin: 8px 0;
    background: var(--border-light);
}

[data-theme="dark"] .user-menu .dropdown-menu {
    background: #2a2d35;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 1 !important;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 8px 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-toggle:hover {
    background: var(--bg-hover);
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, #1e9e74 0%, #1a8862 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s ease;
    z-index: 999;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Search Bar */
.sidebar-search {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-search .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 10px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

.sidebar-search .search-input-wrapper:focus-within {
    background: rgba(0, 0, 0, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.sidebar-search .search-input,
.sidebar-search input[type="text"].search-input {
    width: 100%;
    padding: 10px 45px 10px 35px !important;
    border: none !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 14px !important;
    outline: none !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: normal !important;
}

.sidebar-search .search-input::placeholder,
.sidebar-search input[type="text"].search-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
}


.search-submit {
    position: absolute;
    right: 5px;
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.search-submit:hover {
    background: var(--primary-hover);
}

/* Balance Display */
.sidebar-balance {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-balance:hover {
    background: rgba(255, 255, 255, 0.15);
}

.balance-add-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    transition: color 0.2s ease;
}

.sidebar-balance:hover .balance-add-icon {
    color: rgba(255, 255, 255, 0.8);
}

.balance-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.balance-label i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    width: 16px;
    display: inline-block;
}

.balance-amount {
    font-size: 24px;
    font-weight: 600;
    color: white;
}

.balance-dropdown {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    font-size: 24px;
    font-weight: 600;
}

.balance-dropdown i {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.balance-dropdown:hover {
    color: var(--primary-hover);
}

.balance-dropdown:hover i {
    color: rgba(255, 255, 255, 0.8);
}

.balance-dropdown[aria-expanded="true"] i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none !important;
    transition: all 0.2s;
    position: relative;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none !important;
}

.nav-link:focus {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none !important;
}

.nav-link:active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none !important;
}

.nav-item.active > .nav-link {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-item.active > .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: white;
}

.nav-link i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge inside nav text */
.nav-text .badge {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1e9e74 !important;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.nav-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #1e9e74;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Submenu */
.has-submenu .submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 12px;
}

.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

/* Ensure hover state doesn't persist on parent menu after closing submenu */
.has-submenu > .nav-link {
    transition: background-color 0.2s ease;
}

/* Only show hover background when actually hovering, not when submenu is open */
.has-submenu:not(.open) > .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Different background when submenu is open */
.has-submenu.open > .nav-link {
    background: rgba(255, 255, 255, 0.08);
}

/* Visual indicator when submenu contains active item */
.has-submenu:has(.submenu-item.active) > .nav-link {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid rgba(255, 255, 255, 0.5);
    padding-left: 12px;
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    list-style: none;
}

.has-submenu.open .submenu {
    max-height: 500px;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 35px;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 13px;
    transition: all 0.2s;
    width: 100%;
    border: none !important;
    outline: none !important;
    position: relative;
}

.submenu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    text-decoration: none !important;
}

.submenu-link:focus {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    text-decoration: none !important;
    border-radius: 4px;
}

.submenu-link:active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
    text-decoration: none !important;
}

.submenu-link:visited {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
}

.submenu-link i {
    width: 16px;
    margin-right: 10px;
    font-size: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.submenu-link:hover i {
    color: white;
}

.submenu-text {
    flex: 1;
}

.submenu-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.submenu-item.active .submenu-link {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
}

/* Left border for active submenu item */
.submenu-item.active .submenu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: white;
}

.submenu-item.active .submenu-link i {
    color: white;
}

/* Account Section */
.nav-section {
    border-top: 1px solid var(--border-light);
    padding: 10px 0;
    margin-top: 10px;
}

.nav-section-title {
    padding: 10px 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* Collapsed sidebar submenu handling */
body.sidebar-collapsed .submenu {
    display: block !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

body.sidebar-collapsed .has-submenu.open .submenu {
    max-height: 500px;
    display: block !important;
}

body.sidebar-collapsed .submenu-link {
    padding: 10px 12px;
    justify-content: center;
}

body.sidebar-collapsed .submenu-link i {
    margin: 0;
    font-size: 18px;
}

body.sidebar-collapsed .submenu-text {
    display: none;
}

/* Sidebar tooltip (JavaScript-based) */
.sidebar-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    display: none;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sidebar-tooltip.active {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 8px 5px 0;
    border-color: transparent rgba(0, 0, 0, 0.95) transparent transparent;
}

/* Ensure tooltips work in dark theme */
[data-theme="dark"] .sidebar-tooltip {
    background: rgba(30, 30, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .sidebar-tooltip::before {
    border-color: transparent rgba(30, 30, 35, 0.98) transparent transparent;
}

/* Main Content Adjustment */
.main-content {
    transition: margin-left 0.3s ease;
    /*min-height: calc(100vh - 60px);*/
}

.main-content.with-sidebar {
    margin-left: 260px;
}

/* Footer with sidebar */
.legal-footer {
    transition: margin-left 0.3s ease;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: 20px 0;
    margin-top: auto;
}

.legal-footer.with-sidebar {
    margin-left: 260px;
}

/* Collapsed State */
/* Disable transitions during initial page load */
html:not(.transitions-ready) .sidebar,
html:not(.transitions-ready) .main-content.with-sidebar,
html:not(.transitions-ready) .legal-footer.with-sidebar {
    transition: none !important;
}

/* Preload collapsed state - Applied to HTML element before body classes are ready */
html.sidebar-collapsed-preload .sidebar {
    width: 70px !important;
}

html.sidebar-collapsed-preload .main-content.with-sidebar {
    margin-left: 70px !important;
}

html.sidebar-collapsed-preload .legal-footer.with-sidebar {
    margin-left: 70px !important;
}

html.sidebar-collapsed-preload .nav-text,
html.sidebar-collapsed-preload .sidebar-search,
html.sidebar-collapsed-preload .sidebar-balance,
html.sidebar-collapsed-preload .nav-section-title,
html.sidebar-collapsed-preload .submenu-arrow,
html.sidebar-collapsed-preload .nav-badge {
    display: none !important;
}

html.sidebar-collapsed-preload .nav-link {
    justify-content: center !important;
    padding: 12px !important;
}

html.sidebar-collapsed-preload .nav-link i {
    margin: 0 !important;
    font-size: 20px !important;
}

/* Normal collapsed state */
body.sidebar-collapsed .sidebar {
    width: 70px;
}

body.sidebar-collapsed .main-content.with-sidebar {
    margin-left: 70px;
}

body.sidebar-collapsed .legal-footer.with-sidebar {
    margin-left: 70px;
}

body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .sidebar-search,
body.sidebar-collapsed .sidebar-balance,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .submenu-arrow,
body.sidebar-collapsed .nav-badge {
    display: none;
}

body.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 12px;
}

body.sidebar-collapsed .nav-link i {
    margin: 0;
    font-size: 20px;
}

/* Sidebar header removed - using hamburger instead */

/* Submenu already handled above with proper expand/collapse */

body.sidebar-collapsed .nav-item.active > .nav-link::before {
    display: none;
}

/* Tooltip for collapsed items */
body.sidebar-collapsed .nav-item {
    position: relative;
}

body.sidebar-collapsed .nav-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    pointer-events: none;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* Mobile Styles */
@media (max-width: 768px) {

    
    /* Prevent body from horizontal scroll affecting header */
    body {
        overflow-x: auto;
    }
    
    /* Header components should fit within viewport */
    .header-left,
    .header-right {
        flex-shrink: 0;
    }
    
    .header-right {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    
    /* Ensure header buttons stay visible */
    .theme-toggle,
    .user-menu-toggle {
        min-width: auto;
        flex-shrink: 0;
    }
    
    .sidebar {
        width: 100% !important;
        z-index: 9999 !important; /* Maximum z-index to ensure it's on top */
        position: fixed !important;
        top: 60px !important;
        bottom: 0 !important;
        left: -100% !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    body.sidebar-open .sidebar {
        left: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .main-content.with-sidebar {
        margin-left: 0 !important;
    }
    
    .legal-footer.with-sidebar {
        margin-left: 0 !important;
    }
    
    body.sidebar-open .mobile-menu-overlay {
        display: block !important;
        z-index: 1000 !important;
    }
    
    body.sidebar-collapsed .sidebar {
        width: 100% !important;
        left: -100% !important;
    }
    
    body.sidebar-collapsed.sidebar-open .sidebar {
        left: 0 !important;
    }
    
    /* Override collapsed state on mobile - always show full menu */
    body.sidebar-collapsed .nav-text,
    body.sidebar-collapsed .sidebar-search,
    body.sidebar-collapsed .sidebar-balance,
    body.sidebar-collapsed .nav-section-title,
    body.sidebar-collapsed .submenu-arrow,
    body.sidebar-collapsed .nav-badge {
        display: block !important;
    }
    
    body.sidebar-collapsed .nav-link {
        justify-content: flex-start !important;
        padding: 12px 20px !important;
    }
    
    body.sidebar-collapsed .nav-link i {
        margin-right: 12px !important;
        font-size: 18px !important;
    }
    
    body.sidebar-collapsed .sidebar-search {
        display: block !important;
        opacity: 1 !important;
    }
    
    body.sidebar-collapsed .sidebar-balance {
        display: flex !important;
        opacity: 1 !important;
    }
    
    body.sidebar-collapsed .balance-label span,
    body.sidebar-collapsed .balance-amount {
        display: block !important;
    }
    
    body.sidebar-collapsed .nav-link {
        justify-content: flex-start !important;
    }
    
    body.sidebar-collapsed .nav-link i {
        margin-right: 12px !important;
        font-size: 18px !important;
    }
    
    /* No collapse button needed on mobile - using hamburger */
    
    .user-name {
        display: none;
    }
    
    .header-logo .site-name {
        font-size: 16px;
    }
}

/* Dark Theme Adjustments */
[data-theme="dark"] .top-header {
    background: var(--bg-secondary);
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .sidebar {
    background: var(--gradient-sidebar);
    border-right-color: var(--border-light);
}

[data-theme="dark"] .sidebar-search,
[data-theme="dark"] .sidebar-balance,
[data-theme="dark"] .nav-section,
[data-theme="dark"] .sidebar-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-input-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .sidebar-balance {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .submenu {
    background: rgba(0, 0, 0, 0.2);
}

/* Dark theme - sidebar header removed */

[data-theme="dark"] .user-menu-toggle {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

[data-theme="dark"] .legal-footer {
    background: var(--bg-secondary);
    border-top-color: var(--border-light);
}

/* Animations removed for instant display */

/* Print Styles */
@media print {
    .sidebar,
    .top-header,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .main-content.with-sidebar {
        margin-left: 0 !important;
    }
    
    /* Allow main content to scroll horizontally for tables */
    .main-content {
        overflow-x: auto !important;
        width: 100%;
    }
    
    /* Tables should be scrollable horizontally on mobile */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
}

/* ============================================
   MARKETING POPUP SYSTEM
   ============================================ */

.popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin: 0 !important;
    box-sizing: border-box;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    position: relative;
}

.popup-overlay.show .popup-container {
    transform: scale(1) translateY(0);
}

.popup-header {
    position: relative;
    padding: 15px 20px 0;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.popup-content {
    padding: 0 30px 30px;
    text-align: center;
}

.popup-icon {
    margin-bottom: 20px;
}

.popup-icon i {
    font-size: 48px;
    color: var(--primary-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popup-body h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 700;
}

.popup-body p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.popup-body ul {
    text-align: left;
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.popup-body li {
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    line-height: 1.5;
}

.popup-body li strong {
    color: var(--text-primary);
}

.popup-note {
    font-style: italic;
    color: var(--text-tertiary);
    font-size: 14px;
    margin-top: 20px !important;
    margin-bottom: 0;
}

.popup-actions {
    margin-top: 25px;
}

.popup-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.popup-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .popup-container {
        max-width: calc(100vw - 40px);
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .popup-content {
        padding: 0 20px 25px;
    }
    
    .popup-body h3 {
        font-size: 20px;
    }
    
    .popup-icon i {
        font-size: 40px;
    }
    
    .popup-btn {
        width: 100%;
        justify-content: center;
    }

    /* Prevent tables from pushing header */
    .panel-body {
        overflow-x: auto;
        max-width: 100vw;
    }
}

/* ============================================
   DESIGN FEEDBACK WIDGET
   ============================================ */

/*.sidebar-feedback-widget {
    position: absolute;
    bottom: 20px;
    left: 15px;
    right: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    z-index: 100;
    overflow: hidden;
}*/

/* Hide widget by default - shown via JS if not voted */
.sidebar-feedback-widget {
    display: none;
    margin: 15px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Hide when sidebar is collapsed on desktop */
.sidebar-collapsed .sidebar-feedback-widget {
    display: none !important;
}

.feedback-header {
    background: var(--bg-secondary);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.feedback-header i {
    font-size: 16px;
    color: var(--primary);
}

.feedback-header span {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    color: var(--text-primary);
}

.feedback-buttons {
    padding: 12px;
    display: flex;
    gap: 8px;
    background: var(--bg-card);
}

.feedback-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
}

.feedback-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.feedback-btn i {
    font-size: 14px;
}

.feedback-yes:hover {
    background: rgba(30, 158, 116, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.feedback-no:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #EF4444;
    color: #EF4444;
}

.feedback-yes.selected {
    background: linear-gradient(135deg, #10B981, #059669);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.feedback-no.selected {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.feedback-yes.selected i,
.feedback-no.selected i {
    transform: scale(1.1);
}

.feedback-comment {
    padding: 0 16px 16px;
    animation: slideDown 0.3s ease;
    background: var(--bg-card);
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

.feedback-textarea {
    width: 100%;
    min-height: 70px;
    max-height: 120px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 10px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.feedback-textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 0.7;
}

.feedback-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.08);
}

.feedback-submit {
    width: 100%;
    padding: 10px 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.feedback-submit:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.feedback-submit:hover:before {
    left: 100%;
}

.feedback-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.feedback-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.feedback-thank-you {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 20px;
    color: #10B981;
    animation: fadeIn 0.5s ease;
    background: var(--bg-card);
    text-align: center;
}

.feedback-thank-you i {
    font-size: 42px;
    background: linear-gradient(135deg, #10B981, #059669);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: bounce 0.6s ease;
}

.feedback-thank-you span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Dark theme specific adjustments for feedback widget */
[data-theme="dark"] .sidebar-feedback-widget {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .feedback-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .feedback-header i {
    color: var(--primary-dark-mode);
}

[data-theme="dark"] .feedback-header span {
    color: var(--text-primary);
}

[data-theme="dark"] .feedback-buttons {
    background: var(--bg-card);
}

[data-theme="dark"] .feedback-btn {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .feedback-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-dark-mode);
    transform: translateY(-1px);
}

[data-theme="dark"] .feedback-yes:hover {
    background: rgba(24, 80, 64, 0.15);
    border-color: var(--primary-dark-mode);
    color: var(--primary-dark-mode);
}

[data-theme="dark"] .feedback-no:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #EF4444;
    color: #EF4444;
}

[data-theme="dark"] .feedback-btn.selected {
    background: var(--gradient-primary-dark);
    border-color: var(--primary-dark-mode);
    color: white;
}

[data-theme="dark"] .feedback-comment {
    background: var(--bg-secondary);
}

[data-theme="dark"] .feedback-thank-you {
    background: var(--bg-secondary);
}

[data-theme="dark"] .feedback-textarea {
    background: var(--bg-tertiary);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-theme="dark"] .feedback-textarea:focus {
    background: var(--bg-card);
    border-color: var(--primary-color);
}

[data-theme="dark"] .feedback-submit {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
}

[data-theme="dark"] .feedback-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============================================
   DARK MODE - BUTTONS
   ============================================ */

/* Primary buttons in dark mode */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:link,
[data-theme="dark"] .btn-primary:visited {
    background: var(--gradient-primary-dark);
    border-color: var(--primary-dark-mode);
    color: white;
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--gradient-primary-dark-hover);
    border-color: var(--primary-dark-mode-hover);
    box-shadow: 0 4px 12px rgba(34, 109, 88, 0.3);
}

[data-theme="dark"] .btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(34, 109, 88, 0.3);
}

/* Default buttons in dark mode */
[data-theme="dark"] .btn-default {
    background: var(--bg-tertiary);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-default:hover {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* Success buttons in dark mode */
[data-theme="dark"] .btn-success {
    background: var(--gradient-primary-dark);
    border-color: var(--primary-dark-mode);
}

[data-theme="dark"] .btn-success:hover {
    background: var(--gradient-primary-dark-hover);
    border-color: var(--primary-dark-mode-hover);
}

/* Danger buttons in dark mode */
[data-theme="dark"] .btn-danger {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    border-color: #c0392b;
}

[data-theme="dark"] .btn-danger:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #ec7063 100%);
    border-color: #e74c3c;
}

/* Warning buttons in dark mode */
[data-theme="dark"] .btn-warning {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    border-color: #e67e22;
    color: white;
}

[data-theme="dark"] .btn-warning:hover {
    background: linear-gradient(135deg, #f39c12 0%, #f5b041 100%);
    border-color: #f39c12;
    color: white;
}

/* Info buttons in dark mode */
[data-theme="dark"] .btn-info {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    border-color: #2980b9;
}

[data-theme="dark"] .btn-info:hover {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
    border-color: #3498db;
}

/* Button links in dark mode */
[data-theme="dark"] .btn-link {
    color: var(--primary-color);
}

[data-theme="dark"] .btn-link:hover {
    color: var(--primary-dark-mode-light);
}

/* Base button in dark mode - Style vert cohérent */
[data-theme="dark"] .btn {
    background: var(--gradient-primary-dark);
    border-color: var(--primary-dark-mode);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn:hover {
    background: var(--gradient-primary-dark-hover);
    border-color: var(--primary-dark-mode-hover);
    color: white;
    box-shadow: 0 4px 12px rgba(24, 80, 64, 0.3);
    transform: translateY(-1px);
}

[data-theme="dark"] .btn:active {
    background: var(--gradient-primary-dark);
    border-color: var(--primary-dark-mode);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(24, 80, 64, 0.15);
}

[data-theme="dark"] .btn:focus {
    box-shadow: 0 0 0 3px rgba(24, 80, 64, 0.3);
    outline: none;
}

/* Disabled buttons in dark mode */
[data-theme="dark"] .btn:disabled,
[data-theme="dark"] .btn.disabled {
    background: var(--bg-tertiary);
    border-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    opacity: 0.5;
}

/* ============================================
   DARK MODE - ICONS
   ============================================ */

/* News, Guidelines, Payment, FAQ icons in dark mode */
[data-theme="dark"] .news-title i {
    color: var(--primary-dark-mode);
}

[data-theme="dark"] .guidelines-title i {
    color: var(--primary-dark-mode);
}

[data-theme="dark"] .payment-method-block .payment-label i {
    color: var(--primary-dark-mode);
}

[data-theme="dark"] .payment-method-block.active .payment-label i {
    color: var(--primary-dark-mode-light);
}

[data-theme="dark"] .faq-section-title i {
    color: var(--primary-dark-mode);
}

/* Autres icônes communes */
[data-theme="dark"] .service-guidelines-container i {
    color: var(--primary-dark-mode);
}

[data-theme="dark"] .news-widget-header i {
    color: var(--primary-dark-mode);
}

[data-theme="dark"] .section-header i {
    color: var(--primary-dark-mode);
}

/* ============================================
   DARK MODE - COMPREHENSIVE COMPONENTS
   ============================================ */

/* Alerts in dark mode */
[data-theme="dark"] .alert {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .alert-success {
    background: linear-gradient(135deg, rgba(24, 80, 64, 0.15) 0%, rgba(34, 109, 88, 0.15) 100%);
    border-color: rgba(24, 80, 64, 0.3);
    color: var(--primary-dark-mode-light);
}

[data-theme="dark"] .alert-danger {
    background: linear-gradient(135deg, rgba(192, 57, 43, 0.15) 0%, rgba(231, 76, 60, 0.15) 100%);
    border-color: rgba(192, 57, 43, 0.3);
    color: #ec7063;
}

[data-theme="dark"] .alert-warning {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.15) 0%, rgba(243, 156, 18, 0.15) 100%);
    border-color: rgba(230, 126, 34, 0.3);
    color: #f5b041;
}

[data-theme="dark"] .alert-info {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.15) 0%, rgba(52, 152, 219, 0.15) 100%);
    border-color: rgba(41, 128, 185, 0.3);
    color: #5dade2;
}

/* Panels in dark mode */
[data-theme="dark"] .panel {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .panel-default {
    border-color: var(--border-color);
}

[data-theme="dark"] .panel-default > .panel-heading {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .panel-body {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Tables in dark mode */
[data-theme="dark"] .table {
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-theme="dark"] .table thead th {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .table-hover > tbody > tr:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .table > thead > tr > th,
[data-theme="dark"] .table > tbody > tr > th,
[data-theme="dark"] .table > tfoot > tr > th,
[data-theme="dark"] .table > thead > tr > td,
[data-theme="dark"] .table > tbody > tr > td,
[data-theme="dark"] .table > tfoot > tr > td {
    border-color: var(--border-color);
}

/* Dropdowns in dark mode */
[data-theme="dark"] .dropdown-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .dropdown-menu > li > a {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-menu > li > a:hover,
[data-theme="dark"] .dropdown-menu > li > a:focus {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-divider {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .dropdown-header {
    color: var(--text-secondary);
}

/* Modals in dark mode */
[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-header {
    background: var(--bg-tertiary);
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-body {
    color: var(--text-primary);
}

[data-theme="dark"] .modal-footer {
    background: var(--bg-tertiary);
    border-top-color: var(--border-color);
}

[data-theme="dark"] .modal-backdrop {
    background-color: #000;
}

[data-theme="dark"] .close {
    color: var(--text-primary);
    opacity: 0.8;
}

[data-theme="dark"] .close:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* Navigation tabs in dark mode */
[data-theme="dark"] .nav-tabs {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .nav-tabs > li > a {
    color: var(--text-secondary);
}

[data-theme="dark"] .nav-tabs > li > a:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .nav-tabs > li.active > a,
[data-theme="dark"] .nav-tabs > li.active > a:hover,
[data-theme="dark"] .nav-tabs > li.active > a:focus {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    border-bottom-color: transparent;
    color: var(--text-primary);
}

[data-theme="dark"] .tab-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-top: none;
    padding: 20px;
}

/* Wells in dark mode */
[data-theme="dark"] .well {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Input groups in dark mode */
[data-theme="dark"] .input-group-addon {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Badges and labels in dark mode */
[data-theme="dark"] .badge {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .label-default {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .label-primary {
    background: var(--primary-dark);
}

[data-theme="dark"] .label-success {
    background: var(--primary-dark-mode);
}

[data-theme="dark"] .label-danger {
    background: #c0392b;
}

[data-theme="dark"] .label-warning {
    background: #e67e22;
}

[data-theme="dark"] .label-info {
    background: #2980b9;
}

/* Progress bars in dark mode */
[data-theme="dark"] .progress {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .progress-bar {
    background: var(--gradient-primary);
}

/* List groups in dark mode */
[data-theme="dark"] .list-group-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .list-group-item:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] a.list-group-item {
    color: var(--text-primary);
}

[data-theme="dark"] a.list-group-item:hover,
[data-theme="dark"] a.list-group-item:focus {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Breadcrumbs in dark mode */
[data-theme="dark"] .breadcrumb {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .breadcrumb > li + li:before {
    color: var(--text-secondary);
}

[data-theme="dark"] .breadcrumb > .active {
    color: var(--text-secondary);
}

/* Pagination in dark mode */
[data-theme="dark"] .pagination > li > a,
[data-theme="dark"] .pagination > li > span {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .pagination > li > a:hover,
[data-theme="dark"] .pagination > li > span:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .pagination > .active > a,
[data-theme="dark"] .pagination > .active > span {
    background: var(--primary);
    border-color: var(--primary);
}

/* Tooltips in dark mode */
[data-theme="dark"] .tooltip-inner {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .tooltip.top .tooltip-arrow {
    border-top-color: var(--bg-tertiary);
}

[data-theme="dark"] .tooltip.bottom .tooltip-arrow {
    border-bottom-color: var(--bg-tertiary);
}

[data-theme="dark"] .tooltip.left .tooltip-arrow {
    border-left-color: var(--bg-tertiary);
}

[data-theme="dark"] .tooltip.right .tooltip-arrow {
    border-right-color: var(--bg-tertiary);
}

/* Specific fixes for common patterns */
[data-theme="dark"] .border-solid {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .border-rounded {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .bg-white {
    background: var(--bg-card) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

/* ============================================
   SIGN-IN PAGE STYLES
   ============================================ */

/* Sign-in page specific layout */
.signin-container {
    /*min-height: 100vh;*/
    display: flex;
    /*align-items: center;
    justify-content: center;
    padding: 20px 0;*/
}

/* Theme toggle in header for signin page */
.signin-top-header {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Logo section */
.signin-logo {
    text-align: center;
    margin-bottom: 30px;
}

.signin-logo h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

/* Sign-in panel container */
.signin-panel {
    max-width: 420px;
    margin: 0 auto;
}

.signin-panel .panel-body {
    padding: 35px;
}

/* Sign-in form title */
.signin-title {
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 20px;
    font-weight: 600;
}

/* Password field with toggle button */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
}

.password-toggle:hover {
    color: var(--primary);
}

.password-toggle:focus {
    outline: none;
}

/* Remember me and forgot password row */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-forgot .checkbox {
    margin: 0;
}

/* Divider for social login */
.signin-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.signin-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.signin-divider span {
    background: var(--card-bg, #fff);
    padding: 0 15px;
    position: relative;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Sign-in footer with signup link */
.signin-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

/* Sign-in submit button */
.btn-signin {
    width: 100%;
    height: 45px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Animated background for signin page */
.signin-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: var(--bg-primary);
    overflow: hidden;
}

.signin-bg::before,
.signin-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(100px);
}

.signin-bg::before {
    width: 600px;
    height: 600px;
    background: var(--gradient-primary, linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%));
    top: -300px;
    left: -200px;
}

.signin-bg::after {
    width: 500px;
    height: 500px;
    background: var(--gradient-secondary, linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%));
    bottom: -250px;
    right: -200px;
}

/* Dark theme adjustments for signin */
[data-theme="dark"] .signin-divider span {
    background: var(--bg-secondary, #1e293b);
}

[data-theme="dark"] .signin-panel .panel-body {
    background: var(--bg-secondary);
}

/* Mobile responsive for signin */
@media (max-width: 480px) {
    .signin-panel .panel-body {
        padding: 25px 20px;
    }
    
    .signin-logo h1 {
        font-size: 26px;
    }
    
    .signin-bg::before,
    .signin-bg::after {
        filter: blur(120px);
    }
}