/* Professional Theme System CSS */
:root {
    /* Default Theme - Modern Purple */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --dark-blue: #1e1b4b;
    --dark: #0f0f23;
    --gradient-bg: linear-gradient(135deg, #0f0f23 0%, #1e1b4b 50%, #312e81 100%);
    --accent-color: #fbbf24;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --sidebar-bg: linear-gradient(180deg, rgba(15, 15, 35, 0.95) 0%, rgba(30, 27, 75, 0.9) 100%);
    --header-bg: linear-gradient(90deg, rgba(15, 15, 35, 0.98) 0%, rgba(30, 27, 75, 0.95) 100%);
    --glass-effect: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Dark Blue Theme - Ocean Professional */
body[data-theme="dark-blue"] {
    --primary-color: #0ea5e9;
    --secondary-color: #38bdf8;
    --dark-blue: #082f49;
    --dark: #0c1421;
    --gradient-bg: linear-gradient(135deg, #0c1421 0%, #082f49 50%, #0e4d6a 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(12, 20, 33, 0.95) 0%, rgba(8, 47, 73, 0.9) 100%);
    --header-bg: linear-gradient(90deg, rgba(12, 20, 33, 0.98) 0%, rgba(8, 47, 73, 0.95) 100%);
    --accent-color: #0ea5e9;
}

/* Purple Theme - Royal Professional */
body[data-theme="purple"] {
    --primary-color: #9333ea;
    --secondary-color: #c084fc;
    --dark-blue: #581c87;
    --dark: #1a0933;
    --gradient-bg: linear-gradient(135deg, #1a0933 0%, #581c87 50%, #7c3aed 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(26, 9, 51, 0.95) 0%, rgba(88, 28, 135, 0.9) 100%);
    --header-bg: linear-gradient(90deg, rgba(26, 9, 51, 0.98) 0%, rgba(88, 28, 135, 0.95) 100%);
    --accent-color: #c084fc;
}

/* Green Theme - Forest Professional */
body[data-theme="green"] {
    --primary-color: #059669;
    --secondary-color: #34d399;
    --dark-blue: #064e3b;
    --dark: #0a1f19;
    --gradient-bg: linear-gradient(135deg, #0a1f19 0%, #064e3b 50%, #047857 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(10, 31, 25, 0.95) 0%, rgba(6, 78, 59, 0.9) 100%);
    --header-bg: linear-gradient(90deg, rgba(10, 31, 25, 0.98) 0%, rgba(6, 78, 59, 0.95) 100%);
    --accent-color: #6ee7b7;
}

/* Red Theme - Fire Professional */
body[data-theme="red"] {
    --primary-color: #dc2626;
    --secondary-color: #f87171;
    --dark-blue: #7f1d1d;
    --dark: #1f0a0a;
    --gradient-bg: linear-gradient(135deg, #1f0a0a 0%, #7f1d1d 50%, #991b1b 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(31, 10, 10, 0.95) 0%, rgba(127, 29, 29, 0.9) 100%);
    --header-bg: linear-gradient(90deg, rgba(31, 10, 10, 0.98) 0%, rgba(127, 29, 29, 0.95) 100%);
    --accent-color: #fca5a5;
}

/* Gold Theme - Luxury Professional */
body[data-theme="gold"] {
    --primary-color: #d97706;
    --secondary-color: #fbbf24;
    --dark-blue: #78350f;
    --dark: #1c1004;
    --gradient-bg: linear-gradient(135deg, #1c1004 0%, #78350f 50%, #92400e 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(28, 16, 4, 0.95) 0%, rgba(120, 53, 15, 0.9) 100%);
    --header-bg: linear-gradient(90deg, rgba(28, 16, 4, 0.98) 0%, rgba(120, 53, 15, 0.95) 100%);
    --accent-color: #fcd34d;
}

/* Midnight Theme - Black Blue Professional */
body[data-theme="midnight"] {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --dark-blue: #0f172a;
    --dark: #020617;
    --gradient-bg: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e293b 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.95) 100%);
    --header-bg: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.95) 100%);
    --accent-color: #60a5fa;
}

/* Dark Pink Theme - Black Pink Elegant */
body[data-theme="dark-pink"] {
    --primary-color: #be185d;
    --secondary-color: #ec4899;
    --dark-blue: #1f1726;
    --dark: #0c0a0f;
    --gradient-bg: linear-gradient(135deg, #0c0a0f 0%, #1f1726 50%, #2d1b35 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(12, 10, 15, 0.98) 0%, rgba(31, 23, 38, 0.95) 100%);
    --header-bg: linear-gradient(90deg, rgba(12, 10, 15, 0.98) 0%, rgba(31, 23, 38, 0.95) 100%);
    --accent-color: #f472b6;
}

/* Neon Green Theme - Black Green Cyber */
body[data-theme="neon-green"] {
    --primary-color: #16a34a;
    --secondary-color: #22c55e;
    --dark-blue: #0a1f0c;
    --dark: #040805;
    --gradient-bg: linear-gradient(135deg, #040805 0%, #0a1f0c 50%, #0f2a12 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(4, 8, 5, 0.98) 0%, rgba(10, 31, 12, 0.95) 100%);
    --header-bg: linear-gradient(90deg, rgba(4, 8, 5, 0.98) 0%, rgba(10, 31, 12, 0.95) 100%);
    --accent-color: #4ade80;
}

/* Orange Fire Theme - Black Orange Dynamic */
body[data-theme="orange-fire"] {
    --primary-color: #ea580c;
    --secondary-color: #f97316;
    --dark-blue: #1f1408;
    --dark: #0c0602;
    --gradient-bg: linear-gradient(135deg, #0c0602 0%, #1f1408 50%, #2d1e0a 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(12, 6, 2, 0.98) 0%, rgba(31, 20, 8, 0.95) 100%);
    --header-bg: linear-gradient(90deg, rgba(12, 6, 2, 0.98) 0%, rgba(31, 20, 8, 0.95) 100%);
    --accent-color: #fb923c;
}

/* Violet Dark Theme - Deep Purple Professional */
body[data-theme="violet-dark"] {
    --primary-color: #7c3aed;
    --secondary-color: #a855f7;
    --dark-blue: #2e1065;
    --dark: #0f0319;
    --gradient-bg: linear-gradient(135deg, #0f0319 0%, #2e1065 50%, #4c1d95 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(15, 3, 25, 0.98) 0%, rgba(46, 16, 101, 0.95) 100%);
    --header-bg: linear-gradient(90deg, rgba(15, 3, 25, 0.98) 0%, rgba(46, 16, 101, 0.95) 100%);
    --accent-color: #c084fc;
}

/* Teal Ocean Theme - Deep Sea Professional */
body[data-theme="teal-ocean"] {
    --primary-color: #0d9488;
    --secondary-color: #14b8a6;
    --dark-blue: #042f2e;
    --dark: #001716;
    --gradient-bg: linear-gradient(135deg, #001716 0%, #042f2e 50%, #0a4a47 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(0, 23, 22, 0.98) 0%, rgba(4, 47, 46, 0.95) 100%);
    --header-bg: linear-gradient(90deg, rgba(0, 23, 22, 0.98) 0%, rgba(4, 47, 46, 0.95) 100%);
    --accent-color: #2dd4bf;
}

/* Crimson Dark Theme - Deep Red Professional */
body[data-theme="crimson-dark"] {
    --primary-color: #b91c1c;
    --secondary-color: #dc2626;
    --dark-blue: #450a0a;
    --dark: #1a0404;
    --gradient-bg: linear-gradient(135deg, #1a0404 0%, #450a0a 50%, #7f1d1d 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(26, 4, 4, 0.98) 0%, rgba(69, 10, 10, 0.95) 100%);
    --header-bg: linear-gradient(90deg, rgba(26, 4, 4, 0.98) 0%, rgba(69, 10, 10, 0.95) 100%);
    --accent-color: #f87171;
}

/* Silver Grey Theme - Modern Professional */
body[data-theme="silver-grey"] {
    --primary-color: #4b5563;
    --secondary-color: #6b7280;
    --dark-blue: #1f2937;
    --dark: #0a0b0f;
    --gradient-bg: linear-gradient(135deg, #0a0b0f 0%, #1f2937 50%, #374151 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(10, 11, 15, 0.98) 0%, rgba(31, 41, 55, 0.95) 100%);
    --header-bg: linear-gradient(90deg, rgba(10, 11, 15, 0.98) 0%, rgba(31, 41, 55, 0.95) 100%);
    --accent-color: #9ca3af;
}

/* Rose Gold Theme - Pink Gold Luxury */
body[data-theme="rose-gold"] {
    --primary-color: #be123c;
    --secondary-color: #f59e0b;
    --dark-blue: #3f1115;
    --dark: #170507;
    --gradient-bg: linear-gradient(135deg, #170507 0%, #3f1115 50%, #78350f 100%);
    --sidebar-bg: linear-gradient(180deg, rgba(23, 5, 7, 0.98) 0%, rgba(63, 17, 21, 0.95) 100%);
    --header-bg: linear-gradient(90deg, rgba(23, 5, 7, 0.98) 0%, rgba(63, 17, 21, 0.95) 100%);
    --accent-color: #fbbf24;
}

/* Fixed Sidebar System */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(25px);
    border-right: 2px solid var(--border-color);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    opacity: 0.8;
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    width: 70px;
}

/* Professional Header - Fixed next to sidebar */
.main-header {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    height: 70px;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(25px);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.sidebar.collapsed ~ .main-header,
body.sidebar-collapsed .main-header {
    left: 70px;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.6;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    height: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

.sidebar-toggle-header {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.sidebar-toggle-header:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.header-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.header-logo-text {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(45deg, #fff, var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-logo-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.sidebar-toggle-btn:hover {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.1);
}

.sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav-item {
    display: block;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    font-weight: 500;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--secondary-color);
    transform: translateX(5px);
    text-decoration: none;
}

.sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    font-weight: 600;
}

.sidebar-nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Sidebar Footer - Social Media */
.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-footer-content {
    text-align: center;
}

.sidebar-footer-title {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 15px 0;
}

.sidebar-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sidebar-social-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-social-link:hover {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Theme Selector */
.theme-selector {
    position: relative;
    margin-left: 10px;
}

.theme-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--secondary-color);
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    padding: 10px 0;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
    display: none;
}

.theme-dropdown.show {
    display: block;
}

.theme-option {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    text-decoration: none;
}

.theme-option.active {
    background: var(--primary-color);
    color: white;
}

/* Layout Adjustments for Sidebar and Header */
body {
    background: var(--gradient-bg);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

/* Main Content Layout - NO SCROLL */
.main-content {
    position: absolute;
    top: 70px; /* Header height */
    left: 280px; /* Sidebar width */
    right: 0;
    min-height: calc(100vh - 70px);
    overflow-y: visible; /* NO SCROLL */
    padding: 20px;
    transition: all 0.3s ease;
    background: var(--gradient-bg);
}

/* Collapsed sidebar adjustment */
.sidebar.collapsed ~ .main-content,
body.sidebar-collapsed .main-content {
    left: 70px;
}

/* Container düzenlemeleri */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Mini Sidebar System */
.mini-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(25px);
    border-right: 2px solid var(--border-color);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    padding: 20px 0;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.mini-sidebar.active {
    display: flex;
}

.mini-nav-item {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.mini-nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--secondary-color);
    transform: translateX(8px) skewX(-5deg);
    border-color: var(--secondary-color);
    text-decoration: none;
}

.mini-nav-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.mini-nav-item i {
    font-size: 1.2rem;
}

.mini-sidebar-social {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-social-item {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mini-social-item:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--secondary-color);
    transform: translateX(5px);
    text-decoration: none;
}

/* Hide normal sidebar when mini is active */
.sidebar.mini-mode {
    left: -280px;
}

/* Dynamic header positioning based on sidebar mode */
body.mini-sidebar-active .main-header {
    left: 80px !important;
    transition: left 0.3s ease;
}

body.mini-sidebar-active .main-content {
    left: 80px !important;
    transition: left 0.3s ease;
}

/* Show header logo when mini sidebar is active */
body.mini-sidebar-active .header-logo {
    display: flex !important;
    opacity: 1 !important;
}

/* Hide header logo when normal sidebar is active - DESKTOP ONLY */
@media (min-width: 769px) {
    body:not(.mini-sidebar-active) .header-logo {
        display: none !important;
    }
}

/* Hide toggle button in desktop since sidebar is always visible */
.sidebar-toggle {
    display: none;
}

/* Sidebar toggle butonu */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: none;
}

.sidebar-toggle:hover {
    background: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

.sidebar-toggle.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Page content düzenlemeleri */
.page-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.page-title {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* NEW MOBILE HEADER DESIGN - All Elements Visible */
@media (max-width: 768px) {
    /* Mobile: Sidebar becomes overlay */
    .sidebar {
        left: -280px;
        z-index: 1001;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    /* Mobile: Full width header - optimized height for all elements */
    .main-header {
        left: 0;
        right: 0;
        height: 60px;
        transition: all 0.3s ease;
    }
    
    .main-content {
        left: 0;
        right: 0;
        top: 60px;
        transition: all 0.3s ease;
    }
    
    /* Mobile: NO SLIDING - Sidebar is overlay only */
    /* Remove all transform translations - sidebar should be overlay */
    
    /* Show overlay on mobile when sidebar is open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* Mobile header container - ALL ELEMENTS FIT */
    .header-container {
        padding: 5px 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 3px;
        height: 100%;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    /* Mobile: Compact hamburger menu */
    .sidebar-toggle-header {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        margin: 0;
        flex-shrink: 0;
        padding: 0;
    }
    
    /* Mobile header left section - Logo area */
    .header-left {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 0 0 auto;
        min-width: 0;
    }
    
    /* Mobile: VERTICAL stacked logo - logo top, name bottom */
    .header-logo {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        flex-shrink: 0;
        opacity: 1 !important;
        visibility: visible !important;
        width: 65px; /* Increased width for full name */
        height: 50px;
        text-decoration: none;
    }
    
    .header-logo img {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
        display: block;
    }
    
    .header-logo-text {
        font-size: 0.65rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: visible; /* Show full text */
        text-overflow: clip;
        max-width: 65px; /* Match logo width */
        line-height: 1;
        text-align: center;
        color: rgba(255, 255, 255, 0.9);
        word-break: keep-all;
    }
    
    /* Mobile: Header center section - Coin */
    .header-center {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        min-width: 0;
        padding: 0 8px;
    }
    
    /* Mobile: Better coin display styling */
    .coin-display {
        font-size: 0.7rem;
        padding: 4px 10px;
        border-radius: 15px;
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.15));
        border: 1px solid rgba(255, 215, 0, 0.3);
        color: #ffd700;
        font-weight: 700;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 70px;
        max-width: 110px;
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.1);
    }
    
    .coin-display .spinning-coin {
        font-size: 1rem;
        animation: spin 3s linear infinite;
    }
    
    .coin-display .coin-amount {
        font-size: 0.75rem;
        line-height: 1;
        font-weight: 800;
    }
    
    .coin-display .coin-label {
        display: none; /* Hide label to save space */
    }
    
    @keyframes spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
    
    /* Mobile: Header right section - Messages, Notifications, Profile */
    .header-right {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 0 0 auto;
        padding-right: 2px;
    }
    
    /* Mobile: Show message/notification section - IMPROVED STYLING */
    .message-notification-section {
        display: flex !important;
        align-items: center;
        gap: 6px;
    }
    
    /* Mobile: Better message/notification icons */
    .message-icon,
    .notification-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.9);
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        flex-shrink: 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .message-icon:hover,
    .notification-icon:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
    }
    
    .message-icon i,
    .notification-icon i {
        font-size: 0.85rem;
    }
    
    /* Mobile: Better notification badges */
    .notification-badge {
        position: absolute;
        top: -3px;
        right: -3px;
        background: #ff4757;
        color: white;
        border-radius: 50%;
        width: 16px;
        height: 16px;
        font-size: 0.65rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        min-width: 16px;
        border: 2px solid var(--primary-color);
    }
    
    /* Mobile: Auth section */
    .auth-section {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    /* Mobile: Profile FULLY CIRCULAR - Perfect Circle */
    .user-profile {
        width: 32px;
        height: 32px;
        border-radius: 50% !important; /* PERFECT CIRCLE */
        cursor: pointer;
        position: relative;
        flex-shrink: 0;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        overflow: hidden;
    }
    
    .user-profile:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    }
    
    /* User profile photo fills the entire circular container - NO BORDERS */
    .user-profile .user-avatar,
    .user-profile img[src*="profile"],
    .user-profile img[class*="avatar"],
    .user-profile img {
        width: 30px !important; /* Slightly smaller for border */
        height: 30px !important;
        border-radius: 50% !important;
        object-fit: cover;
        display: block !important;
        border: none !important;
        margin: 0 !important;
        position: absolute !important;
        top: 1px !important;
        left: 1px !important;
        background: transparent !important;
    }
    
    /* Hide default profile icon when user has photo */
    .user-profile .fa-user,
    .user-profile .fas.fa-user,
    .user-profile i.fa-user {
        display: none !important;
    }
    
    /* Hide username and dropdown arrow */
    .user-name,
    .user-profile .fa-chevron-down,
    .user-profile .username,
    .user-profile span:not(.user-avatar):not(img) {
        display: none !important;
    }
    
    /* Mobile: Profile dropdown (when implemented) */
    .user-profile .dropdown-menu {
        position: absolute;
        top: 40px;
        right: 0;
        background: var(--card-bg);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        min-width: 120px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }
    
    .user-profile .dropdown-item {
        padding: 8px 12px;
        color: rgba(255, 255, 255, 0.9);
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .user-profile .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* Mobile: Compact login button */
    .login-btn {
        width: 28px;
        height: 28px;
        padding: 0;
        border-radius: 50%;
        background: var(--primary-color);
        border: none;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .login-btn i {
        font-size: 0.8rem;
    }
    
    .login-btn span {
        display: none;
    }
    
    /* Mobile: Force header logo visibility */
    body .header-logo,
    body:not(.mini-sidebar-active) .header-logo,
    body.mini-sidebar-active .header-logo {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .sidebar-nav-item {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .page-content {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    /* Show hamburger menu on mobile */
    .sidebar-toggle {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens - minimal header */
    .main-header {
        height: 48px; /* Even more compact */
    }
    
    .main-content {
        top: 48px;
        padding: 8px;
    }
    
    .header-container {
        padding: 2px 6px;
        gap: 2px;
    }
    
    /* Ultra compact hamburger */
    .sidebar-toggle-header {
        width: 28px;
        height: 28px;
        font-size: 1rem;
        margin: 0;
    }
    
    /* Minimal logo */
    .header-logo {
        gap: 4px;
        max-width: 100px;
    }
    
    .header-logo img {
        width: 20px;
        height: 20px;
    }
    
    .header-logo-text {
        font-size: 0.75rem;
        font-weight: 600;
        max-width: 80px;
    }
    
    /* Minimal coin display */
    .coin-display {
        font-size: 0.6rem;
        padding: 2px 4px;
        border-radius: 8px;
        min-width: 40px;
        max-width: 60px;
    }
    
    .coin-display .coin-amount {
        font-size: 0.65rem;
    }
    
    .coin-display .coin-label {
        display: none; /* Hide label completely */
    }
    
    .coin-display .spinning-coin {
        font-size: 0.8rem;
    }
    
    /* Minimal user profile */
    .user-profile {
        max-width: 60px;
        padding: 2px 4px;
    }
    
    .user-avatar {
        width: 20px !important;
        height: 20px !important;
    }
    
    .user-profile .fa-chevron-down {
        display: none; /* Hide arrow */
    }
    
    /* Minimal login button */
    .login-btn {
        width: 28px;
        height: 28px;
        padding: 0;
        border-radius: 50%;
    }
    
    .login-btn i {
        font-size: 0.9rem;
    }
    
    /* Minimal theme button */
    .theme-btn {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    /* Tighten header sections */
    .header-left {
        gap: 3px;
        flex: 1;
        min-width: 0;
    }
    
    .header-right {
        gap: 2px;
        flex-shrink: 0;
    }
    
    .auth-section {
        gap: 2px;
    }
    
    .sidebar {
        width: 260px;
        left: -260px;
    }
    
    .page-content {
        padding: 12px;
    }
    
    .page-title {
        font-size: 1.6rem;
    }
}

/* Mobile: ULTIMATE override to ensure header logo shows */
@media (max-width: 768px) {
    /* Ultra-high specificity override for mobile header logo */
    body .main-header .header-logo,
    body:not(.mini-sidebar-active) .main-header .header-logo,
    body.mini-sidebar-active .main-header .header-logo,
    .main-header .header-container .header-logo,
    body[data-theme] .main-header .header-logo,
    html body .main-header .header-logo {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* Force show all header logo children */
    body .main-header .header-logo img,
    body .main-header .header-logo-text {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Override ANY possible display:none rules */
    body .header-logo,
    body:not(.mini-sidebar-active) .header-logo,
    html body .header-logo {
        display: flex !important;
    }
    /* Perfect mobile header layout - prevent any overlap */
    .main-header {
        overflow: hidden;
    }
    
    .header-container {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
        max-width: 60%;
        display: flex;
        align-items: center;
    }
    
    .header-right {
        flex: 0 0 auto;
        max-width: 40%;
        display: flex;
        align-items: center;
    }
    
    /* Ensure no element extends beyond container */
    .header-container > *,
    .header-left > *,
    .header-right > * {
        box-sizing: border-box;
        flex-shrink: 1;
        min-width: 0;
    }
}

/* Desktop: Sidebar always visible */
@media (min-width: 769px) {
    .sidebar-overlay {
        display: none !important;
    }
    
    .sidebar.collapsed {
        left: 0;
    }
    
    .sidebar.collapsed ~ .main-header {
        left: 70px;
    }
    
    .sidebar.collapsed ~ .main-content {
        left: 70px;
    }
}

/* ==========================================
   MODERN SCROLLBAR STYLES - THEME COMPATIBLE
   ========================================== */

/* Webkit Browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin: 2px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--primary-color);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: scale(1.2);
}

::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* Horizontal Scrollbar */
::-webkit-scrollbar:horizontal {
    height: 12px;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.1);
}

/* Modern Thin Scrollbar Variant */
.thin-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.thin-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.thin-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    box-shadow: 0 0 8px var(--primary-color);
}

/* Glassmorphism Scrollbar for Special Elements */
.glass-scrollbar::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.glass-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2), 
        rgba(255, 255, 255, 0.1)
    );
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.glass-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--secondary-color)
    );
    border-color: var(--accent-color);
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-color);
}

/* Dark Theme Scrollbar */
.dark-scrollbar::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.dark-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        var(--dark-blue), 
        var(--primary-color)
    );
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.dark-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--accent-color)
    );
    box-shadow: 0 0 12px var(--secondary-color);
}

/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(1.2);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Main Content Scrollbar */
.main-content::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin: 4px;
}

.main-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--secondary-color)
    );
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        var(--secondary-color), 
        var(--accent-color)
    );
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
    border-color: var(--accent-color);
}

/* Table Scrollbar */
.table-responsive::-webkit-scrollbar {
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    transition: all 0.3s ease;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    box-shadow: 0 0 8px var(--primary-color);
}

/* Modal Scrollbar */
.modal::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.modal::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    box-shadow: 0 0 10px var(--primary-color);
}

/* Card Content Scrollbar */
.card-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.card-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.card-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    transition: all 0.3s ease;
}

.card-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: scale(1.1);
}

/* Theme-Specific Scrollbar Variations */

/* Default theme scrollbar glow effect */
body::-webkit-scrollbar-thumb {
    box-shadow: inset 0 0 6px var(--primary-color);
}

/* Dark Blue theme - Ocean effect */
body[data-theme="dark-blue"]::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    box-shadow: 0 0 10px #0ea5e9;
}

/* Purple theme - Royal effect */
body[data-theme="purple"]::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #9333ea, #c084fc);
    box-shadow: 0 0 10px #9333ea;
}

/* Green theme - Nature effect */
body[data-theme="green"]::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #059669, #34d399);
    box-shadow: 0 0 10px #059669;
}

/* Red theme - Fire effect */
body[data-theme="red"]::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #dc2626, #f87171);
    box-shadow: 0 0 10px #dc2626;
}

/* Gold theme - Luxury effect */
body[data-theme="gold"]::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d97706, #fbbf24);
    box-shadow: 0 0 10px #d97706;
}

/* Midnight theme - Deep night effect */
body[data-theme="midnight"]::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    box-shadow: 0 0 10px #1e3a8a;
}

/* Responsive Scrollbar */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    .main-content::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }
    
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }
}

@media (max-width: 480px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    .main-content::-webkit-scrollbar,
    .sidebar::-webkit-scrollbar {
        width: 5px;
    }
}

/* Hide scrollbar completely for specific elements if needed */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Smooth scrolling for all elements */
html {
    scroll-behavior: smooth;
}

* {
    scroll-behavior: smooth;
}
